New technology word discovery method and related equipment for public opinion text
By using technical word entity extraction model and vectorization technology in public opinion text, deduplication is solved based on cosine similarity and editing distance, the problem of sparse data and low accuracy in new technical word discovery is improved, and the discovery of new technical word accuracy.
Patent Information
- Application Number
- CN202411287782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-14
AI Technical Summary
The existing technology has problems of sparse data and low accuracy in the discovery of new technical words, which leads to insufficient accuracy in the discovery of new technical words in public opinion text.
By obtaining public opinion text and old technical word thesaurus, using the technical word entity extraction model to extract technical word entities, and vectorize old technical word and technical word entities, deduplication based on cosine similarity and editing distance, and extracting new technologies word.
It improves the accuracy and practicality of discovery of new technical words in public opinion texts, and effectively unearths new technical words in public opinion texts.
Smart Images

Figure CN118798190B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and specifically to a method for discovering new technical terms in public opinion texts and related equipment. Background Art
[0002] With the development and popularization of the Internet, more and more people are obtaining and sharing information and opinions about related industries or fields through Internet platforms. For example, people can share their experiences, problems, and help information in related industries or fields through forums, social media, news media, blogs, Weibo, etc. This will involve a large number of technical terms, and these technical terms often represent the dimensions that people pay attention to. In order to promote the technological development of related industries or fields, text mining can be used to discover new technical terms to understand the technical dimensions that people are concerned about, so as to understand the technological development trends or provide practitioners with better and more accurate technical support.
[0003] In the related art, when discovering new technical terms, it is usually based on statistical methods. The statistical method is to extract new technical terms by using various statistical strategies. It requires large-scale corpus for training, and there are problems of data sparsity and low accuracy. Therefore, in the related art, it is urgent to provide a method for discovering new technical terms in public opinion texts to improve the accuracy of discovering new technical terms in public opinion texts. Summary of the invention
[0004] In view of this, multiple embodiments of this specification are dedicated to providing a method and related equipment for discovering new technical terms in public opinion texts to improve the accuracy of discovering new technical terms in public opinion texts.
[0005] The embodiment of the present specification provides a method for discovering new technical terms in public opinion text, the method comprising: obtaining a public opinion text to be discovered and an old technical word vocabulary; inputting the public opinion text into a technical word entity extraction model to obtain a technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes technical word entities; the technical word entity extraction model is obtained in advance by training a general information extraction model based on technical word entity annotation data annotated with technical word tags; vectorizing the old technical words and the technical word entities in the old technical word vocabulary respectively to obtain the old word vector of the old technical word and the entity vector of the technical word entity; determining that the technical word entity is a synonym of the old technical word when the cosine similarity between the old word vector and the entity vector is greater than or equal to a first similarity threshold and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to a second similarity threshold; performing semantic similarity deduplication on the technical word entity extraction result according to the synonym to obtain a new technical word extraction result.
[0006] In some embodiments, the technical word entity extraction result also includes the confidence of the technical word entity, and the confidence indicates the reliability of the technical word entity; the deduplication of the technical word entity extraction result based on the synonyms includes: determining a technical word entity set based on the technical word entity extraction result; wherein the technical word entity set includes technical word entities in the technical word entity extraction result whose confidence is greater than or equal to a confidence threshold; wherein the synonyms are determined based on the technical word entities in the technical word entity set; and deduplication of the technical word entity set based on the synonyms to obtain the new technical word extraction result excluding the old technical words.
[0007] In some embodiments, the method includes: obtaining a root library and a public opinion text sample to be annotated; performing word segmentation on the public opinion text sample to obtain a word sequence of the public opinion text sample; determining candidate technical words based on splicing the words in the word sequence and the roots in the root library; annotating the public opinion text sample with the technical word labels determined based on the candidate technical words to obtain the technical word entity annotation data; and using the technical word entity annotation data to perform model training on a general information extraction model to obtain the technical word entity extraction model.
[0008] In some embodiments, the determining of candidate technical words based on the splicing of words in the word sequence and roots in the root library includes: taking the roots in the root library as the current roots in turn, and determining the information entropy of the current roots; wherein the information entropy reflects the possibility of the roots forming independent words; taking the words adjacent to the current root in the word sequence as candidate spliced words, and determining the association between the current root and the candidate spliced words; wherein the association reflects the possibility of splicing the roots and words into words; if the information entropy and the association meet the splicing conditions, splicing the candidate technical words according to the current root and the candidate spliced words, and adding the spliced candidate technical words as new roots to the root library.
[0009] In some embodiments, the root library includes a prefix root library, an infix root library, and a suffix root library; the candidate concatenated words adjacent to the current root in the word sequence include candidate concatenated words adjacent to the current root in the backward direction, and candidate concatenated words adjacent to the current root in the forward direction; the step of concatenating the current root and the candidate concatenated words to obtain the candidate technical words includes: when the current root is a prefix root in the prefix root library, concatenating the candidate concatenated words adjacent to the current root in the backward direction after the current root to obtain the candidate technical words based on the backward concatenation of the current root. word; and / or, in the case where the current root is a suffix root in the suffix root library, the forward adjacent candidate concatenated words are concatenated before the current root to obtain the candidate technical words based on the forward concatenation of the current root; and / or, in the case where the current root is an infix root in the infix root library, the backward adjacent candidate concatenated words are concatenated after the current root to obtain the candidate technical words based on the backward concatenation of the current root, and at the same time, the forward adjacent candidate concatenated words are concatenated before the current root to obtain the candidate technical words based on the forward concatenation of the current root.
[0010] In some embodiments, the method further includes: performing part-of-speech tagging on the public opinion text sample to obtain a part-of-speech sequence of the public opinion text sample; wherein the part-of-speech sequence includes the parts of speech corresponding to the words in the word sequence; and screening the candidate technical words based on the parts of speech in the part-of-speech sequence to obtain the technical word label of the public opinion text sample to annotate the public opinion text sample.
[0011] The embodiment of the present specification provides a device for discovering new technical terms in public opinion texts, the device comprising: a first acquisition module, used to acquire the public opinion text to be discovered and the old technical word library; an entity extraction module, used to input the public opinion text into a technical word entity extraction model, and obtain the technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes technical word entities; the technical word entity extraction model is obtained in advance by training a general information extraction model based on technical word entity annotation data annotated with technical word tags; a vectorization module, used to respectively extract the technical word entities in the old technical word library; The old technical word and the technical word entity are vectorized to obtain the old word vector of the old technical word and the entity vector of the technical word entity; a similarity determination module is used to determine that the technical word entity is a synonym of the old technical word when the cosine similarity between the old word vector and the entity vector is greater than or equal to a first similarity threshold and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to a second similarity threshold; a similarity deduplication module is used to perform semantic similarity deduplication on the technical word entity extraction result according to the synonym to obtain a new technical word extraction result.
[0012] An embodiment of this specification provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for discovering new technical terms in public opinion text described in any of the above embodiments is implemented.
[0013] An embodiment of this specification provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for discovering new technical terms in public opinion text described in any of the above embodiments is implemented.
[0014] An embodiment of the present specification provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, a new technical term discovery method as described in any of the above embodiments is implemented.
[0015] In multiple implementations provided in this specification, a technical word entity extraction model is pre-deployed, and the technical word entity extraction model is obtained by training a general information extraction model based on technical word entity annotation data marked with technical word tags. Then, the public opinion text and the old technical word vocabulary are obtained, and the public opinion text is input into the technical word entity extraction model to obtain a technical word entity extraction result including the technical word entity, and the old technical words and technical word entities in the old technical word vocabulary are vectorized respectively to obtain the old word vector of the old technical word and the entity vector of the technical word entity; then, the cosine similarity between the old word vector and the entity vector is calculated, and the edit distance similarity between the old technical word and the technical word entity is calculated. When the cosine similarity is greater than or equal to the first similarity threshold, and the edit distance similarity is greater than or equal to the second similarity threshold, it is determined that the technical word entity is a synonym of the old technical word, and the semantic similarity of the technical word entity extraction result is deduplicated according to the synonym to obtain a new technical word extraction result. In this way, the new technical words in the public opinion text can be effectively mined, and the accuracy of new technical word discovery in the public opinion text can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a method for discovering new technical terms in public opinion text provided in the implementation mode of this specification;
[0017] Figure 2 A flowchart of a model training method provided in an embodiment of this specification;
[0018] Figure 3 Schematic diagram of the relationship between the minimum confidence threshold and the F1 value;
[0019] Figure 4 is a schematic diagram of the relationship between the first similarity threshold and the F1 value;
[0020] Figure 5 is a schematic diagram of the relationship between the second similarity threshold and the F1 value;
[0021] Figure 6 A schematic diagram of a method for discovering new technical terms in public opinion text provided in the implementation mode of this specification;
[0022] Figure 7 A schematic diagram of a new technical word discovery device for public opinion text provided in an embodiment of this specification;
[0023] Figure 8 A schematic diagram of a computer device provided for embodiments of the present specification. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of this specification, the technical solution in the implementation of this specification will be clearly and completely described below in conjunction with the drawings in the implementation of this specification. Obviously, the described implementation is only a part of the implementation of this specification, not all of the implementations. Based on the implementation in this specification, all other implementations obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0025] With the development and popularization of the Internet, more and more people choose to communicate and interact through Internet platforms such as Internet forums, social media, news media, blogs, and Weibo. For example, they share experiences, post questions or seek help for a certain industry or field. Therefore, practitioners in related industries or fields can monitor and analyze public opinion on Internet platforms, so as to quickly understand new technologies in related industries or more fully understand new technologies that people are concerned about, so as to promote the development of related industries.
[0026] However, in the process of using statistical or rule-based methods in related technologies to conduct text mining to discover new technical terms, there are problems such as sparse data, low accuracy, high consumption of manpower and material resources, or poor portability.
[0027] The implementation methods of this specification provide a scenario example of a method for discovering new technical terms in public opinion text. In this scenario example, the public opinion text can be articles, posts, comments, opinions, shared experiences, posted questions or help information in related fields or related industries obtained from Internet platforms such as Internet forums, social media, news media, blogs, and Weibo.
[0028] In order to more clearly understand the technical solutions in the implementation manner of this specification, the following description is given using the automotive field as an example, that is, the public opinion text may be an automotive public opinion text.
[0029] Automotive public opinion texts can be obtained through automotive forums, social media, news media, blogs, Weibo and other Internet platforms. For example, as an important automotive community, automotive forums provide a platform for communication and interaction for a large number of automotive enthusiasts. In automotive forums, users can share their car usage experience, ask questions, seek help, etc. These contents involve a large number of automotive technical terms. Practitioners in the automotive field often need to pay attention to these technical terms in the automotive field, especially newly emerging technical terms, because these technical terms often represent the dimensions of concern of the poster. Therefore, the discovery and mining of new technical terms in the automotive field can help practitioners in the automotive field to understand the new technologies of related automotive brands or car series more quickly and accurately, and understand the new technologies that forum users are concerned about more comprehensively and accurately, thereby promoting the development of the automotive industry.
[0030] It is understandable that the public opinion text can also be public opinion text in other fields, for example, public opinion text in consumer electronics such as mobile phones, computers, and tablet computers. Of course, it can also be public opinion text in other fields, which is not limited here.
[0031] This specification provides a method for discovering new technical terms in public opinion texts. Figure 1 , Figure 1 It is a flowchart of a method for discovering new technical terms in public opinion texts provided by this embodiment. This embodiment provides method operation steps as shown in the flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The sequence of steps listed in the embodiment is only one execution method among many step execution sequences and does not represent the only execution sequence. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment. Specifically, Figure 1 As shown, the method for discovering new technical terms in public opinion text may include the following steps.
[0032] Step S110: Obtain the public opinion text to be discovered and the old technical word library.
[0033] In some cases, technical terms extracted based on public opinion texts may often be too similar or duplicated with existing old technical terms. Therefore, an old technical term library can be obtained to perform similarity removal based on the old technical terms in the old technical term library.
[0034] Specifically, the public opinion text can be obtained from Internet platforms such as online forums, online communities, social media, news media, blogs or microblogs. The number of public opinion texts can be one or more.
[0035] Specifically, the public opinion text can be preprocessed to obtain the preprocessed public opinion text, or in other words, the obtained public opinion text is the preprocessed public opinion text. Exemplarily, the preprocessing can be used to remove duplicate data and blanks in the public opinion text, and can also be used to convert traditional Chinese characters into simplified Chinese characters, convert uppercase and lowercase English letters, restore English word forms, etc. Among them, the blanks in the text can refer to multiple consecutive spaces, tabs, line breaks, or carriage returns, etc., and English word form restoration can refer to the process of restoring different word forms of English words (such as plural nouns, verb tenses, comparative and superlative adjectives, etc.) to their basic forms or roots.
[0036] Exemplarily, the old technical word library can be obtained by combing the existing technical word library.
[0037] Step S120: input the public opinion text into the technical word entity extraction model to obtain the technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes technical word entities; the technical word entity extraction model is obtained in advance by training the general information extraction model based on the technical word entity annotation data annotated with technical word tags.
[0038] In some cases, a trained technical word entity extraction model may be pre-deployed to perform reasoning services in the reasoning environment. The technical word entity extraction model is trained based on technical word entity annotation data, and the technical word entity annotation data is annotated with technical word labels, or the labels of the technical word entity annotation data are technical word labels.
[0039] Specifically, the acquired one or more public opinion texts can be used as inputs of the reasoning service to obtain technical word entity extraction results related to each public opinion text. The technical word entity extraction results of each public opinion text at least include technical word entities.
[0040] Exemplarily, the technical word entity extraction result may also include the location information of the technical word entity, and the location information may be used to describe the location of the technical word entity in the public opinion text, or in other words, the location information may associate the technical word entity with the public opinion text.
[0041] As an example, the public opinion text content can be: {“content”: “This car is equipped with a 4D millimeter-wave radar. In addition to the ability to detect three parameters: distance, horizontal angle and speed, it also adds height information of the pitch angle, and the perception accuracy is also greatly improved.”}.
[0042] The public opinion text content is input into the pre-deployed technical word entity extraction model, or in other words, into the online interface of the reasoning service to obtain the technical word entity extraction result of the public opinion text content. The technical word entity extraction result can be: [{'technical word entity': [{'text': 4D millimeter wave radar, 'start': 6, 'end': 13}]}]. Among them, text represents the technical word entity, and start and end represent the location information of the technical word entity text.
[0043] By inputting multiple public opinion texts, that is, all incremental public opinion texts, into the technical word entity extraction model in sequence, a technical word entity extraction result set of multiple public opinion texts or all incremental public opinion texts can be obtained. By parsing the technical word entity extraction result set, the technical word entity text of each public opinion text can be obtained. Exemplarily, the parsing can be performed based on the position information of the technical word entity in the technical word entity extraction result.
[0044] It is understandable that the number of technical word entities text in each public opinion text may be 0, 1 or more.
[0045] Specifically, the universal information extraction model, that is, the unified framework of universal information extraction (UIE), can be fine-tuned and trained using few-shot learning to obtain a technical word entity extraction model that is suitable for extracting technical word entities from public opinion texts.
[0046] Step S130: vectorizing the old technical words and technical word entities in the old technical word database respectively to obtain old word vectors of the old technical words and entity vectors of the technical word entities.
[0047] In some cases, since the extracted technical word entities may be too similar or repeated with the old technical words in the existing old technical word database, in order to reduce the similarity between the technical word entities and the old technical words, or to better mine new technical words from public opinion texts and improve the accuracy and practicality of new technical word discovery, the extracted technical word entities and old technical words can be vectorized separately, and the cosine similarity can be calculated based on the vectorized word embedding representation (WordEmbedding), so as to deduplicate the technical word entities based on the cosine similarity.
[0048] Among them, the old technical words are represented by vectorized word embedding, that is, the word vector of the old technical words, recorded as the old word vector. The technical word entity is represented by vectorized word embedding, that is, the word vector of the technical word entity, recorded as the entity vector.
[0049] Exemplarily, any one of BERT, ERNIE or RoBERTa language models can be pre-trained, and based on any one of the pre-trained BERT, ERNIE or RoBERTa language models, each technical word entity and each old technical word in the old technical word vocabulary is vectorized to obtain the word embedding representation WordEmbedding of the technical word entity and the old technical word, wherein the word embedding representation WordEmbedding of the technical word entity is an entity vector, and the word embedding representation WordEmbedding of the old technical word is an old word vector.
[0050] Step S140: when the cosine similarity between the old word vector and the entity vector is greater than or equal to the first similarity threshold, and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to the second similarity threshold, it is determined that the technical word entity is a synonym of the old technical word.
[0051] For example, cosine similarity is to evaluate the similarity between the old word vector and the entity vector by calculating the cosine value of the angle between the old word vector and the entity vector in the vector space. Edit distance similarity can be used to measure the subword or string-level similarity between the old technical word and the technical word entity.
[0052] Among them, the larger the cosine similarity between the old word vector and the entity vector is or the closer it is to 1, the more similar the old technical word is to the technical word entity; the larger the edit distance similarity between the old technical word and the technical word entity is or the closer it is to 1, the more similar the old technical word is to the technical word entity.
[0053] Specifically, for any old technical word and any technical word entity, the cosine similarity between the old word vector of the old technical word and the entity vector of the technical word entity can be determined. When the cosine similarity is greater than or equal to a first similarity threshold, the technical word entity is determined to be a candidate synonym of the old technical word, and the edit distance similarity between the candidate synonym and the old technical word is further determined. When the edit distance similarity is greater than or equal to a second similarity, the candidate synonym is determined to be a synonym of the old technical word.
[0054] Step S150: Deduplication of the technical word entity extraction results based on semantic similarity according to synonyms to obtain new technical word extraction results.
[0055] Exemplarily, after determining that the technical word entity is a synonym, or after determining that the technical word entity is a synonym of any old technical word in the old technical word database, the technical word entity can be regarded as an old technical word and excluded to obtain a new technical word extraction result.
[0056] In the above implementation, a technical word entity extraction model is pre-deployed to train a general information extraction model based on technical word entity annotation data marked with technical word tags, and the public opinion text is input into the technical word entity extraction model to obtain a technical word entity extraction result including technical word entities in the public opinion text. Then, the old technical words and technical word entities in the old technical word vocabulary are vectorized respectively to obtain the old word vectors of the old technical words and the entity vectors of the technical word entities. Then, when the cosine similarity between the old word vector and the entity vector is greater than or equal to the first similarity threshold, if the edit distance similarity between the old technical word and the technical word entity is greater than or equal to the second similarity threshold, the technical word entity is excluded for deduplication to obtain a new technical word extraction result. In this way, the new technical words in the public opinion text can be effectively mined to improve the accuracy and practicality of new technical word discovery in the public opinion text.
[0057] In some implementations, the technical word entity extraction result may further include the confidence of the technical word entity, where the confidence indicates the reliability of the technical word entity.
[0058] For example, continue to take the public opinion text content as an example, input the public opinion text content into the pre-deployed technical word entity extraction model, and obtain the technical word entity extraction result of the public opinion text content as follows: [{'technical word entity': [{'text': 4D millimeter wave radar, 'start': 6, 'end': 13, 'probability': 0.9976811457953545}]}]. Among them, probability represents confidence.
[0059] In this embodiment, deduplication of semantic similarity of technical word entity extraction results is performed according to synonyms, which may include the following steps S210-S220.
[0060] Step S210: determining a technical word entity set based on the technical word entity extraction result; wherein the technical word entity set includes technical word entities in the technical word entity extraction result whose confidence is greater than or equal to a confidence threshold; wherein synonyms are determined based on the technical word entities in the technical word entity set.
[0061] Exemplarily, multiple public opinion texts or all incremental public opinion texts are sequentially input into the technical word entity extraction model, so that a set of technical word entity extraction results of multiple public opinion texts or all incremental public opinion texts can be obtained. Then, each technical word entity extraction result in the technical word entity extraction result set is parsed according to the position information, so that one or more technical word entity texts of each public opinion text can be obtained. Then, for the technical word entity texts of all incremental public opinion texts, the technical word entity texts below the confidence threshold are filtered out to obtain the technical word entity set TechnicalSet.
[0062] Step S220: Deduplication of the technical word entity set based on semantic similarity is performed on the synonyms to obtain a new technical word extraction result excluding old technical words.
[0063] Exemplarily, after obtaining the technical word entity set TechnicalSet, the technical word entities in the technical word entity set TechnicalSet can be vectorized to obtain the entity vector of each technical word entity in the technical word entity set TechnicalSet, and then the cosine similarity between the old word vector of each old technical word in the old technical word vocabulary and the entity vector of each technical word entity in the technical word entity set TechnicalSet is determined. If the cosine similarity between any old word vector and any entity vector is greater than or equal to the first similarity threshold, it means that the technical word entity corresponding to the entity vector is a candidate synonym of the old technical word corresponding to the old word vector. Then, the edit distance similarity between the old technical word and the candidate synonym is determined. If the edit distance similarity is greater than or equal to the second similarity threshold, it means that the candidate synonym is a synonym of the old technical word and needs to be excluded. After determining and excluding whether each technical word entity in the technical word entity set TechnicalSet is a synonym of the old technical word vocabulary, a new technical word extraction result excluding the old technical words can be obtained.
[0064] For example, after obtaining the new technical word extraction results, the new technical word extraction results can be input into the old technical word library so that the old technical words can be excluded in the next analysis, or in the next new technical word discovery task in the public opinion text, so as to improve the effectiveness and practicality of the new technical word discovery in the public opinion text.
[0065] In some implementations, the cosine similarity between the old word vector of the old technical word and the entity vector of the technical word entity may be determined by Formula 1.
[0066] Formula 1
[0067] in, Represents the technical word entity in the technical word entity set TechnicalSet The entity vector of Indicates old technical terms in the old technical terms dictionary The old word vector of Represents entity vector The old word vector The cosine similarity between . express and The inner product of express and The product of the vector norms of .
[0068] In some embodiments, the edit distance similarity between the old technical word and the technical word entity can be determined in the following manner: determining the edit distance between the old technical word and the technical word entity; determining the edit distance similarity based on the edit distance and the maximum length; wherein the maximum length represents the maximum length of characters in the old technical word and the technical word entity.
[0069] The edit distance may represent a measure of the difference between the old technical word and the technical word entity, or the edit distance may refer to the minimum number of single-character edits required to convert one of the technical word entity and the old technical word into the other. The single-character edit may be the insertion, deletion or replacement of a single character.
[0070] Exemplarily, the edit distance similarity may be determined by Formula 2.
[0071] Formula 2
[0072] in, Represents the technical word entity in the technical word entity set TechnicalSet Old technology words in the word library The edit distance between Represents technical word entity word with old technology The maximum length of characters in, or in other words, representing a technical word entity The character length of the old technical word The maximum length of characters in the character length; Represents technical word entity word with old technology The edit distance similarity between them.
[0073] In some embodiments, the method for discovering new technical terms in public opinion texts may also include a model training method for extracting technical term entity models, see Figure 2 , the model training method may include the following steps.
[0074] Step S310: Obtain a word root library and a public opinion text sample to be annotated.
[0075] In some cases, in order to obtain a technical word entity extraction model suitable for extracting technical word entities from public opinion texts, the public opinion text samples to be annotated can be used to mine the roots in the root library to determine the technical word labels, and then the technical word labels are annotated on the public opinion text samples to be annotated to obtain technical word entity annotation data for model training.
[0076] For example, the public opinion text samples to be annotated may be obtained from a public opinion corpus. The public opinion text samples in the public opinion corpus are obtained and stored from Internet platforms such as online forums, online communities, social media, news media, blogs, or microblogs at historical moments.
[0077] The number of public opinion text samples to be annotated may be one or more, or in other words, the number of public opinion text samples to be annotated in the public opinion corpus includes at least one.
[0078] Exemplarily, the public opinion text sample to be annotated may be preprocessed to obtain a preprocessed public opinion text sample. Exemplarily again, the acquired public opinion text sample or the public opinion text sample in the public opinion corpus may be preprocessed. Preprocessing may be used to remove duplicate data and blanks in the public opinion text sample, and may also be used to perform traditional Chinese to simplified Chinese conversion, English letter uppercase to lowercase conversion, English word morphology restoration, and the like.
[0079] Specifically, the root word library, that is, the root word library of the seed technical words, includes one or more root words. The root words in the root word library can be morphemes that represent the meaning of basic concepts. The root words can be independent words or can be combined with other words to form a word.
[0080] Step S320: Perform word segmentation processing on the public opinion text sample to obtain a word sequence of the public opinion text sample.
[0081] Specifically, each public opinion text sample in the public opinion corpus can be segmented based on the set word segmentation system to obtain the word sequence of each public opinion text sample, so that a word sequence set can be obtained, and the word sequence set includes the word sequence of each public opinion text sample. Among them, the set word segmentation system can be any one of the ICTCLAS system (Institute of Computing Technology, Chinese Lexical Analysis System) of the Chinese Academy of Sciences, the HTTPCWS system based on the HTTP protocol, or the PhpanAlysis system based on string matching.
[0082] Exemplarily, each word sequence may include one or more words.
[0083] Step S330: Determine candidate technical terms based on the words in the word sequence and the roots in the root library.
[0084] In some cases, the technical words obtained by splicing the words in the word sequence of the word sequence set and the roots in the root library may not be suitable as technical word labels. For example, some useless technical words such as auxiliary words and modal particles, etc. Therefore, the technical words obtained by splicing the words in the word sequence and the roots in the root library can be used as candidate technical words to determine whether they are suitable as technical word labels again.
[0085] Specifically, based on the words in each word sequence in the word sequence set, the word roots in the word root library can be mined to obtain the spliced candidate technical words. That is, it is possible to analyze and determine whether each word root in the word root library and the words adjacent to the word root in the word sequence can be spliced into a word. If they can be spliced into a word, the two are spliced to obtain the spliced candidate technical words. In this way, a set of candidate technical words corresponding to the word sequence set can be obtained.
[0086] Step S340: annotate the public opinion text sample with the technical word label determined based on the candidate technical words to obtain technical word entity annotation data.
[0087] Specifically, for each candidate technical word in the candidate technical word set, whether the candidate technical word is suitable as a technical word label can be analyzed and determined. If suitable, the candidate technical word is used as a technical word label to annotate the corresponding public opinion text sample, thus obtaining technical word entity annotation data.
[0088] Step S350: Use the technical word entity annotation data to perform model training on the general information extraction model to obtain a technical word entity extraction model.
[0089] Specifically, the universal information extraction model, i.e., the UIE model, is used as a pre-training model. Fine-tuning the UIE model using technical word entity annotation data can achieve few-sample learning and obtain a technical word entity extraction model that is suitable for extracting technical word entities from public opinion texts.
[0090] In the above implementation, the public opinion text sample is segmented to obtain a word sequence, and the words in the word sequence and the roots in the root library are spliced to determine candidate technical words, thereby solving the cold start problem of new technical word discovery in the public opinion text. Next, the public opinion text sample is annotated with the technical word labels determined based on the candidate technical words to obtain technical word entity annotation data. Next, the general information extraction model is trained using the technical word entity annotation data to obtain a trained technical word entity extraction model.
[0091] In some implementations, determining candidate technical words based on the concatenation of words in the word sequence and roots in the root library may include the following steps S410 - S430 .
[0092] Step S410: taking the roots in the root library as the current root in turn, and determining the information entropy of the current root; wherein the information entropy reflects the possibility of the root forming an independent word.
[0093] Specifically, the word roots in the word root library may be traversed, and the word roots in the word root library may be used as the current word roots in sequence.
[0094] For example, the smaller the information entropy of the current word root is, the smaller the possibility that the current word root can be combined with other words to form a word is, and the smaller the possibility that the current word root can be formed into an independent word is.
[0095] Step S420: taking the words adjacent to the current root in the word sequence as candidate concatenated words of the current root, and determining the association between the current root and the candidate concatenated words; wherein the association reflects the possibility of concatenating the root and the words into a word.
[0096] Specifically, each word sequence in the word sequence set can be traversed, and words adjacent to the current root in each word sequence can be found to be used as candidate concatenated words for the current root. Exemplarily, the words adjacent to the current root in the word sequence include words adjacent to the front direction and words adjacent to the back direction. In other words, the candidate concatenated words for the current root in the word sequence can include candidate concatenated words adjacent to the current root in the back direction and candidate concatenated words adjacent to the current root in the front direction.
[0097] For example, the relevance may refer to pointwise mutual information (PMI), that is, the semantic similarity between two words, that is, the probability of two words appearing at the same time. The greater the probability, the closer the relevance.
[0098] Step S430: If the information entropy and the relevance meet the splicing condition, the current root and the candidate splicing words are spliced to obtain a candidate technical word, and the spliced candidate technical word is added to the root library as a new root.
[0099] Specifically, the splicing condition may include a minimum correlation threshold and a maximum information entropy threshold.
[0100] Exemplarily, information entropy and association satisfying the splicing condition may mean that the information entropy of the current root word is less than or equal to a maximum information entropy threshold, and the association between the current root word and the candidate splicing word is greater than or equal to a minimum association threshold.
[0101] Exemplarily, if the information entropy of the current root and the correlation between the current root and the candidate concatenated words meet the concatenation condition, the current root and the candidate concatenated words can be concatenated, and then the new word obtained by concatenation is used as the new root, and the above concatenation process is repeated until the concatenation condition is not met, then the concatenation is terminated, and the candidate technical word is obtained. For example, after a new root is obtained by concatenating the current root, the information entropy of the new root and the correlation between the new root and the candidate concatenated words of the new root are calculated, and it is determined whether the concatenation condition is met. If it is met, the concatenation process continues, and if it is not met, the concatenation is terminated to obtain the candidate technical word of the current root.
[0102] In some implementations, the root word library may include a prefix root word library, an infix root word library, and a suffix root word library.
[0103] The prefix root library includes one or more prefix roots, which can be used for backward splicing, that is, splicing with adjacent words after the prefix root. The suffix root library includes one or more suffix roots, which can be used for forward splicing, that is, splicing with adjacent words before the suffix root. The infix root library includes one or more infix roots, which can be used for bidirectional splicing, that is, splicing with adjacent words after the infix root, and splicing with adjacent words before the infix root.
[0104] In this embodiment, the process of obtaining the candidate technical words by concatenating the current root word and the candidate concatenated words may include the following steps S510-S530.
[0105] Step S510: when the current root is a prefix root in the prefix root library, concatenate backward adjacent candidate concatenated words after the current root to obtain candidate technical words based on the backward concatenation of the current root; and / or,
[0106] Step S520: when the current root is a suffix root in the suffix root library, concatenate the candidate concatenated words that are adjacent to the current root to obtain a candidate technical word that is concatenated forward based on the current root; and / or,
[0107] Step S530: When the current root is an infix root in the infix root library, the candidate concatenated words that are adjacent to the current root are concatenated backward to obtain the candidate technical words based on the current root. At the same time, the candidate concatenated words that are adjacent to the current root are concatenated forward to obtain the candidate technical words based on the current root.
[0108] The following is an example of the current root being a prefix root in the prefix root library. For any prefix root in the prefix root library and the candidate splicing words of the prefix root, first, determine the information entropy of the prefix root, and determine the correlation between the prefix root and the backward adjacent candidate splicing words. Then, determine whether the information entropy and the correlation meet the splicing conditions. If so, the prefix root and the backward adjacent candidate splicing words can be backward spliced. Then, the spliced new words are used as new roots, and the above splicing process is repeated until the splicing conditions are not met, then the splicing is terminated, and the candidate technical words are obtained. For example, after the new root is obtained by backward splicing based on the prefix root as the current root, the information entropy of the new root, the correlation between the new root and the backward adjacent candidate splicing words of the new root are calculated, and it is determined whether the splicing conditions are met. If so, the splicing process continues, and if not, the splicing is terminated to obtain the candidate technical words of the current root.
[0109] Exemplarily, the information entropy of the prefix root can be determined by Formula 3.
[0110] Formula 3
[0111] in, Indicates a prefix root, represents the information entropy of the prefix root, is the set of suffix words of the prefix root in the public opinion corpus. As an example, the set of suffix words of the prefix root in the public opinion corpus may refer to the set of suffix words of the prefix root in the public opinion corpus when the prefix root appears in the public opinion corpus.
[0112] For example, the correlation between the prefix root and the backward adjacent candidate concatenated words can be determined by Formula 4.
[0113] Formula 4
[0114] in, represents the backward adjacent candidate concatenation words, Indicates the correlation between the prefix root and the backward adjacent candidate concatenated words, represents the probability of the prefix root and the backward adjacent candidate concatenation words appearing simultaneously in the public opinion corpus, represents the probability of the prefix root appearing in the public opinion corpus, Represents the probability of the backward adjacent candidate concatenation words appearing in the public opinion corpus.
[0115] Similarly, if the current root is a suffix root in the suffix root library, then for any suffix root in the suffix root library and the candidate splicing words of the suffix root, first, determine the information entropy of the suffix root, and determine the correlation between the suffix root and the forward adjacent candidate splicing words, then determine whether the information entropy and the correlation meet the splicing conditions, if the information entropy and the correlation meet the splicing conditions, then the suffix root and the forward adjacent candidate splicing words can be forward spliced, and then, the spliced new words are used as new roots, and the above splicing process is repeated until the splicing conditions are not met, then the splicing is terminated, and the candidate technical words are obtained. It can be understood that the information entropy of the suffix root can be determined based on the prefix word set of the suffix root in the public opinion corpus.
[0116] Similarly, if the current word root is an infix word root in the infix word root library, then for any infix word root in the infix word root library and the candidate concatenated words of the infix word root, first, determine the information entropy of the infix word root, and determine the correlation between the infix word root and the forward / backward adjacent candidate concatenated words, wherein the first information entropy of the infix word root can be determined based on the prefix word set of the infix word root in the public opinion corpus, and the second information entropy of the infix word root can be determined based on the suffix word set of the infix word root in the public opinion corpus, and then determine whether the first information entropy and the correlation degree of the forward adjacent candidate concatenated words meet The splicing condition is determined, and whether the correlation between the second information entropy and the backward adjacent candidate splicing word meets the splicing condition. If the correlation between the first information entropy and the forward adjacent candidate splicing word meets the splicing condition, the infix root and the forward adjacent candidate splicing word are forward spliced. If the correlation between the second information entropy and the backward adjacent candidate splicing word meets the splicing condition, the infix root and the backward adjacent candidate splicing word are backward spliced. Then, the spliced new word is used as the new root, and the above splicing process is repeated until the splicing condition is not met, then the splicing is terminated to obtain the candidate technical word.
[0117] In this way, one or more candidate technical words for each word root in the prefix root library, infix root library or suffix root library can be obtained by mining the word sequence set, so that the final candidate technical word set can be obtained after subsequent deduplication.
[0118] In some embodiments, the model training method may further include the following steps S610-S620.
[0119] Step S610: Perform part-of-speech tagging on the public opinion text sample to obtain a part-of-speech sequence of the public opinion text sample; wherein the part-of-speech sequence includes the parts of speech corresponding to the words in the word sequence.
[0120] Exemplarily, while performing word segmentation processing on each public opinion text sample in the public opinion corpus based on a set word segmentation system, part-of-speech tagging processing can be performed on each public opinion text sample to obtain a corresponding part-of-speech sequence.
[0121] As an example, the part-of-speech sequence includes useless parts of speech. The useless parts of speech may include at least one of the following: adverbs, prepositions, conjunctions, auxiliary words, modal particles, onomatopoeia, and interjections.
[0122] Step S620: Screen the candidate technical words based on the parts of speech in the part of speech sequence to obtain technical word labels for the public opinion text sample to annotate the public opinion text sample.
[0123] Specifically, based on useless parts of speech in the part-of-speech sequence, the candidate technical words in the candidate technical word set can be screened, and the candidate technical words corresponding to the useless parts of speech can be excluded to obtain one or more technical word labels, and the corresponding public opinion text samples can be annotated based on the technical word labels to obtain technical word entity annotation data. In this way, the annotation accuracy of the technical word entity annotation data can be improved.
[0124] Exemplarily, a stop word library may also be obtained. Before screening the candidate technical word set based on the parts of speech in the part-of-speech sequence, the candidate technical word set may be cleaned based on the stop word library to obtain a cleaned candidate technical word set, and then the cleaned candidate technical word set may be screened based on useless parts of speech in the part-of-speech sequence to obtain a technical word label.
[0125] In some implementations, using technical word entity annotation data to perform model training on a general information extraction model to obtain a technical word entity extraction model may include the following steps S710-S730.
[0126] Step S710: Divide the technical term entity annotation data into a training set TrainSet, a validation set ValidationSet and a test set TestSet.
[0127] Step S720: input the training set TrainSet and the validation set ValidationSet into the UIE model, fine-tune the UIE model, and obtain a technical word entity extraction model for extracting technical word entities.
[0128] Specifically, the UIE model can be deployed in a training environment. By inputting the training set TrainSet and the validation set ValidationSet into the UIE model for fine-tuning, few-sample learning can be achieved to obtain a technical word entity extraction model for technical word entity extraction, wherein the training set TrainSet and the validation set ValidationSet are both technical word entity annotation data with technical word labels.
[0129] Step S730: input the test set TestSet into the technical word entity extraction model to obtain the accuracy, recall and F1 of the technical word entity extraction model in the reasoning environment, so as to perform model testing and evaluation on the technical word entity extraction model.
[0130] Among them, F1 is the harmonic mean of the precision and recall of the technical word entity extraction model.
[0131] In the above implementation, by performing few-sample learning training based on the UIE model, a technical word entity extraction model for related fields or industries such as the automotive field can be constructed through a small amount of technical word entity annotation data, thereby reducing the consumption of manpower and material resources.
[0132] The following takes the automobile field as an example to illustrate the model training process of the technical word entity extraction model. That is to say, the public opinion text to be discovered can be an automobile public opinion text, the public opinion text sample to be labeled can be an automobile public opinion text sample, and the technical word entity labeling data is obtained based on the automobile public opinion text sample.
[0133] In some embodiments, during the model training and experimental demonstration of the technical word entity extraction model, 10,000 texts can be obtained from multiple Internet social platforms such as automobile forums and automobile communities, of which 5,000 texts are used as automobile public opinion text samples for candidate technical word mining, and another 5,000 are used as automobile public opinion texts for incremental data for technical word entity extraction. The root library of seed technical words can include 130 roots, and the old technical word library can include 1,420 old technical words. In order to improve the effectiveness and credibility of evaluation and verification, the acquired text can be randomly divided multiple times to perform multiple cross-validations. For example, the acquired 10,000 texts can be randomly divided 10 times and cross-validated 10 times.
[0134] Specifically, the accuracy, recall and F1 of the technical term entity extraction model can be determined by Formula 5, Formula 6 and Formula 7 respectively.
[0135] Formula 5
[0136] Formula 6
[0137] Formula 7
[0138] Among them, Precision represents the accuracy, Recall represents the recall rate, TP (True Positive) represents the number of correctly extracted technical word entities, and FP (False Positive) represents the number of missed extracted technical word entities.
[0139] As an example, TP can represent a true positive example, that is, the technical word entity extraction model predicts a positive example, and the actual example is also a positive example. FP can represent a false positive example, that is, the technical word entity extraction model predicts a positive example, but the actual example is a negative example. FN (False Negative) can represent a false negative example, that is, the technical word entity extraction model predicts a negative example, but the actual example is a positive example.
[0140] In this embodiment, the technical word entity annotation data can be divided according to a set division ratio. For example, the technical word entity annotation data can be divided into a training set TrainSet, a validation set ValidationSet and a test set TestSet according to a ratio of 6:2:2, and the test set TestSet is evaluated and verified using accuracy Precision, recall Recall and F1.
[0141] As an example, please refer to Table 1, which shows the verification results of 10 cross-validations in one embodiment.
[0142] Table 1
[0143]
[0144] As an example, please refer to Table 2, which is a new technology word extraction result of discovering new technology words for automobile public opinion text based on the technology word entity graph area model in one implementation.
[0145] Table 2
[0146]
[0147] Based on Tables 1 and 2, it can be seen that the average accuracy of the technical word entity extraction model in the technical word entity annotation data is 81.94%, the average recall rate is 75.22%, and the average F1 value is 78.34%. The new technical words mined from the incremental data basically meet the requirements and can reflect the technical dimensions that users are concerned about in the automotive public opinion text to a certain extent. Therefore, it can verify the effectiveness and accuracy of the discovery of new technical words in the public opinion text to a certain extent.
[0148] Specifically, in order to improve the effectiveness and credibility of evaluation and verification, the technical word entity annotation data can be randomly divided multiple times, thereby performing multiple cross-validations. The multiple random divisions of the technical word entity annotation data refer to the random division of the technical word entity annotation data, and the ratio of the training set TrainSet, the validation set ValidationSet, and the test set TestSet obtained by each random division is the set division ratio.
[0149] Exemplarily, in the process of obtaining the technical word entity extraction model by performing few-shot learning (FewShot) based on the technical word entity annotation data on the basis of the UIE model, the maximum text segmentation length, training rounds, the number of interval steps for saving the model during training, the number of interval steps for evaluating the model during training, the global random seed, etc. can be set. For example, the maximum text segmentation length can be set to 512, the training rounds can be set to 20, the number of interval steps for saving the model during training can be set to 100, the number of interval steps for evaluating the model during training can be set to 100, and the global random seed can be set to 1000. As an example, the path of the training set, the path of the validation set, the maximum learning rate for training, the optimal model indicator, and the model saving path can also be set in the few-shot learning process.
[0150] In some cases, there are some hyperparameters. For example, the confidence threshold of the technical word entity extraction model for extracting technical word entities, that is, the minimum confidence threshold. Another example is the first similarity threshold in the cosine similarity determination. Another example is the second similarity threshold in the edit distance similarity determination. The value of the hyperparameter will affect the extraction effect of the technical word entity or the effect of the new technical word discovery.
[0151] In this embodiment, for the confidence threshold, an optimal value may be determined based on the average F1 value of the validation set ValidationSet in multiple cross-validations.
[0152] Exemplarily, the technical word entity annotation data can be randomly divided into a training set TrainSet, a validation set ValidationSet and a test set TestSet in a ratio of 6:2:2; the training set TrainSet is used to perform a few-sample learning training on the technical word entity extraction model; the validation set ValidationSet is used to verify the technical word entity extraction model, and the F1 values of the technical word entity extraction under different confidence threshold conditions are calculated multiple times to obtain multiple groups of F1 values, and the confidence threshold when the F1 value is the highest is taken as the required minimum confidence threshold. In this way, the optimal value of the confidence threshold can be determined.
[0153] See also Figure 3 , Figure 3 To determine the experimental results of the confidence threshold in the technical word entity extraction model, that is, a schematic diagram of the relationship between the minimum confidence threshold and the F1 value, the horizontal axis represents the minimum confidence threshold, and the vertical axis represents the F1 value of the technical word entity extraction model. It can be seen that the optimal value of the minimum confidence threshold can be 0.85, that is, when the result interception confidence of the technical word entity extraction model is greater than or equal to 0.85, the extraction effect of the technical word entity extraction model is better.
[0154] In this embodiment, for the first similarity threshold and the second similarity threshold, the optimal values of the first similarity threshold and the second similarity threshold can be determined in combination with the F1 values extracted from the new technical words in the candidate technical words.
[0155] Exemplarily, some candidate technical words can be marked as new technical words or old technical words. If the candidate technical word belongs to the old technical word library, or if the candidate technical word is a synonym of any old technical word in the old technical word library, the candidate technical word is marked as an old technical word, otherwise the candidate technical word is marked as a new technical word. Then, the F1 value of the new technical word discrimination or extraction under different first similarity threshold conditions is calculated multiple times to obtain multiple groups of F1 values, and the first similarity threshold with the highest F1 value is taken as the required first similarity threshold. Similarly, the F1 value of the new technical word discrimination or extraction under different second similarity threshold conditions is calculated multiple times to obtain multiple groups of F1 values, and the second similarity threshold with the highest F1 value is taken as the required second similarity threshold.
[0156] See also Figure 4 , Figure 4 The experimental results for determining the first similarity threshold are shown below, which is a schematic diagram showing the relationship between the first similarity threshold and the F1 value. Figure 4 The horizontal axis represents the first similarity threshold or the minimum cosine similarity threshold, and the vertical axis represents the F1 value of new technology word identification. It can be seen that the optimal value of the first similarity threshold can be 0.95, that is, when the cosine similarity calculation result is greater than or equal to 0.95, the new technology word identification effect is better.
[0157] See also Figure 5 , Figure 5 The experimental results for determining the second similarity threshold are shown below, that is, a schematic diagram showing the relationship between the second similarity threshold and the F1 value. Figure 5 The horizontal axis represents the second similarity threshold or the minimum edit distance similarity threshold, and the vertical axis represents the F1 value of new technology word identification. It can be seen that the optimal value of the second similarity threshold can be 0.8, that is, when the edit distance similarity calculation result intercepts the edit distance similarity greater than or equal to 0.8, the new technology word identification effect is better.
[0158] This specification provides a method for discovering new technical terms in public opinion texts. Figure 6 , the method for discovering new technical terms in public opinion text may include the following steps.
[0159] Step S801: Obtain a word root library and a public opinion text sample to be annotated.
[0160] Among them, the root library is also the seed technology word root library.
[0161] Exemplarily, the public opinion text sample may refer to an automobile public opinion text sample.
[0162] Step S802: pre-process the public opinion text sample.
[0163] Step S803: perform word segmentation and part-of-speech tagging on the preprocessed public opinion text sample to obtain a word sequence and a part-of-speech sequence respectively; the part-of-speech sequence includes the parts of speech corresponding to the words in the word sequence.
[0164] Among them, word segmentation processing can include Chinese word segmentation.
[0165] Step S804: mining candidate technical words using the word sequence and the seed technical word root library to determine the candidate technical words.
[0166] Step S805: Based on the candidate technical words and part-of-speech sequences, determine the technical word tags, and annotate the automobile public opinion text samples according to the technical word tags to obtain technical word entity annotation data.
[0167] Step S806: Use the technical word entity annotation data to train the UIE model to obtain a technical word entity extraction model.
[0168] Step S807: Perform model testing and evaluation on the technical term entity extraction model.
[0169] Step S808: deploy the technical term entity extraction model that has passed the model testing and evaluation for use in model reasoning services.
[0170] Step S809: Obtain the automobile public opinion text to be discovered and the old technology word library.
[0171] Step S810: input the public opinion text into the trained technical word entity extraction model to obtain the technical word entity extraction result of the automobile public opinion text.
[0172] Step S811: based on the semantic similarity between the old technical word thesaurus and the technical word entity extraction results, the technical word entity extraction results are deduplicated to obtain new technical word entity extraction results.
[0173] Among them, semantic similarity includes cosine similarity and edit distance similarity.
[0174] This specification provides a new technology word discovery device for public opinion text. Figure 7 The apparatus for discovering new technical terms in public opinion text may include a first acquisition module 910 , an entity extraction module 920 , a vectorization module 930 , a similarity determination module 940 and a similarity deduplication module 950 .
[0175] The first acquisition module 910 is used to acquire the public opinion text to be discovered and the old technical word library;
[0176] The entity extraction module 920 is used to input the public opinion text into the technical word entity extraction model to obtain the technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes the technical word entity; the technical word entity extraction model is obtained in advance by training the general information extraction model based on the technical word entity annotation data annotated with the technical word tag;
[0177] A vectorization module 930 is used to vectorize old technical words and technical word entities in the old technical word word library to obtain old word vectors of the old technical words and entity vectors of the technical word entities;
[0178] A similarity determination module 940 is used to determine that the technical word entity is a synonym of the old technical word when the cosine similarity between the old word vector and the entity vector is greater than or equal to a first similarity threshold and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to a second similarity threshold;
[0179] The similarity deduplication module 950 is used to perform semantic similarity deduplication on the technical word entity extraction results according to synonyms to obtain new technical word extraction results.
[0180] Regarding the specific functions and effects achieved by the new technology word discovery device and model training device for public opinion text, you can refer to the other embodiments of this specification for comparative explanation, and will not repeat them here. Each module in the new technology word discovery device and model training device for public opinion text can be implemented in whole or in part through software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or it can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0181] The embodiments of this specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer executes the method for discovering new technical terms in public opinion texts in any of the above embodiments.
[0182] The embodiments of this specification also provide a computer program product including computer instructions, which, when executed by a processor, implement the method for discovering new technical terms in public opinion text in any of the above-mentioned embodiments.
[0183] The embodiments of this specification also provide a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method for discovering new technical terms in public opinion text in the above-mentioned embodiments is implemented.
[0184] In some embodiments, see Figure 8 The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, and a communication interface connected through 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 non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless method can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a new technical word discovery method for public opinion text is implemented.
[0185] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the embodiments of the present specification, rather than to limit the scope of the present invention.
[0186] It can be understood that in the various implementations of this specification, the size of the sequence number of each process does not 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 implementation methods of this specification.
[0187] It can be understood that the various embodiments described in this specification can be implemented individually or in combination, and the embodiments of this specification are not limited to this.
[0188] Unless otherwise specified, all technical and scientific terms used in the embodiments of this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0189] It can be understood that the processor of the embodiment of this specification can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of this specification can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0190] It is understood that the memory in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasablePROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0191] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0192] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0193] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for discovering new technical terms in public opinion text, characterized in that: The method comprises: Obtain the public opinion texts and old technical word libraries to be discovered; The public opinion text is input into a technical word entity extraction model to obtain a technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes a technical word entity and a confidence level of the technical word entity, and the confidence level indicates the reliability of the technical word entity; the technical word entity extraction model is obtained in advance by training a general information extraction model based on technical word entity annotation data annotated with technical word tags; Vectorizing the old technical words in the old technical word database and the technical word entities respectively to obtain old word vectors of the old technical words and entity vectors of the technical word entities; When the cosine similarity between the old word vector and the entity vector is greater than or equal to a first similarity threshold, and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to a second similarity threshold, determining that the technical word entity is a synonym of the old technical word; Deduplication of the technical word entity extraction result is performed based on semantic similarity according to the synonyms to obtain a new technical word extraction result; Wherein, performing semantic similarity deduplication on the technical word entity extraction result according to the synonyms includes: determining a technical word entity set based on the technical word entity extraction result; wherein the technical word entity set includes technical word entities in the technical word entity extraction result whose confidence is greater than or equal to a confidence threshold; wherein the synonyms are determined based on the technical word entities in the technical word entity set; performing semantic similarity deduplication on the technical word entity set according to the synonyms to obtain the new technical word extraction result excluding the old technical words.
2. The method for discovering new technology words in public opinion text according to claim 1 is characterized in that: The method further comprises: Obtain a word root library and public opinion text samples to be annotated; Performing word segmentation processing on the public opinion text sample to obtain a word sequence of the public opinion text sample; Determine candidate technical words by combining the words in the word sequence with the roots in the root library; Annotate the public opinion text sample with the technical word label determined based on the candidate technical word to obtain the technical word entity annotation data; The technical word entity annotation data is used to perform model training on a general information extraction model to obtain the technical word entity extraction model.
3. The method for discovering new technology words in public opinion text according to claim 2 is characterized in that: The step of combining the words in the word sequence with the roots in the root library to determine the candidate technical words includes: The word roots in the word root library are used as current word roots in sequence to determine the information entropy of the current word roots; wherein the information entropy reflects the possibility of the word roots forming independent words; Taking the words adjacent to the current word root in the word sequence as candidate concatenated words, and determining the association between the current word root and the candidate concatenated words; wherein the association reflects the possibility of concatenating the word root and the word into a word; If the information entropy and the correlation meet the splicing condition, the candidate technical word is obtained by splicing the current root word and the candidate splicing word, and the spliced candidate technical word is added to the root word library as a new root word.
4. The method according to claim 3, characterized in that The step of obtaining the candidate technical word by concatenating the current word root and the candidate concatenated words includes: The new word obtained by splicing the current word root and the candidate splicing words is used as a new word root; Determining candidate concatenated words of the new root, and judging whether the new root and the candidate concatenated words of the new root meet concatenation conditions; If the splicing condition is met, the above splicing process continues; if not, the splicing is terminated and the candidate technical words of the current root word are obtained.
5. The method for discovering new technology words in public opinion text according to claim 3 is characterized in that: The root word library includes a prefix root word library, an infix root word library and a suffix root word library; the candidate concatenated words adjacent to the current root word in the word sequence include candidate concatenated words adjacent to the current root word in the backward direction and candidate concatenated words adjacent to the current root word in the forward direction; The step of obtaining the candidate technical word by concatenating the current word root and the candidate concatenated words includes: In the case where the current root is a prefix root in the prefix root library, the backward adjacent candidate concatenated words are concatenated after the current root to obtain the candidate technical words based on the backward concatenation of the current root; and / or, In the case where the current root is a suffix root in the suffix root library, the forward adjacent candidate concatenated words are concatenated before the current root to obtain the candidate technical words based on the forward concatenation of the current root; and / or, In the case where the current root is an infix root in the infix root library, the backward adjacent candidate concatenated words are concatenated after the current root to obtain the candidate technical words based on the backward concatenation of the current root. At the same time, the forward adjacent candidate concatenated words are concatenated before the current root to obtain the candidate technical words based on the forward concatenation of the current root.
6. The method for discovering new technology words in public opinion text according to claim 2 is characterized in that: The method further comprises: Performing part-of-speech tagging on the public opinion text sample to obtain a part-of-speech sequence of the public opinion text sample; wherein the part-of-speech sequence includes the parts of speech corresponding to the words in the word sequence; The candidate technical words are screened based on the parts of speech in the part-of-speech sequence to obtain technical word labels for the public opinion text sample to annotate the public opinion text sample.
7. A new technology word discovery device for public opinion text, characterized in that: The device comprises: The first acquisition module is used to acquire the public opinion text to be discovered and the old technical word library; An entity extraction module is used to input the public opinion text into a technical word entity extraction model to obtain a technical word entity extraction result of the public opinion text; wherein the technical word entity extraction result includes a technical word entity and a confidence level of the technical word entity, and the confidence level indicates the reliability of the technical word entity; the technical word entity extraction model is obtained in advance by training a general information extraction model based on technical word entity annotation data annotated with technical word tags; A vectorization module, used to vectorize the old technical words and the technical word entities in the old technical word vocabulary, respectively, to obtain the old word vectors of the old technical words and the entity vectors of the technical word entities; a similarity determination module, configured to determine that the technical word entity is a synonym of the old technical word when the cosine similarity between the old word vector and the entity vector is greater than or equal to a first similarity threshold and the edit distance similarity between the old technical word and the technical word entity is greater than or equal to a second similarity threshold; A similarity deduplication module is used to perform semantic similarity deduplication on the technical word entity extraction result according to the synonyms to obtain a new technical word extraction result; wherein, the semantic similarity deduplication on the technical word entity extraction result according to the synonyms includes: determining a technical word entity set based on the technical word entity extraction result; wherein the technical word entity set includes technical word entities in the technical word entity extraction result whose confidence is greater than or equal to a confidence threshold; wherein the synonyms are determined based on the technical word entities in the technical word entity set; performing semantic similarity deduplication on the technical word entity set according to the synonyms to obtain the new technical word extraction result excluding the old technical words.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for discovering new technical terms in public opinion text described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for discovering new technical terms in public opinion text described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product includes computer instructions, which, when executed by a processor, implement the method for discovering new technical terms in public opinion text as described in any one of claims 1 to 6.
Citation Information
Patent Citations
New word discovery method and device, terminal and server
CN106776543A
