A rhyme word recommendation method, device, equipment and storage medium

By determining the target rhyme and rhyme configuration parameters of the rhyming words to be matched, and matching rhyming words in the rhyming word library, the difficulty of rhyming word recommendation for lyricists is solved, and efficient recommendation of rhyming words and improvement of rhyming effect are achieved.

CN113850080BActive Publication Date: 2026-01-09BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111154111.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2026-01-09
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

Lyricists often struggle to find suitable rhyming words during the creative process, especially novice lyricists who lack sufficient rhyming word recommendations, which increases the difficulty of creation.

Method used

A method for recommending rhyming words is provided. By obtaining the rhyming words to be matched and the rhyming configuration parameters, the target rhyme is determined, and the corresponding rhyming word class is matched in the rhyming word library. Rhyming words are recommended according to the configuration parameters.

Benefits of technology

It helps lyricists quickly find suitable rhyming words, reducing the difficulty of creation and improving the accuracy of rhyming effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850080B_ABST
    Figure CN113850080B_ABST
Patent Text Reader

Abstract

The present disclosure provides a rhyming word recommendation method and device, equipment and storage medium, relates to the technical field of computers, and particularly relates to the technical field of intelligent recommendation. The specific implementation scheme is as follows: obtaining a to-be-matched rhyming word and a rhyming configuration parameter; determining a target foot of a sentence to which the to-be-matched rhyming word belongs according to the to-be-matched rhyming word; determining a target rhyming word class corresponding to the target foot in a rhyming word class included in a rhyming word library, the feet of the sentences to which the rhyming words in each rhyming word class belong are identical in tone; determining a rhyming word matched with the to-be-matched rhyming word from the target rhyming word class according to the rhyming configuration parameter; and recommending the determined rhyming word. The scheme provided in the present disclosure can realize rhyming word recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computers, and particularly relates to the technical field of intelligent recommendation. BACKGROUND

[0002] The lyrics of a rap work have an important influence on the quality of the work, and high-quality lyrics usually need to have a rhyming effect, which brings certain difficulties to lyric creators.

[0003] Currently, lyric creators mainly rely on their own lyric creation capabilities to create lyrics, and most lyric creators, especially novice lyric creators, generally have low lyric creation capabilities, and often encounter difficulties in finding the required rhyming words in the lyric creation process. Therefore, a rhyming word recommendation scheme is needed to help lyric creators find the required rhyming words and reduce the difficulty of lyric creation.

[0004] The rhyming word refers to a word with a foot in a statement with a rhyming effect. SUMMARY

[0005] The present disclosure provides a rhyming word recommendation method, device, equipment, and storage medium.

[0006] According to an aspect of the present disclosure, a rhyming word recommendation method is provided, comprising:

[0007] obtaining a to-be-matched rhyming word and a rhyming configuration parameter;

[0008] determining a target foot of a statement to which the to-be-matched rhyming word belongs according to the to-be-matched rhyming word;

[0009] determining a target rhyming word class corresponding to the target foot in a rhyming word class included in a rhyming word library, the feet of the statements to which the rhyming words in each rhyming word class belong have the same final consonant;

[0010] determining a rhyming word matched with the to-be-matched rhyming word from the target rhyming word class according to the rhyming configuration parameter;

[0011] recommending the determined rhyming word.

[0012] According to another aspect of the present disclosure, a rhyming word recommendation device is provided, comprising:

[0013] a parameter obtaining module configured to obtain a to-be-matched rhyming word and a rhyming configuration parameter;

[0014] a foot determining module configured to determine a target foot of a statement to which the to-be-matched rhyming word belongs according to the to-be-matched rhyming word;

[0015] The word class determination module is configured to determine a target rhyming word class corresponding to the target rhyme in the rhyming word classes included in the rhyming word library, wherein rhymes of words in each rhyming word class have the same final consonant.

[0016] The rhyming word determination module is configured to determine, according to the rhyming configuration parameter, a rhyming word matching the to-be-matched rhyming word from the target rhyming word class.

[0017] The rhyming word recommendation module is configured to recommend the determined rhyming word.

[0018] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0019] at least one processor; and

[0020] a memory in communication with the at least one processor; wherein

[0021] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the rhyming word recommendation method.

[0022] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the rhyming word recommendation method.

[0023] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the rhyming word recommendation method.

[0024] As can be seen from the above, in the scheme provided by the embodiments of the present disclosure, after obtaining the to-be-matched rhyming word, the target rhyme of the sentence to which the to-be-matched rhyming word belongs is determined, and then the target rhyming word class corresponding to the target rhyme is determined in the rhyming word classes included in the rhyming word library. In addition, in the scheme provided by the embodiments of the present disclosure, in addition to obtaining the to-be-matched rhyming word, the rhyming configuration parameter is also obtained, so that the rhyming word matching the to-be-matched rhyming word can be determined from the target rhyming word class according to the rhyming configuration parameter, and the determined rhyming word is recommended. It can be seen that the scheme provided by the embodiments of the present disclosure can realize rhyming word recommendation, and further help lyric writers to find the required rhyming word in the lyric creation scene, thereby reducing the difficulty of lyric creation.

[0025] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0026] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:

[0027] Figure 1 is a flowchart of a first rhyme word recommendation method provided by an embodiment of the present disclosure;

[0028] Figure 2 is a flowchart of a second rhyme word recommendation method provided by an embodiment of the present disclosure;

[0029] Figure 3 is a flowchart of a third rhyme word recommendation method provided by an embodiment of the present disclosure;

[0030] Figure 4 is a flowchart of a rhyme word library construction method provided by an embodiment of the present disclosure;

[0031] Figure 5 is a user interface diagram provided by an embodiment of the present disclosure;

[0032] Figure 6 is a structural diagram of a rhyme word recommendation device provided by an embodiment of the present disclosure;

[0033] Figure 7 is a block diagram of an electronic device for implementing the rhyme word recommendation method of the present embodiment. DETAILED DESCRIPTION

[0034] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.

[0035] Since a lyric writer may encounter difficulty in finding the required rhyme words in the process of lyric creation, the present disclosure provides a rhyme word recommendation method, device, equipment and storage medium.

[0036] The application scenario of the embodiments of the present disclosure will be described first.

[0037] The scheme provided by the embodiments of the present disclosure is applicable to any scene requiring rhyme word recommendation. The following is an example.

[0038] Scenario one: lyric creation scenario

[0039] In the process of creating lyrics, a lyricist wants to write several sentences with a rhyming effect, but feels that the already thought of rhyming word X is not quite suitable. In this case, the electronic device can match other rhyming words for the rhyming word X and recommend the matched rhyming words to the lyricist, so as to help the lyricist select a better rhyming word for the lyrics created by the lyricist.

[0040] Scenario two: a poetry creation scenario

[0041] In beautiful poems, the rhyming effect between the sentences is often good, and therefore, a poet is required to carefully select the rhyming words used in the sentences in the process of creating poems. In this case, the electronic device can match other rhyming words for the rhyming word Y in the created sentence and recommend the matched rhyming words to the poet, so as to help the poet select the best rhyming word for the sentence.

[0042] The execution subject of the embodiment of the present disclosure is described below.

[0043] The execution subject of the embodiment of the present disclosure is an electronic device.

[0044] In one case, the above-mentioned electronic device is a user terminal. In this case, the user terminal can be installed with a client. At this time, it can be considered that the execution subject of the embodiment of the present disclosure is specifically the client, for example, a client providing a lyrics creation function, a client providing a poetry creation function, and the like.

[0045] In another case, the above-mentioned electronic device is a server. In this case, the server can be installed with a server end for providing background service for the above-mentioned client. At this time, it can also be considered that the execution subject of the embodiment of the present disclosure is specifically the above-mentioned server end.

[0046] The concepts involved in the embodiment of the present disclosure are described below.

[0047] 1, foot

[0048] For a sentence in a poem, the foot generally refers to the last word in the sentence. For example, the foot of the lyrics “You listen to the sound of the steam whistle in the distance” is “whistle”, and the foot of the poem “Small green shoots just sprout sharp corners” is “corner”.

[0049] 2, rhyming word

[0050] The rhyming word refers to the word in which the foot of the sentence with a rhyming effect is located. For example, the foot rhyming word of the above-mentioned lyrics “You listen to the sound of the steam whistle in the distance” is “steam whistle”, and the rhyming word of the poem “Small green shoots just sprout sharp corners” is “sharp corners”.

[0051] 3, rhyming configuration parameter

[0052] The rhyme configuration parameter is a parameter for describing a rhyme effect of a sentence. Since the scheme provided by the embodiments of the present disclosure is to match other rhyming words for a to-be-matched rhyming word given the to-be-matched rhyming word, the rhyme configuration parameter can also be understood as a parameter for describing a rhyme effect between the other rhyming words expected to be matched and the to-be-matched rhyming word.

[0053] In an implementation manner, the rhyme configuration parameter includes a rhyme type and a tone type.

[0054] The rhyme type is related to the number of words used to achieve a rhyme effect, and can be understood as the number of words used to achieve a rhyme effect or the number of words between the other rhyming words matched and the to-be-matched rhyming word. For example, the rhyme type can be a single-rhyme type, a double-rhyme type, a triple-rhyme type, and the like. The single-rhyme type means that a rhyme effect is achieved by one word, such as "yanhuo" and "fanqu", the double-rhyme type means that a rhyme effect is achieved by two words, such as "yanhuo" and "luohanguo", and the triple-rhyme type means that a rhyme effect is achieved by three words, such as "yingyingchaocaocaocao" and "hanchengjuyu".

[0055] The tone type refers to the characteristics of tones between rhyming words, and also refers to the characteristics of tones between the other rhyming words matched and the to-be-matched rhyming word. For example, the tone type can be tone unlimited, tone consistent, tail tone consistent, and the like.

[0056] The rhyme word recommendation method provided by the embodiments of the present disclosure is described below through specific embodiments.

[0057] Referring to FIG. 1, Figure 1 a flowchart of a first rhyme word recommendation method is provided, and the method includes the following steps S101-S105.

[0058] Step S101: obtaining a to-be-matched rhyming word and a rhyme configuration parameter.

[0059] The to-be-matched rhyming word is generally determined based on user input information.

[0060] When the execution subject of the embodiments of the present disclosure is a client, the client can directly monitor information input by a user on the client to obtain user input information, and then the client obtains a to-be-matched rhyming word according to the user input information.

[0061] When the execution subject of the embodiments of the present disclosure is a server, after the client obtains the user input information, the client can send the user input information to the server, so that the server obtains the user input information, and then the server obtains a to-be-matched rhyming word according to the user input information.

[0062] The user input information can only include one word. For example, the user input information can be fireworks, down-and-out, etc. In this case, the user input information can be directly used as the rhyming word to be matched.

[0063] The user input information can also be a sentence or multiple words. In this case, the user input information can be segmented into words, and then the last word can be determined as the rhyming word to be matched according to the arrangement order of the words in the user input information. For example, the user input information is "I am outside", and the segmented words include "I", "am", and "outside". In this case, the rhyming word to be matched can be "outside". For example, the user input information is "beautiful flower", and the segmented words include "beautiful", "is", and "flower". In this case, the rhyming word to be matched can be "flower".

[0064] Specifically, in one case, the segmentation processing can be implemented according to a pre-set segmentation rule. In another implementation, the segmentation processing can also be implemented by subsequent Figure 4 The segmentation model mentioned in the illustrated embodiment implements the segmentation processing. The segmentation model can be parameterized as follows. Figure 4 The description in the illustrated embodiment will not be described here.

[0065] The rhyming configuration parameter in this step can be obtained based on the user's setting operation or based on the default configuration information of the server.

[0066] Step S102: determining a target rhyme of a sentence to which the rhyming word to be matched belongs according to the rhyming word to be matched.

[0067] Since the rhyming effect refers to the language effect between sentences, a word can be called a rhyming word only when it is in a sentence, and the rhyme usually refers to the last word of a sentence with a rhyming effect. Therefore, in one implementation, the rhyming word to be matched can be assumed to be a word in which the rhyme is located in a sentence, and the last word in the rhyming word to be matched can be used as the target rhyme of the sentence to which the rhyming word to be matched belongs.

[0068] Step S103: determining a target rhyming word class corresponding to the target rhyme in a rhyming word class included in a rhyming word library.

[0069] The rhymes of the sentences to which the rhyming words in each rhyming word class belong are the same.

[0070] The rhyming word library is a pre-constructed word library that stores various rhyming words.

[0071] Specifically, the rhyming word library can be a word library constructed based on a dictionary, can be a word library constructed by developers in the development stage by collecting rhyming words, and can also be a word library constructed based on existing sentences. For specific construction methods, please refer to the subsequent Figure 4 The specific implementation of the rhyming word library will be described in detail in the subsequent embodiments.

[0072] Since the rhyming word library contains a large number of rhyming words, these rhyming words can be regarded as words that make the sentence have a rhyming effect, and since the sentence with the rhyming effect has a foot, the foot is the embodiment of the rhyming effect of the sentence, therefore, the words in the rhyming word library can be classified and managed according to the final consonants of the foot.

[0073] Specifically, when classifying the rhyming words in the rhyming word library, the pinyin of the rhyming words can be determined first, the final consonants of the foot in the rhyming words can be determined according to the pinyin, and then the rhyming words can be classified into the classification corresponding to the determined final consonants. One classification is called one rhyming word class.

[0074] When determining the target rhyming word class corresponding to the target foot, in one implementation, the first final consonant of the target foot can be determined, and then the rhyming word class corresponding to the first final consonant can be directly determined as the target rhyming word class. In another implementation, since the pronunciations of some final consonants are similar, for example, the pronunciations of ao and ou have a certain degree of similarity, after the first final consonant is determined, a second final consonant corresponding to the first final consonant can be obtained according to a preset correspondence between final consonants, and then the rhyming word classes corresponding to the first final consonant and the second final consonant are both determined as the target rhyming word class. In this case, multiple target rhyming word classes can be obtained.

[0075] Step S104: determining, according to the rhyming configuration parameter, a rhyming word matched with the to-be-matched rhyming word from the target rhyming word class.

[0076] Since the rhyming configuration parameter is a parameter used to describe the rhyming effect of the sentence, and since a rhyming word class often includes multiple rhyming words, when determining the rhyming word matched with the to-be-matched rhyming word from the target rhyming word class, a word with the rhyming effect described by the rhyming configuration parameter can be selected from the target rhyming word class as the rhyming word matched with the to-be-matched rhyming word.

[0077] The specific implementation of determining the rhyming word matched with the to-be-matched rhyming word can be referred to in the subsequent Figure 2 and Figure 3 The specific implementation of the rhyming word library will be described in detail in the subsequent embodiments.

[0078] Step S105: recommending the determined rhyming word.

[0079] When the execution subject of the embodiments of the present disclosure is a client, recommending the determined rhyming word can be displaying the determined rhyming word in a user interface.

[0080] When the execution subject of the embodiments of the present disclosure is a server, the determined rhyme word can be sent to the client, so that the client can display the determined rhyme word in the user interface after receiving the determined rhyme word.

[0081] As can be seen from the above, in the scheme provided by the embodiments of the present disclosure, after obtaining the to-be-matched rhyme word, the target foot of the sentence to which the to-be-matched rhyme word belongs is determined, and then the target rhyme word class corresponding to the target foot is determined in the rhyme word class included in the rhyme word library. In addition, in the scheme provided by the embodiments of the present disclosure, in addition to obtaining the to-be-matched rhyme word, the rhyme configuration parameters are also obtained, so that the to-be-matched rhyme word can be determined from the target rhyme word class according to the above-mentioned rhyme configuration parameters, thereby recommending the determined rhyme word. It can be seen that the scheme provided by the embodiments of the present disclosure can realize rhyme word recommendation, thereby helping lyric writers to find the required rhyme word in the lyric creation scene, and reducing the difficulty of lyric creation.

[0082] The specific implementation of the step S104 of determining the rhyme word matched with the to-be-matched rhyme word will be described below with reference to the following Figure 2 and Figure 3 embodiments.

[0083] Referring to Figure 2 , a flowchart of a second rhyme word recommendation method is provided. Compared with the foregoing Figure 1 embodiment, in the present embodiment, when the rhyme configuration parameters include the target rhyme type and / or the target tone type, the step S104 of determining the rhyme word matched with the to-be-matched rhyme word from the target rhyme word class according to the rhyme configuration parameters can be implemented through the following steps S104A and S104B.

[0084] Step S104A: If the target rhyme type is included in the rhyme configuration parameters, determine the rhyme word matched with the to-be-matched rhyme word from the rhyme words in the target rhyme word class whose rhyme type is the target rhyme type.

[0085] Since different rhyme words have different rhyme types relative to the to-be-matched rhyme word, when determining the rhyme word matched with the to-be-matched rhyme word, the rhyme words whose rhyme type is the target rhyme type can be first determined from the rhyme words included in the target rhyme word class as first candidate rhyme words, and then the rhyme word matched with the to-be-matched rhyme word is determined from the first candidate rhyme words.

[0086] In an implementation, when determining the rhyme word matching the to-be-matched rhyme word from the first candidate rhyme words, semantic information of the to-be-matched rhyme word can be obtained, and the rhyme word is selected from the first candidate rhyme words as the rhyme word matching the to-be-matched rhyme word according to similarity between the semantic information of the to-be-matched rhyme word and semantic information of each first candidate rhyme word.

[0087] For example, the rhyme word with the similarity greater than the first preset similarity threshold can be selected from the first candidate rhyme words as the rhyme word matching the to-be-matched rhyme word.

[0088] The first preset number of rhyme words with the highest similarity can also be selected from the first candidate rhyme words as the rhyme word matching the to-be-matched rhyme word.

[0089] When setting the target rhyme type, one target rhyme type can be set, or multiple target rhyme types can be set. When there are multiple target rhyme types, each target rhyme type can be traversed one by one, and the rhyme word matching the to-be-matched rhyme word is determined for each target rhyme type.

[0090] Step S104B: If the target tone type is included in the rhyme configuration parameter, the rhyme word matching the to-be-matched rhyme word is determined from the rhyme words in the target rhyme word class with the tone type being the target tone type.

[0091] Since different rhyme words have different tone types relative to the to-be-matched rhyme word, when determining the rhyme word matching the to-be-matched rhyme word, the rhyme word with the target tone type can be first determined from the rhyme words included in the target rhyme word class as the second candidate rhyme word, and then the rhyme word matching the to-be-matched rhyme word is determined from the second candidate rhyme words.

[0092] In an implementation, when determining the rhyme word matching the to-be-matched rhyme word from the second candidate rhyme words, semantic information of the to-be-matched rhyme word can be obtained, and the rhyme word is selected from the second candidate rhyme words as the rhyme word matching the to-be-matched rhyme word according to similarity between the semantic information of the to-be-matched rhyme word and semantic information of each second candidate rhyme word.

[0093] For example, the rhyme word with the similarity greater than the second preset similarity threshold can be selected from the second candidate rhyme words as the rhyme word matching the to-be-matched rhyme word.

[0094] The second preset number of rhyme words with the highest similarity can also be selected from the second candidate rhyme words as the rhyme word matching the to-be-matched rhyme word.

[0095] When setting the target rhyme type, one target tone type can be set, or multiple target tone types can be set. When multiple target tone types exist, each target tone type can be traversed one by one, and for each target tone type, a rhyme word that matches the to-be-matched rhyme word is determined.

[0096] Since the rhyme configuration parameter can include both the target rhyme type and the target tone type, in this case, the same rhyme words in the rhyme words determined in steps S104A and S104B can be used as the final rhyme words that match the to-be-matched rhyme word.

[0097] As can be seen from the above, in the scheme provided in this embodiment, when determining the rhyme words that match the to-be-matched rhyme word, the rhyme type and / or the tone type are considered, so that the determined rhyme words can better meet the user's desired rhyme effect, thereby improving the accuracy of the rhyme word recommendation.

[0098] Referring to Figure 3 , a flowchart of a third rhyme word recommendation method is provided, and compared with the foregoing Figure 1 embodiment, in this embodiment, each rhyme word in the rhyme word library is provided with a word attribute.

[0099] The word attribute can include multiple attributes, and each attribute reflects the characteristics of the word from different angles.

[0100] In one embodiment of the present disclosure, the word attribute can include at least one of the following three attributes.

[0101] First: the frequency of the rhyme word in the sentences used to construct the rhyme word library

[0102] Before constructing the rhyme word library, a large number of existing sentences can be collected, and then these sentences are analyzed to determine the rhyme words and construct the rhyme word library.

[0103] Some rhyme words match multiple contexts and can be used multiple times, and appear in multiple collected sentences, with a high frequency. Some rhyme words only match part of the context and appear in a small number of collected sentences, with a low frequency. Therefore, it can be considered that the frequency reflects the popularity of the rhyme word, or in other words, the frequency reflects the matching degree with various contexts. In summary, the frequency can be used as an attribute of the word.

[0104] Second: the part of speech of the rhyme word

[0105] The part of speech can be a verb, a noun, etc.

[0106] Third: the source of the rhyme word

[0107] Various rhyming words have different sources, for example, the above sources can be: hot words, poems, idioms, famous quotes, allusions, etc.

[0108] As can be seen from the above, rhyming words can have multiple word attributes, which can describe rhyming words from different angles. If the rhyming words matched with the to-be-matched rhyming words are determined based on the word attributes, the determination process can provide rich reference information, making the determined rhyming words more accurate.

[0109] In view of the above, the step S104 determines the rhyming words matched with the to-be-matched rhyming words from the target rhyming word class according to the rhyming configuration parameters, which can be implemented by the following step S104C.

[0110] Step S104C: determining the rhyming words matched with the to-be-matched rhyming words from the target rhyming word class according to the rhyming configuration parameters and the word attributes of the rhyming words in the target rhyming word class.

[0111] In an implementation manner, the maximum number of matched rhyming words can be preset, and the priority between each different word attribute can be preset, and then the rhyming words matched with the to-be-matched rhyming words under each word attribute are determined according to the above priority, until the total number of determined rhyming words reaches the maximum number or each word attribute is traversed.

[0112] For example, the above word attributes include three word attributes, and the priority is arranged as: word attribute 1, word attribute 2 and word attribute 3, and the maximum number is assumed to be 20. When determining the rhyming words matched with the to-be-matched rhyming words according to the priority, the rhyming words matched with the to-be-matched rhyming words under the word attribute 1 are determined first, if 15 rhyming words are determined at this time, then the rhyming words matched with the to-be-matched rhyming words under the word attribute 2 are determined, if 5 rhyming words are determined at this time, a total of 20 rhyming words are determined, reaching the maximum number, and the rhyming words matched with the to-be-matched rhyming words under the word attribute 3 can not be determined any more.

[0113] In another implementation manner, the maximum number of rhyming words corresponding to each word attribute can also be preset, and then the rhyming words matched with the to-be-matched rhyming words under each word attribute are determined, and the number of the determined rhyming words is not more than the maximum number corresponding to the word attribute.

[0114] Since the rhyming words can have multiple word attributes, and these different word attributes can describe the rhyming words from different angles, the word attributes are considered when determining the rhyming words matched with the to-be-matched rhyming words in the embodiment, which can improve the accuracy of the determined rhyming words.

[0115] The construction manner of the rhyming word library will be introduced through specific embodiments.

[0116] Referring to Figure 4, a flowchart of a rhyming library construction method is provided, which comprises the following steps S401-S404.

[0117] Step S401: obtaining existing sentences with rhyming effect collected.

[0118] In one embodiment of the present disclosure, the above-mentioned existing sentences can be sentences in lyrics. In this case, the rhyming words contained in the constructed rhyming library can be derived from lyrics, and in the scenario of recommending rhyming words for lyric creators, the accuracy of recommending rhyming words for lyric creators can be improved based on the rhyming library created at this time.

[0119] Of course, the above-mentioned existing sentences can also be sentences in poems, and can also be sentences in articles, etc., and the embodiments of the present disclosure do not limit this.

[0120] Step S402: inputting the existing sentences into a pre-trained word segmentation model for word segmentation processing to obtain the rhyming words where the feet of the existing sentences are located.

[0121] The word segmentation model is a model obtained by training a network model using sample sentences and sample labeled words according to a preset learning mode to segment the rhyming words in the sentences. The preset learning mode includes learning the probability of the occurrence of rhyming words in sample sentences and the collocation of rhyming words. The sample labeled words are the rhyming words where the feet of the labeled sample sentences are located.

[0122] Before training the word segmentation model, a large number of sample sentences can be collected, which can be different according to different application scenarios. For example, in the scenario of creating lyrics, sentences in lyrics can be collected as sample sentences, and in the scenario of creating poems, sentences in poems can be collected as sample sentences. The rhyming words in the sample sentences are labeled to obtain sample labeled words. The sample sentences are used as input information of the network model, and the sample labeled words are used as training supervision information to supervise the training of the network model. The network structure of the network model is designed so that the network model can learn the probability of the occurrence of rhyming words in sample sentences and the collocation of rhyming words in sample sentences during the training process. After repeatedly training the model using a large number of sample sentences, a converged network model is obtained as the above-mentioned word segmentation model.

[0123] Step S403: determining the feet of the sentences to which the obtained rhyming words belong.

[0124] Similar to the foregoing step S102, the last character in the obtained rhyming word can also be used as the foot of the sentence to which it belongs in this step.

[0125] Step S404: adding the obtained rhyming words to the rhyming word library corresponding to the determined feet.

[0126] In the solution provided in this embodiment, given an existing sentence, a word segmentation model is used to segment the sentence to obtain the rhyming words. Since the word segmentation model is trained on a large number of samples, it can learn the features of rhyming words in the sample sentences, thus accurately segmenting the rhyming words in the existing sentences. Based on this, the solution provided in this embodiment can accurately construct a rhyming word database.

[0127] The following is combined Figure 5 The user interface diagram shown illustrates the process of recommending rhyming words in a lyric writing scenario.

[0128] The user's mobile phone has a lyrics creation client installed. The user creates lyrics on the client and wants to find other rhyming words that match the word "fireworks". To do this, the user enters "fireworks" in the search box of the client's user interface. After detecting the input, the client sends "fireworks" to the server. Upon receiving "fireworks", the server determines the target rhyme is "o", identifies the corresponding target rhyme category in the rhyme dictionary, and then, based on pre-configured rhyme types (e.g., single rhyme, double rhyme, triple rhyme) and tone types (e.g., no tone restrictions, consistent ending tone, consistent tone), determines a rhyming word matching "fireworks" from the target rhyme category corresponding to "o" and sends the determined rhyming word to the client. The client receives the rhyming word and then... Figure 5 The user interface shown displays the received rhyming words, enabling rhyming word recommendations.

[0129] The layout of the user interface displayed on the client can be controlled by the server, which makes it easier for the server to optimize and update the user interface.

[0130] Corresponding to the above-described rhyming word recommendation method, this disclosure also provides a rhyming word recommendation device.

[0131] See Figure 6 A schematic diagram of a rhyming word recommendation device is provided, including:

[0132] The parameter acquisition module 601 is used to obtain the rhyming words to be matched and the rhyming configuration parameters;

[0133] The rhyme determination module 602 is used to determine the target rhyme of the sentence to which the rhyming word to be matched belongs based on the rhyming word to be matched.

[0134] The word class determination module 603 is configured to determine a target rhyming word class corresponding to the target rhyme in the rhyming word classes included in the rhyming word library, wherein rhymes in each rhyming word class have the same final consonant of the rhyme of the sentence to which the rhyming word belongs.

[0135] The rhyming word determination module 604 is configured to determine, according to the rhyming configuration parameter, a rhyming word matched with the to-be-matched rhyming word from the target rhyming word class.

[0136] The rhyming word recommendation module 605 is configured to recommend the determined rhyming word.

[0137] In the scheme provided by the embodiments of the present disclosure, after obtaining the to-be-matched rhyming word, the target rhyme of the sentence to which the to-be-matched rhyming word belongs is determined, and then the target rhyming word class corresponding to the target rhyme is determined in the rhyming word classes included in the rhyming word library. In addition, in the scheme provided by the embodiments of the present disclosure, the rhyming configuration parameter is obtained in addition to the to-be-matched rhyming word, so that the rhyming word matched with the to-be-matched rhyming word is determined from the target rhyming word class according to the rhyming configuration parameter, and the determined rhyming word is recommended. It can be seen that the scheme provided by the embodiments of the present disclosure can realize rhyming word recommendation, and thus help lyric writers to find the required rhyming word in the lyric creation scene, and reduce the difficulty of lyric creation.

[0138] In one embodiment of the present disclosure, the rhyming configuration parameter includes a target rhyming type and / or a target tone type.

[0139] The rhyming word determination module is specifically configured to: if the target rhyming type is included in the rhyming configuration parameter, determine, from the rhyming words in the target rhyming word class and having the target rhyming type, the rhyming word matched with the to-be-matched rhyming word; and if the target tone type is included in the rhyming configuration parameter, determine, from the rhyming words in the target rhyming word class and having the target tone type, the rhyming word matched with the to-be-matched rhyming word.

[0140] In the scheme provided by the present embodiment, the rhyming type and / or the tone type are considered when determining the rhyming word matched with the to-be-matched rhyming word, so that the determined rhyming word can better meet the user's expected rhyming effect, thereby improving the accuracy of rhyming word recommendation.

[0141] In one embodiment of the present disclosure, each rhyming word in the rhyming word library is provided with a word attribute.

[0142] The rhyming word determination module is specifically configured to determine, according to the rhyming configuration parameter and the word attribute of the rhyming word in the target rhyming word class, the rhyming word matched with the to-be-matched rhyming word from the target rhyming word class.

[0143] Since the rhyme word can have multiple word attributes, and the different word attributes can describe the rhyme word from different perspectives, the word attributes are considered when determining the rhyme word in the embodiment, and the accuracy of the determined rhyme word can be improved.

[0144] In one embodiment of the present disclosure, the word attributes include at least one of the following attributes:

[0145] The frequency of the rhyme word in the sentence used to build the rhyme word library;

[0146] The part of speech of the rhyme word;

[0147] The source of the rhyme word.

[0148] As can be seen from the above, the rhyme word can have multiple word attributes, which can describe the rhyme word from different perspectives. If the word attributes are used to determine the rhyme word matched with the to-be-matched rhyme word, rich reference information can be provided for the determination process, and the determined rhyme word is more accurate.

[0149] In one embodiment of the present disclosure, the rhyme word library is built in the following manner:

[0150] Obtaining an existing sentence with a rhyme effect that has been collected;

[0151] Inputting the existing sentence into a pre-trained word segmentation model for word segmentation processing to obtain a rhyme word where the rhyme foot of the existing sentence is located, wherein the word segmentation model is a model obtained by training a network model using sample sentences and sample labeled words in a preset learning mode, and the preset learning mode includes learning the probability of the appearance of the rhyme word in the sample sentence and the collocation of the rhyme word, and the sample labeled word is a rhyme word where the rhyme foot of the sample sentence is located.

[0152] Determining the rhyme foot of the sentence where the obtained rhyme word belongs;

[0153] Adding the obtained rhyme word to the rhyme word class corresponding to the determined rhyme foot in the rhyme word library.

[0154] In the scheme provided in the embodiment, after the existing sentence is obtained, the word segmentation model is used for word segmentation processing of the existing sentence to obtain the rhyme word in the existing sentence. Since the word segmentation model is a model obtained by training a large number of samples for word segmentation processing, the characteristics of the rhyme word in the sample sentence can be learned, and the word segmentation model can accurately segment the rhyme word in the existing sentence. On this basis, the scheme provided in the embodiment can accurately build the rhyme word library.

[0155] In one embodiment of the present disclosure, the existing sentence is a sentence in a song lyrics.

[0156] In this case, the rhyming words contained in the constructed rhyming word library can be derived from the lyrics, and in the scenario of recommending rhyming words for lyric creators, the accuracy of recommending rhyming words for lyric creators can be improved based on the rhyming word library created at this time.

[0157] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0158] The present disclosure further provides an electronic device, comprising:

[0159] at least one processor; and

[0160] a memory in communication with the at least one processor; wherein

[0161] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the rhyming word recommendation method described in the above method embodiments.

[0162] The present disclosure further provides a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to perform the rhyming word recommendation method described in the above method embodiments.

[0163] The present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, implements the rhyming word recommendation method described in the above method embodiments.

[0164] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0165] As Figure 7As shown, the device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from the storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0166] A plurality of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, and the like; an output unit 707, such as various types of displays, speakers, and the like; a storage unit 708, such as a magnetic disk, an optical disk, and the like; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0167] The computing unit 701 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 701 performs various methods and processes described above, such as the method rhyme word recommendation. For example, in some embodiments, the method rhyme word recommendation can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method rhyme word recommendation described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method rhyme word recommendation by any other appropriate means, such as by means of firmware.

[0168] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0169] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, or entirely on a remote machine or server.

[0170] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0171] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0172] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0173] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0174] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation, as long as the desired results of the technology disclosed in the present disclosure are achieved.

[0175] The specific embodiments described above are not intended to limit the scope of the present disclosure. Those skilled in the art will understand that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present disclosure. Any further modifications, changes, improvements, and the like that come within the spirit and principles of the present disclosure should be considered within the scope of the present disclosure.

Claims

1. A method for rhyming word recommendation, comprising: obtaining a to-be-matched rhyming word and a rhyming configuration parameter, the rhyming configuration parameter being a parameter for describing a rhyming effect between other rhyming words expected to be matched and the to-be-matched rhyming word; determining, according to the to-be-matched rhyming word, a target foot of a sentence to which the to-be-matched rhyming word belongs; determining, in a rhyming word class included in a rhyming word library, a target rhyming word class corresponding to the target foot, the rhyming words in each rhyming word class belonging to sentences with the same rhyme of the foot; determining, from the target rhyming word class, a rhyming word matched with the to-be-matched rhyming word according to the rhyming configuration parameter and a word attribute set for the rhyming words in the target rhyming word class, each rhyming word in the rhyming word library being set with a word attribute, the word attribute including at least one of the following attributes: a frequency of occurrence of the rhyming word in a sentence used to build the rhyming word library, a part of speech of the rhyming word, and a source of the rhyming word; the frequency of occurrence reflecting a popularity of the rhyming word, or in other words, the frequency of occurrence reflecting a matching degree with various contexts; and recommending the determined rhyming word. 2.The method of claim 1, wherein: the rhyming configuration parameter includes a target rhyming type and / or a target tone type; and the determining, from the target rhyming word class, the rhyming word matched with the to-be-matched rhyming word according to the rhyming configuration parameter includes: if the target rhyming type is included in the rhyming configuration parameter, determining, from the target rhyming word class, the rhyming word matched with the to-be-matched rhyming word among rhyming words in the target rhyming word class with the target rhyming type; and if the target tone type is included in the rhyming configuration parameter, determining, from the target rhyming word class, the rhyming word matched with the to-be-matched rhyming word among rhyming words in the target rhyming word class with the target tone type. The rhyming word library is built in the following manner: obtaining existing sentences with rhyming effects that have been collected; inputting the existing sentences into a pre-trained word segmentation model for word segmentation processing to obtain rhyming words in which feet of the existing sentences are located, wherein the word segmentation model is a model obtained by training a network model using sample sentences and sample labeled words according to a preset learning mode, the preset learning mode including learning probabilities of occurrence of rhyming words in the sample sentences and rhyming word collocations, and the sample labeled words being rhyming words in which feet of the sample sentences are located that are labeled; determining the feet of the sentences to which the obtained rhyming words belong; and adding the obtained rhyming words to a rhyming word class corresponding to the determined feet in the rhyming word library. 4.The method of claim 3, wherein: the existing sentences are sentences in lyrics. 5.A rhyming word recommendation apparatus, comprising: a parameter obtaining module configured to obtain a to-be-matched rhyming word and a rhyming configuration parameter, the rhyming configuration parameter being a parameter for describing a rhyming effect between other rhyming words expected to be matched and the to-be-matched rhyming word; and a foot determining module configured to determine, according to the to-be-matched rhyming word, a target foot of a sentence to which the to-be-matched rhyming word belongs. ​ ​ ​ ​ ​ ​ ​ 3. The method of any one of claims 1-2, wherein, ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ The word class determination module is configured to determine a target rhyming word class corresponding to the target rhyme from among rhyming word classes included in the rhyming word library, wherein rhyming words in each rhyming word class have the same final consonant of the rhyme of a sentence. The rhyming word determination module is configured to determine, according to the rhyming configuration parameter and a word attribute of a rhyming word in the target rhyming word class, a rhyming word matching the to-be-matched rhyming word from the target rhyming word class, wherein each rhyming word in the rhyming word library is provided with a word attribute, and the word attribute includes at least one of the following attributes: a frequency of occurrence of the rhyming word in a sentence used to construct the rhyming word library, a part of speech of the rhyming word, and a source of the rhyming word. The frequency of occurrence reflects a degree of popularity of the rhyming word, or in other words, a degree of matching with various contexts. The rhyming word recommendation module is configured to recommend the determined rhyming word.

6. The apparatus of claim 5, wherein, The rhyming configuration parameter includes a target rhyming type and / or a target tone type. The rhyming word determination module is specifically configured to, if the target rhyming type is included in the rhyming configuration parameter, determine, from rhyming words in the target rhyming word class that have the target rhyming type, a rhyming word matching the to-be-matched rhyming word; and if the target tone type is included in the rhyming configuration parameter, determine, from rhyming words in the target rhyming word class that have the target tone type, a rhyming word matching the to-be-matched rhyming word.

7. The apparatus of any of claims 5-6, wherein, The rhyming word library is constructed in the following manner: An existing sentence having a rhyming effect is obtained. The existing sentence is input into a pre-trained word segmentation model for word segmentation processing to obtain a rhyming word in which a rhyme of the existing sentence is located, wherein the word segmentation model is a model obtained by training a network model using sample sentences and sample labeled words according to a preset learning mode, the preset learning mode includes learning a probability of occurrence of a rhyming word in the sample sentences and a rhyming word combination, and the sample labeled words are labeled rhyming words in which a rhyme of the sample sentences is located. Rhymes of sentences in which the obtained rhyming words are located are determined. The obtained rhyming words are added to a rhyming word class corresponding to the determined rhymes in the rhyming word library.

8. The apparatus of claim 7, wherein, The existing sentence is a sentence in a lyric.

9. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-4.

11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Quick searching device of rhyming words and method

    CN103136369A

  • Searching system and method for rhyming words of sentences

    TW200842617A