New word mining method and device, equipment and medium
Through the combination of sliding window and weight model, the problem of low accuracy and efficiency of new word discovery in the existing technology is solved, accurate identification and efficient screening of new words are achieved, and the accuracy and efficiency of new word mining are improved.
Patent Information
- Application Number
- CN202410665309.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-24
AI Technical Summary
The accuracy and efficiency of new word discovery in existing natural language processing technology are low. In particular, the effect of statistical word frequency methods is highly volatile. Machine learning methods require a large amount of annotated data, which reduces the efficiency of new word mining.
The published text is segmented through a sliding window, the preset language model is used to calculate the perplexity to screen the initial segmentation, and a new word cloud is built using the weight model to improve the accuracy and efficiency of new word mining.
It achieves accurate identification of key words in the text and improves the efficiency and accuracy of new word mining. Through the combination of sliding window and weight model, it ensures accurate identification and effective screening of new words.
Smart Images

Figure CN118690750A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a new word mining method, device, equipment and medium. Background Art
[0002] In the Internet age, with the rapid development of science and technology and social media, a large number of new words are generated every day. These new words may be Internet buzzwords, emerging technology terms, social hot topics or specific industry terms.
[0003] In existing natural language processing technologies, machine learning algorithms, deep learning models, and large-scale statistical corpora are used in new word discovery. However, these methods are implemented on the basis of a single rule, and the accuracy of new word discovery results is relatively poor. For example, using the method of statistical word frequency, the extraction effect fluctuates greatly and it is difficult to ensure accuracy. The method of using machine learning requires a large amount of annotated data, which reduces the efficiency of new word mining. Summary of the invention
[0004] Based on this, it is necessary to provide a new word mining method, device, equipment and medium to address the above technical issues, so as to solve the problems of low mining accuracy and efficiency in the new word mining process in the prior art.
[0005] A new word mining method, comprising:
[0006] Acquire published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation;
[0007] Calculating the perplexity of each of the initial participles using a preset language model, and after deleting the initial participles corresponding to the perplexity less than or equal to the perplexity threshold, determining a participle set; the participle set includes at least one intermediate participle;
[0008] Screening all the middle participles according to a preset screening rule to obtain target participles corresponding to the middle participles;
[0009] The target participles are weighted by a weight model to obtain a participle weight corresponding to each target participle, and a new word cloud is determined based on all the target participles and all the participle weights.
[0010] A new word mining device, comprising:
[0011] A word segmentation processing module is used to obtain published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation;
[0012] A word segmentation set module, used to calculate the perplexity of each of the initial word segments using a preset language model, and determine a word segmentation set after deleting the initial word segments corresponding to the perplexity less than or equal to the perplexity threshold; the word segmentation set includes at least one intermediate word segmentation;
[0013] A screening processing module, used to screen all the middle participles according to preset screening rules to obtain target participles corresponding to the middle participles;
[0014] The word cloud construction module is used to perform weight processing on each of the target participles through a weight model to obtain a participle weight corresponding to each of the target participles, and determine a new word cloud based on all of the target participles and all of the participle weights.
[0015] A computer device comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer program, the new word mining method is implemented.
[0016] One or more readable storage media storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, enable the one or more processors to perform the above-mentioned new word mining method.
[0017] The above-mentioned new word mining method, device, equipment and medium, the present invention performs word segmentation processing on each published text through a sliding window, thereby realizing the acquisition of the initial word segmentation of the published text. The perplexity of each of the initial word segmentations is calculated using a preset language model, thereby realizing the evaluation of the fluency between characters. All intermediate word segmentations are screened and processed by preset screening rules, thereby realizing the screening of non-vocabulary, thereby realizing the determination of target word segmentations. Weight processing is performed on each target word segmentation through a weight model, thereby realizing the calculation of word segmentation weights, and then realizing the construction of a new word cloud. Furthermore, the highlighting of key words in the text is realized, thereby realizing the accurate identification of new word mining, thereby improving the efficiency of new word mining. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0019] Figure 1 is a flow chart of a new word mining method in one embodiment of the present invention;
[0020] Figure 2is a flow chart of step S40 of a new word mining method in one embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of the structure of a new word mining device in one embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The new word mining method provided in this embodiment can be applied to Figure 1 In an application environment, a client communicates with a server. The client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0025] In one embodiment, if Figure 1 As shown, a new word mining method is provided, comprising the following steps:
[0026] S10: Obtain published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation.
[0027] Understandably, the preset time period refers to a preset time period from the current time, such as one week, two weeks, etc. The published text refers to an article that has been developed over a period of time, such as a marketing text, etc. The sliding window refers to a window that moves and divides the text with a preset field length.
[0028] Specifically, the current time is obtained, and the published text within the preset time period is obtained according to the current time. For example, if the current time is the 8th, the text published between the 1st and the 7th is obtained. Then, each published text is cut and processed separately through the sliding window, that is, starting from the first character in the published text, the sliding window includes characters of a preset character length, and starts to move at a distance of one character, so as to obtain at least one initial segmentation corresponding to the published text. In this way, by dividing through the above method, at least one initial segmentation corresponding to each published text can be obtained. For example, when the length of the sliding window is 3 characters, the text is divided into 1 to 3, 2 to 4, and 3 to 5. When encountering a paragraph, when the last three characters are divided into a group, the division is stopped, and the division is re-started from the first character of the next paragraph.
[0029] S20, using a preset language model to calculate the perplexity of each of the initial participles, and after deleting the initial participles corresponding to the perplexity less than or equal to the perplexity threshold, determine a participle set; the participle set includes at least one intermediate participle.
[0030] It can be understood that the word segmentation set refers to a set containing all intermediate word segmentations. The intermediate word segmentation refers to the initial word segmentation whose perplexity is greater than the perplexity threshold. The perplexity is used to characterize the fluency of the initial word segmentation, for example, 0.6 to 0.7.
[0031] Specifically, after obtaining the initial participles, a formation test is performed on each initial participle, that is, the fluency of each initial participle is evaluated through a preset language model, so as to calculate the perplexity of each initial participle. Then, the perplexity threshold corresponding to the sliding window of each character length is obtained, and the perplexity of all initial participles of the same character length is compared with the corresponding perplexity threshold, so as to obtain the comparison result corresponding to each initial participle, and when the comparison result indicates that the perplexity is less than or equal to the perplexity threshold, the initial participle is deleted. When the comparison result indicates that the perplexity is greater than the perplexity threshold, the initial participle is retained and determined as an intermediate participle. Then, a participle set is constructed based on all the retained intermediate participles.
[0032] S30: Screen all the middle participles using a preset screening rule to obtain target participles corresponding to the middle participles.
[0033] Understandably, the target segmented words refer to new words in the text after a period of development. The preset screening rules refer to the rules set in advance for screening the intermediate segmented words.
[0034] Specifically, after obtaining the word segmentation set, the preset filtering rules are obtained, and then all the middle word segmentations are first filtered by the character filtering rules in the preset filtering rules, that is, the middle word segmentations that do not meet the character length requirements are deleted. Then, all the filtered word segmentations are deleted by the preset dictionary in the preset filtering rules, that is, whether the middle word segmentations that meet the character length requirements are included in the preset dictionary, and the middle word segmentations that do not include the subset are deleted, so as to obtain the target word segmentation.
[0035] S40, performing weight processing on each of the target participles through a weight model to obtain a participle weight corresponding to each of the target participles, and determining a new word cloud based on all of the target participles and all of the participle weights.
[0036] It can be understood that the weight model refers to a neural network used to calculate the weight of a segmentation word. The segmentation weight refers to the numerical value of the importance of the target segmentation word in the published text.
[0037] Specifically, after obtaining the target participle, the participle frequency of each target participle is counted, that is, the number of times each target participle appears is counted. The participle perplexity of each target participle is calculated, that is, the fluency of each target participle is evaluated through the model. And, the discovery time of each target participle is calculated, that is, the number of days is calculated according to the current time and the storage time in the preset corpus. Then, the weight model is obtained, and the participle frequency, participle perplexity and discovery time are input into the weight model, and the participle frequency, participle perplexity and discovery time corresponding to each target participle are calculated by the relationship learned during the weight model training, so as to obtain the participle weight corresponding to each target participle. Further, a visualization tool is obtained, and all target participles and all participle weights are input into the visualization tool, and the target participle is constructed into a word cloud through the layout algorithm in the visualization tool, and each target participle in the word cloud is rendered through a color label, so as to obtain a new word cloud.
[0038] In an embodiment of the present invention, each published text is segmented by a sliding window, thereby obtaining the initial segmentation of the published text. The perplexity of each initial segmentation is calculated using a preset language model, thereby evaluating the fluency between characters. All intermediate segmentations are screened by preset screening rules, thereby screening non-vocabulary words, thereby determining the target segmentation. Each target segmentation is weighted by a weight model, thereby calculating the segmentation weight, thereby building a new word cloud. Furthermore, the key words in the text are highlighted, thereby accurately identifying new word mining, thereby improving the efficiency of new word mining.
[0039] In one embodiment, in step S10, each of the published texts is segmented by a sliding window to obtain at least one initial segmented word, including:
[0040] Each of the published texts is segmented using sliding windows of different character lengths to obtain at least one initial segmented word corresponding to each sliding window of different character lengths.
[0041] Understandably, the sliding window includes sliding windows of different character lengths, for example, 2 characters, 3 characters, etc. The sliding window corresponds to a maximum character limit value, for example, 7 characters.
[0042] Specifically, after obtaining the published text, a sliding window of different character lengths is obtained, and the published text is segmented in sequence through the sliding windows of different character lengths, that is, the published text is first segmented through a sliding window of 7 characters (i.e., the longest character length), and all the content is divided into a group of 7 characters starting from the first character of the published text, to obtain an initial segmented word of 7 characters corresponding to the sliding window. Then, the initial segmented word of 7 characters is processed for fluency using a preset language model, and the initial segmented word of 7 characters is matched through a preset dictionary. When the initial segmented word of 7 characters meets the basic dictionary in the preset dictionary and is not in the historical new word dictionary in the preset dictionary, and the fluency is greater than the fluency threshold corresponding to the 7-character length, the initial segmented word of 7 characters is collected into the segmented word set, and the initial segmented word of 7 characters is no longer processed for segmentation of other character lengths. When one of the conditions is not met (fluency, basic dictionary, and historical new word dictionary), the segmented word set is not collected.
[0043] Further, the published text is segmented through a sliding window of 6 characters, and all contents in the published text except the initial segmented words of 7 characters in the segmented word set are divided into groups of 6 characters to obtain the initial segmented words of 6 characters corresponding to the sliding window. Then, the initial segmented words of 6 characters are evaluated using a preset language model, and the segmented word set is collected when the conditions are met, and then the segmented words of the next character length are processed until all contents in the published text are segmented or the initial segmented words of 2 characters are evaluated and collected into the segmented word set, and then all the initial segmented words corresponding to the published text can be obtained. Then, the sliding windows of different character lengths are used in turn to perform segmented words on other published texts, so as to obtain all the initial segmented words corresponding to each published text. Among them, the sliding windows of the same maximum character length are used to perform segmented words on all published texts. That is, in this embodiment, the segmented words of each published text are respectively processed through sliding windows of different character lengths, so as to realize the segmentation of the published text, thereby ensuring the integrity of the vocabulary and realizing the acquisition of the initial segmented words.
[0044] In one embodiment, in step S20, the perplexity of each of the initial word segments is calculated using a preset language model, and after deleting the initial word segments corresponding to the perplexity less than or equal to the perplexity threshold, a word segmentation set is determined, including:
[0045] S201, using a preset corpus to determine the occurrence probabilities of characters in the initial word segmentation, and inputting all the occurrence probabilities into a language model to calculate the perplexity corresponding to the initial word segmentation.
[0046] S202, obtaining a perplexity threshold, comparing the perplexity corresponding to the initial word segmentation with the perplexity threshold, and obtaining a comparison result; wherein sliding windows of different character lengths correspond to different perplexity thresholds.
[0047] S203, when the comparison result indicates that the perplexity is less than or equal to the perplexity threshold, the initial participles corresponding to the perplexity less than or equal to the perplexity threshold are deleted, the remaining initial participles are determined as intermediate participles, and a participle set is constructed according to all the intermediate participles.
[0048] Understandably, perplexity refers to the fluency of the initial word segmentation. The preset corpus refers to the vocabulary library set in advance. Sliding windows of different character lengths correspond to different perplexity thresholds.
[0049] Specifically, after obtaining the initial word segmentation, the probability of the first character in the initial word segmentation is statistically calculated through the vocabulary in the preset corpus, so as to obtain the first occurrence probability of the first character. Secondly, the probability of the first character and the second character appearing at the same time is statistically calculated to obtain the second occurrence probability. Then, the probability of the first character, the second character and the third character appearing at the same time is statistically calculated to obtain the third occurrence probability, until the probability of all characters appearing at the same time is statistically calculated. In this way, all occurrence probabilities are calculated, and all occurrence probabilities corresponding to the same initial word segmentation are input into the preset language model, and the perplexity of all occurrence probabilities of the initial word segmentation is calculated through the relationship learned by the preset language model during training, that is, all occurrence probabilities are multiplied to obtain the perplexity corresponding to the initial word segmentation. For example, P(eat grapes) = P(eat)*P(eat|grapes)*P(eat grapes|grapes) means: the probability of "eat" appearing, the probability of "grapes" being followed by "grapes" when "eat" appears, and the probability of "grapes" being followed by "grapes" when "eat grapes" appears are multiplied. In this way, the perplexity of all initial participles is calculated by the above method to obtain the perplexity corresponding to each initial participle.
[0050] Further, the perplexity threshold corresponding to the sliding window of different character lengths is obtained, and the perplexity of the initial word segmentation is compared with the perplexity threshold according to the character length of the initial word segmentation, so as to obtain the comparison result corresponding to each initial word segmentation. Then, when the comparison result indicates that the perplexity is less than or equal to the perplexity threshold, the initial word segmentation corresponding to the perplexity less than or equal to the perplexity threshold is deleted. When the comparison result indicates that the perplexity is greater than the perplexity threshold, the initial word segmentation corresponding to the perplexity greater than the perplexity threshold is retained. Finally, all the remaining initial word segmentations are determined as intermediate word segmentations, and a word segmentation set is constructed according to all the intermediate word segmentations. That is, in this embodiment, the calculation of perplexity is realized by the occurrence probability and the preset language model. By comparing the perplexity with the perplexity threshold corresponding to different character lengths, the initial word segmentation corresponding to the perplexity less than or equal to the perplexity threshold is deleted, thereby realizing the construction of the word segmentation set.
[0051] In one embodiment, in step S30, all the middle participles are screened by a preset screening rule to obtain target participles corresponding to the middle participles, including:
[0052] S301, filtering all the middle participles by using a character filtering rule in a preset filtering rule to obtain at least one filtered participle.
[0053] S302: Deleting all the screening word segments through a preset dictionary in a preset screening rule to obtain at least one target word segment.
[0054] Understandably, the preset filtering rules are used to select the middle participles that meet specific requirements. The character filtering rules refer to filtering the middle participles based on the preset character length. The target participles refer to the middle participles retained by the preset filtering rules. The preset dictionary includes a basic dictionary and a historical new word dictionary.
[0055] Specifically, after obtaining the word segmentation set, the preset screening rules are obtained, and all the middle word segmentations are screened by the character screening rules in the preset screening rules, that is, the preset character length is compared with the character length of all the middle word segmentations, that is, the word segmentation set is traversed, and the middle word segmentations with character lengths less than the preset character length are determined as target word segmentations, and the weight calculation of the weight model is directly performed. The middle word segmentations with character lengths greater than or equal to the preset character length are determined as screening word segmentations.
[0056] Further, each screening word is confirmed as a subset, that is, the basic word of the basic dictionary in the preset dictionary and the historical new word in the historical new word dictionary are matched with the screening word respectively, and each basic word and historical new word are matched in the screening word in turn by prefix tree. When the basic word or historical new word is matched in the screening word, that is, when all the characters in the basic word are successfully matched in the screening word or all the characters in the historical new word are successfully matched in the screening word, the basic word or historical new word is determined as a subset of the screening word. For example, the subset of eating grapes without spitting out the grape skins includes eating grapes or not spitting out the grape skins, etc., wherein the subset is not cut in a published text, but the subset may be cut out in other published texts, and the basic word and historical new word dictionary in the preset dictionary are manually annotated at the same time, and the published text is an article after a period of development. Then, all the screening words are matched, and the screening words that are not matched to the subset are deleted, so that all the remaining screening words are determined as target words. That is, in this embodiment, all the middle participles are screened by character screening rules, thereby realizing the screening of the middle participles, and thus realizing the determination of the screening participles. All the screening participles are deleted by the preset dictionary, thereby realizing the acquisition of the target participles, and then realizing the mining of new words in the published text, and improving the accuracy of new word mining.
[0057] In one embodiment, if Figure 2 As shown, in step S40, weight processing is performed on each target word segmentation through a weight model to obtain a word segmentation weight corresponding to each target word segmentation, including:
[0058] S401, counting all the target participles corresponding to the published texts within a preset time period to determine the participle frequency corresponding to each of the target participles.
[0059] S402, obtaining the word segmentation perplexity corresponding to the target word segmentation from the word segmentation set; the word segmentation perplexity is used to represent the fluency of the characters in the target word segmentation.
[0060] S403, determining the discovery time corresponding to each target word according to the storage time of the target word recorded in the preset corpus; the discovery time refers to the number of days from the storage of the record to the mining.
[0061] S404: Perform weight processing on the word segmentation frequency, the word segmentation perplexity and the discovery time through the weight model to determine the word segmentation weight corresponding to each of the target word segments.
[0062] Understandably, the word frequency refers to the number of times the target word corresponding to the published text within a preset time period appears. The word perplexity is used to characterize the fluency of the target word. The discovery time refers to the number of days from the storage time of the recorded word to the current time. The word weight refers to the importance of the target word in the published text.
[0063] Specifically, after obtaining the target segmentation, the number of times each target segmentation appears in all published texts is counted, that is, the target segmentation is matched with the content of all published texts. Each time the match is successful, the number of occurrences is increased by one, thereby obtaining the segmentation frequency corresponding to each target segmentation. Next, when performing segmentation processing, the perplexity of each initial segmentation, that is, the fluency, is calculated using the preset language model. Therefore, it is only necessary to query the perplexity corresponding to the initial segmentation corresponding to the target segmentation in the segmentation set to obtain the segmentation perplexity corresponding to the target segmentation. Then, the storage time of the target segmentation recorded in the current time and the preset corpus is obtained, and the number of days between the two times is calculated to obtain the discovery time of the target segmentation. Further, a weight model is obtained, and the segmentation frequency, segmentation perplexity and discovery time are input into the weight model. The input segmentation frequency, segmentation perplexity and discovery time are weighted by the relationship learned by the weight model during training, thereby obtaining the segmentation weight corresponding to each target segmentation. That is, in this embodiment, the calculation of the word segmentation frequency, word segmentation perplexity and discovery time of each target word segmentation is realized, and then the calculation of the word segmentation weight of each target word segmentation is realized.
[0064] In one embodiment, in step S40, determining a new word cloud according to all the target segmentations and all the segmentation weights includes:
[0065] S405: construct word clouds for all the target word segments to obtain word clouds to be rendered.
[0066] S406, obtaining a preset color tag set, wherein the preset color tag set includes at least one color tag, and color rendering is performed on the target word in the word cloud to be rendered using all the color tags to obtain a new word cloud.
[0067] Understandably, the word cloud to be rendered refers to a word cloud diagram that has not completed the rendering process. The new word word cloud refers to a word cloud diagram that is composed of new words, has completed the rendering process and is presented in a visual form.
[0068] Specifically, after obtaining the word segmentation weight, a preset visualization tool is obtained, and all target word segments and their corresponding word segmentation weights are input into the visualization tool. Then, through the layout algorithm in the visualization tool, a word cloud is constructed for all target word segments based on the word segmentation weight, that is, each target word segmentation is made to present a different size through the word segmentation weight, thereby obtaining a word cloud to be rendered. For example, a word cloud is generated by using a WordCloud library or a StyleCloud library. Next, a preset color tag set is obtained, and the color tag in the preset color tag set is input into the visualization tool. Through the rendering algorithm in the visualization tool, the target word segmentation in the word cloud to be rendered is rendered based on the color tag, that is, the visualization tool renders each target word segmentation with a corresponding color through a rendering algorithm (that is, a set color rendering method, such as gradient color rendering from the upper left to the lower right), and presents it in a visual way, so as to obtain a new word word cloud. That is, in this embodiment, the word cloud construction of the target word segmentation is realized, thereby realizing the determination of the new word word cloud. Further, the highlighting of key words in the text is realized, thereby realizing the accurate identification of new word mining, thereby improving the efficiency of new word mining.
[0069] In one embodiment, the weight model includes:
[0070] I=C / T×1 / F
[0071] in:
[0072] I represents the weight of word segmentation;
[0073] C represents the perplexity of word segmentation;
[0074] F represents the frequency of participles;
[0075] T represents the word segmentation discovery time.
[0076] Specifically, after obtaining the target word segmentation, the word segmentation frequency, word segmentation confusion and word segmentation discovery time corresponding to the same target word segmentation are calculated, and then the word segmentation frequency, word segmentation confusion and word segmentation discovery time are input into the weight model, and the weight model learns the relationship during training, and the weight of the target word segmentation is calculated according to the word segmentation frequency, word segmentation confusion and word segmentation discovery time, thereby obtaining the word segmentation weight. That is, in this embodiment, the display of the relationship learned by the model is realized, and the determination of the calculation method of the word segmentation weight is realized.
[0077] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0078] In one embodiment, a new word mining device is provided, which corresponds to the new word mining method in the above embodiment. Figure 3 As shown, the new word mining device includes a word segmentation processing module 10, a word segmentation collection module 20, a screening processing module 30 and a word cloud construction module 40. The functional modules are described in detail as follows:
[0079] The word segmentation processing module 10 is used to obtain the published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation;
[0080] A word segmentation set module 20 is used to calculate the perplexity of each of the initial word segments using a preset language model, and determine a word segmentation set after deleting the initial word segments corresponding to the perplexity less than or equal to the perplexity threshold; the word segmentation set includes at least one intermediate word segment;
[0081] A screening processing module 30 is used to screen all the middle participles according to a preset screening rule to obtain a target participle corresponding to the middle participle;
[0082] The word cloud construction module 40 is used to perform weight processing on each of the target participles through a weight model to obtain a participle weight corresponding to each of the target participles, and determine a new word cloud based on all of the target participles and all of the participle weights.
[0083] Optionally, in the word segmentation processing module 10, the sliding window includes sliding windows of different character lengths; including:
[0084] The sliding window unit is used to perform word segmentation processing on each of the published texts through sliding windows of different character lengths to obtain at least one initial word segmentation corresponding to each sliding window of different character lengths.
[0085] Optionally, the word segmentation set module 20 includes:
[0086] A perplexity calculation unit, used to determine the occurrence probability of characters in the initial word segmentation using a preset corpus, and input all the occurrence probabilities into a language model to calculate the perplexity corresponding to the initial word segmentation;
[0087] A perplexity comparison unit, used for obtaining a perplexity threshold, comparing the perplexity corresponding to the initial word segmentation with the perplexity threshold to obtain a comparison result; wherein sliding windows of different character lengths correspond to different perplexity thresholds;
[0088] A word segmentation set unit is used to delete the initial word segmentations corresponding to the perplexity less than or equal to the perplexity threshold when the comparison result represents that the perplexity is less than or equal to the perplexity threshold, determine the remaining initial word segmentations as intermediate word segmentations, and construct a word segmentation set based on all the intermediate word segmentations.
[0089] Optionally, the screening processing module 30 includes:
[0090] A screening processing unit, configured to perform screening processing on all the middle participles according to a character screening rule in a preset screening rule to obtain at least one screening participle;
[0091] The word segmentation deletion unit is used to delete the word segmentations of all the screening word segmentations through a preset dictionary in a preset screening rule to obtain at least one target word segmentation.
[0092] Optionally, the word cloud construction module 40 includes:
[0093] A word segmentation frequency unit, used to count all the target word segments corresponding to the published text within a preset time period to determine the word segmentation frequency corresponding to each target word segmentation;
[0094] A word segmentation perplexity unit, used to obtain the word segmentation perplexity corresponding to the target word segmentation from the word segmentation set; the word segmentation perplexity is used to characterize the fluency of the characters in the target word segmentation;
[0095] A discovery time unit, used to determine the discovery time corresponding to each target word according to the storage time of the target word recorded in the preset corpus; the discovery time refers to the number of days from the storage of the record to the mining;
[0096] A weight processing unit is used to perform weight processing on the word segmentation frequency, the word segmentation confusion and the discovery time through the weight model to determine the word segmentation weight corresponding to each target word segmentation.
[0097] Optionally, the word cloud construction module 40 further includes:
[0098] A word cloud construction unit is used to construct word clouds for all the target word segments to obtain a word cloud to be rendered;
[0099] The color rendering unit is used to obtain a preset color tag set, the preset color tag set includes at least one color tag, and color render the target word in the word cloud to be rendered using all the color tags to obtain a new word cloud.
[0100] Optionally, the weight model further includes:
[0101] I=C / T×1 / F
[0102] in:
[0103] I represents the weight of word segmentation;
[0104] C represents the perplexity of word segmentation;
[0105] F represents the frequency of participles;
[0106] T represents the word segmentation discovery time.
[0107] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer-readable instructions are executed by the processor, a new word mining method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0108] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the above-mentioned new word mining method is implemented.
[0109] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided, and the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The readable storage media store computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the above-mentioned new word mining method is implemented.
[0110] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0111] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0112] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A new word mining method, characterized in that: include: Acquire published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation; Calculating the perplexity of each of the initial participles using a preset language model, and after deleting the initial participles corresponding to the perplexity less than or equal to the perplexity threshold, determining a participle set; the participle set includes at least one intermediate participle; Screening all the middle participles according to a preset screening rule to obtain target participles corresponding to the middle participles; The target participles are weighted by a weight model to obtain a participle weight corresponding to each target participle, and a new word cloud is determined based on all the target participles and all the participle weights.
2. The new word mining method according to claim 1, characterized in that: The sliding window includes sliding windows of different character lengths; The step of performing word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation includes: Each of the published texts is segmented using sliding windows of different character lengths to obtain at least one initial segmented word corresponding to each sliding window of different character lengths.
3. The new word mining method according to claim 1, characterized in that: The method of calculating the perplexity of each of the initial word segments by using a preset language model and determining a word segment set after deleting the initial word segments corresponding to the perplexity less than or equal to the perplexity threshold, comprises: Determine the occurrence probabilities of characters in the initial word segmentation using a preset corpus, and input all the occurrence probabilities into a language model to calculate the perplexity corresponding to the initial word segmentation; Obtaining a perplexity threshold, comparing the perplexity corresponding to the initial word segmentation with the perplexity threshold, and obtaining a comparison result; wherein sliding windows of different character lengths correspond to different perplexity thresholds; When the comparison result indicates that the perplexity is less than or equal to the perplexity threshold, the initial participles corresponding to the perplexity less than or equal to the perplexity threshold are deleted, and the remaining initial participles are determined as intermediate participles, and a participle set is constructed based on all the intermediate participles.
4. The new word mining method according to claim 1, characterized in that: The step of screening all the middle participles by using a preset screening rule to obtain a target participle corresponding to the middle participle includes: Filter all the middle participles by using the character filtering rule in the preset filtering rule to obtain at least one filtered participle; All the screening word segments are deleted through a preset dictionary in the preset screening rule to obtain at least one target word segment.
5. The new word mining method according to claim 1, characterized in that: The weighting process is performed on each target participle by using a weight model to obtain a participle weight corresponding to each target participle, including: Counting all the target participles corresponding to the published texts within a preset time period to determine the participle frequency corresponding to each of the target participles; Acquire the segmentation perplexity corresponding to the target segmentation from the segmentation set; the segmentation perplexity is used to characterize the fluency of the characters in the target segmentation; Determine the discovery time corresponding to each target word according to the storage time of the target word recorded in the preset corpus; the discovery time refers to the number of days from the storage of the record to the mining; The word segmentation frequency, the word segmentation confusion and the discovery time are weighted by the weight model to determine the word segmentation weight corresponding to each target word segmentation.
6. The new word mining method according to claim 1, characterized in that: Determining a new word cloud according to all the target participles and all the participle weights includes: Constructing word clouds for all the target word segments to obtain word clouds to be rendered; A preset color tag set is obtained, wherein the preset color tag set includes at least one color tag, and color rendering is performed on the target word segment in the word cloud to be rendered using all the color tags to obtain a new word cloud.
7. The new word mining method according to claim 1, characterized in that: The weight model comprises: I=C / T×1 / F in: I represents the weight of word segmentation; C represents the perplexity of word segmentation; F represents the frequency of participles; T represents the word segmentation discovery time.
8. A new word mining device, characterized in that: include: A word segmentation processing module is used to obtain published texts within a preset time period, and perform word segmentation processing on each of the published texts through a sliding window to obtain at least one initial word segmentation; A word segmentation set module, used to calculate the perplexity of each of the initial word segments using a preset language model, and determine a word segmentation set after deleting the initial word segments corresponding to the perplexity less than or equal to the perplexity threshold; the word segmentation set includes at least one intermediate word segmentation; A screening processing module, used to screen all the middle participles according to preset screening rules to obtain target participles corresponding to the middle participles; The word cloud construction module is used to perform weight processing on each of the target participles through a weight model to obtain a participle weight corresponding to each of the target participles, and determine a new word cloud based on all of the target participles and all of the participle weights.
9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the new word mining method according to any one of claims 1 to 7 is implemented.
10. One or more computer-readable storage media storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the new word mining method according to any one of claims 1 to 7.
