Keyword recognition method and computer terminal
By combining entity recognition technology and keyword recognition algorithms, the problem of inaccurate new word recognition in existing technologies has been solved, achieving accurate recognition and understanding of new words and improving the timeliness and comprehensiveness of market hotspot identification.
Patent Information
- Application Number
- CN202210711202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-06-22
AI Technical Summary
Existing technologies, when identifying market hotspots, cannot accurately identify new words by calculating the probability of their appearance in the text, and cannot take into account contextual understanding, resulting in untimely and incomplete identification of market hotspots.
By combining entity recognition technology with keyword recognition algorithms, the system identifies entity objects by statistically analyzing the probability of words in documents and identifying their parts of speech, determines whether keywords are new words, highlights new words in the display format, and provides a realistic logical understanding of new words by combining their position and frequency in sentences.
It achieves accurate identification and understanding of new words, reduces reliance on human judgment, improves the accuracy and timeliness of new word identification, and helps market participants quickly understand market changes.
Smart Images

Figure CN115204173B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of natural language technology, and in particular to a keyword recognition method and a computer terminal. BACKGROUND
[0002] New word discovery is a new research field in natural language technology in recent years, aiming to discover new words in articles, which can be used for building a corpus, performing a word segmentation task, and maintaining a knowledge graph. In the financial field, new word discovery can be used to obtain market hotspots through economic information, identify emotional driving factors of market transactions, and enable market participants to quickly recognize the driving force of market changes. Traditional market hotspot identification is determined by human understanding. Due to the difference in individual understanding ability, market hotspots may not be fully mined. At the same time, people have different abilities to accept new things, so the time spent on identifying hotspots is not the same, and the market hotspots cannot be timely reflected. Identifying hotspots in an algorithmic manner can achieve timely feedback and functions.
[0003] However, the current new word discovery from general information calculates the probability of the occurrence of new words in the text. Through such a calculation method, sentences with large probability values of new word occurrence may miss many new words, and the understanding of new words is limited when referring to the context. SUMMARY
[0004] The present application provides a keyword recognition method and a computer terminal that can accurately identify keywords.
[0005] In a first aspect, the present application provides a method for identifying new words in a document. The method includes the following steps: extracting all keywords in the document according to a preset keyword recognition algorithm; obtaining the position of each keyword; identifying all entity objects in the document according to a preset named entity recognition algorithm; obtaining the position of each entity object; determining whether an entity object exists in the position corresponding to each keyword according to the position of each keyword and the position of each entity object; determining that a keyword is a new word when no entity object exists in the position corresponding to the keyword; and displaying the new word and the document in a preset display format.
[0006] Further, the step of extracting all keywords in the document according to a preset keyword recognition algorithm specifically includes the following steps: calculating the probability of the occurrence of a word in the document; and determining that the word is a keyword when the probability of the occurrence of the word in the document is greater than a preset probability.
[0007] Further, the identifying all entity objects in the to-be-processed document according to the preset named entity recognition algorithm specifically comprises: performing word segmentation on content in the to-be-processed document according to a preset word segmentation model; performing part-of-speech identification on the segmented words to obtain the entity objects.
[0008] Further, the keyword identification method further comprises: performing part-of-speech tagging on the new word in the corresponding original sentence; identifying a noun in the new word according to the part-of-speech tagging; counting the number of nouns; calculating the ratio of the number to the length of the sentence; determining whether the ratio is greater than a preset value; extracting the sentence when the ratio is greater than the preset value; and displaying the sentence in the preset display format.
[0009] Further, the extracting the sentence comprises: obtaining a plurality of sentences in which the new word is located; calculating the frequency of the new word in each sentence; determining the sentence with the maximum frequency; and extracting the sentence with the maximum frequency.
[0010] Further, the extracting the sentence with the maximum frequency further comprises: calculating the length of the sentence with the maximum frequency; obtaining the position of the new word if the length of the sentence is greater than the length of the sentence with the maximum frequency; and obtaining the same number of words from the position of the new word in the forward and backward directions according to a preset length.
[0011] Further, the preset display format is different from the display format of other words in the to-be-processed document.
[0012] Further, the keyword identification method further comprises: associating the new word with the corresponding sentence; and wherein displaying the sentence in the preset display format specifically comprises: displaying the corresponding sentence when the new word is detected to be clicked; and hiding the corresponding sentence when the new word is detected to have ended being clicked.
[0013] Further, the to-be-processed document is a to-be-typeset document or a typeset document, and displaying the new word and the to-be-processed document in the preset display format further comprises:
[0014] When the to-be-processed document is a to-be-typeset document, re-typesetting the new word and the content of the to-be-processed document in the preset display format; and when the to-be-processed document is a typeset document, embedding the new word into the to-be-processed document.
[0015] In a second aspect, the application provides a computer terminal, which comprises:
[0016] a computer readable storage medium for storing program instructions; and
[0017] A processor for executing the program instructions to implement the keyword recognition method.
[0018] The present application can recognize new words more accurately by adding entity recognition technology, without second human judgment, and can obtain the sentence where the new word is located according to the recognized new word, and can determine the real logic of the new word to understand the new word thoroughly. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only show some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor based on the drawings shown.
[0020] Figure 1 The keyword recognition method flowchart provided for the embodiments of the present application.
[0021] Figure 2 The first sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0022] Figure 3 The second sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0023] Figure 4 The third sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0024] Figure 5 The fourth sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0025] Figure 6 The fifth sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0026] Figure 7 The sixth sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0027] Figure 8 The seventh sub-flowchart of the keyword recognition method provided for the embodiments of the present application.
[0028] Figure 9 The internal structure schematic diagram of the computer terminal provided for the embodiments of the present application.
[0029] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the drawings. DETAILED DESCRIPTION
[0030] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0031] The terms "first", "second", "third", "fourth" and the like in the description, claims, as well as those in the above drawings, if any, are used to distinguish similar objects, and are not necessarily used to describe a particular sequential or chronological order. It should be understood that the data thus used can be interchanged under appropriate circumstances, in other words, the described embodiments are implemented according to an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof, can also include other contents, for example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be noted that the description of "first", "second" and the like in the present application is only for description purpose, and should not be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In addition, the technical solutions of various embodiments can be combined with each other, but must be based on the realization of those of ordinary skill in the art, when the combination of technical solutions appears to be contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection required by the present application.
[0033] Please refer to Figure 1 which is a flowchart of the keyword recognition method provided by the embodiment of the present application. The current new word found in the information article is by calculating the probability of the new word appearing in the article, the present application increases the entity recognition technology to more accurately identify the new word, without the need for a second human judgment; and according to the identified new word, the sentence where the new word is located is obtained, and the real logic of the new word is clear so as to thoroughly understand the new word. The named entity refers to an entity in the text with specific meaning or strong reference, usually including personal name, place name, organization name, date and time, proper noun, etc.
[0034] The keyword determination method of the embodiment of the present application specifically includes steps S101-S107.
[0035] Step S101, all keywords in the to-be-processed document are extracted according to a preset keyword recognition algorithm. The keyword recognition algorithm is to calculate the probability of a new word appearing in an article, and the to-be-processed document can be an economic information article.
[0036] A probability threshold is preset, and a word in the economic information article whose probability value obtained according to the keyword recognition algorithm is greater than the probability threshold is obtained.
[0037] For example, the probability threshold is set to one seventh, and the word "economic focus point" has a high probability of appearing in an economic article, and the proportion of all words in the article is one seventh, so the "economic focus point" is regarded as a new keyword.
[0038] Step S102, the position corresponding to each keyword is obtained.
[0039] After the keyword is found, the sentence in which the keyword is located is obtained, and the position of the keyword in the sentence is obtained.
[0040] For example, the "economic focus point" appears in the sentence "put the economic focus point on the real economy", and appears in the fourth to seventh characters.
[0041] Step S103, all entity objects in the to-be-processed document are identified according to a preset named entity recognition algorithm. The named entity recognition algorithm can identify entity objects in a sentence, and the entity objects can be names, place names, organization names, etc.
[0042] For example, there is a sentence "in the article xxx detailed stable economic focus point" in the economic article, and "xxx detailed stable economic focus point" is the article name and is regarded as a named entity object.
[0043] Step S104, the position corresponding to each entity object is obtained.
[0044] The sentence in which each entity object is located is obtained, and the position of each named entity in the sentence is obtained.
[0045] For example, the named entity "xxx detailed stable economic focus point" in the sentence "in the article xxx detailed stable economic focus point" is the second to fourteenth character in the sentence.
[0046] Step S105, whether there is an entity object in the position corresponding to each keyword is judged according to the position corresponding to each keyword and the position corresponding to each entity object.
[0047] For example, in the sentence “In the article ‘xxx’s detailed explanation of the key points for stabilizing the economy, it is written that”, the named entity is the second to the fourteenth character of the sentence, and the keyword is the eleventh to the fourteenth character of the sentence. The named entity is located at the position of the keyword in this sentence.
[0048] Step S106: When the entity object does not appear in the position corresponding to the keyword, the keyword is determined to be a new word.
[0049] For example, in the sentence "Focus on developing the economy on the real economy", the key word "focus on the economy" appears in the fourth to ninth characters of the sentence. Since no entity name appears in this position, this word is considered a new word.
[0050] Step S107: Display the new word and the document to be processed according to a preset display format. The display format may be a colored marker to highlight the new word in the document.
[0051] For example, the phrase "economic focus" in the sentence "focus on developing the real economy" can be highlighted in yellow and clearly displayed in the document.
[0052] Please combine Figure 2 , Figure 2 This is a first sub-flowchart of a keyword recognition method provided in an embodiment of this application. Step S101 specifically includes steps S201-S202.
[0053] Step S201: Calculate the probability of each word appearing in the document to be processed. The document consists of several sentences, and each sentence is composed of several words. Calculate the probability of each word appearing in the document.
[0054] For example, in the Economic Weekly, the phrase "economic war with energy as the main focus" accounted for one-sixth of the articles, and "economic focus" accounted for one-fifth.
[0055] Step S202: If the probability of a word appearing in the document to be processed is greater than a preset probability, then that word is designated as a keyword. A probability threshold is set. When the probability of a word appearing is greater than the probability threshold, that word is considered a new word.
[0056] For example, if the probability threshold is set to one in ten, words with a probability of appearing more than one in ten are considered new words in the document.
[0057] Please combine Figure 3 , Figure 3 This is a second sub-flowchart of a keyword recognition method provided in an embodiment of this application. Step S103 specifically includes steps S301-S302.
[0058] Step S301: Segment the content of the document to be processed according to a preset word segmentation model. The word segmentation model can split sentences in the document into several words according to a word dictionary model, or according to semantic type. The word dictionary stores several words, and the semantic type includes place names, personal names, article titles, etc.
[0059] For example, in the sentence "The National System Planning (2006-2020) points out that national central cities are, for example, DD City, CC City, BB City, EE City, AA City, etc., which are core cities of the national system," a word segmentation model is used to break down the sentence into multiple words such as "National System Planning (2006-2020)," "national," "central city," "system," "core city," "AA City," "BB City," "CC City," "DD City," and "EE City."
[0060] Step S302: Perform part-of-speech recognition on the segmented words to obtain the entity object.
[0061] The part-of-speech tag is a semantic type, including article titles, place names, and other nouns. Several words obtained through the word segmentation model are classified according to their part-of-speech tags to obtain entity objects with different part-of-speech tags.
[0062] For example, in terms such as "National System Planning (2006-2020)," "national," "central city," "system," "core city," "AA city," "BB city," "DD city," and "EE city," place names include AA city, BB city, CC city, DD city, and EE city, and the article title is "National System Planning (2006-2020)." Other terms include "national," "central city," "system," and "core city."
[0063] Please combine Figure 4 , Figure 4 This is a third sub-flowchart of a keyword recognition method provided in an embodiment of this application. Specifically, it includes steps S401-S407.
[0064] Step S401: Tag the new word in the corresponding original sentence.
[0065] The part-of-speech tagging involves marking the new word with a part-of-speech tag within the sentence containing the new word.
[0066] For example, the term "digital economy" is a noun, but in the sentence "The digital economy has received unprecedented attention and will become the foundation of people's livelihood," "digital economy" is marked with a noun marker.
[0067] Step S402: Identify the nouns in the new words based on the new word annotation.
[0068] Extract the new words in the sentence marked with their parts of speech, and then extract the nouns from the new words.
[0069] For example, the word "digital economy" has two nouns, "digital" and "economy".
[0070] Step S403, count the number of nouns.
[0071] Count the number of nouns in all new words in the sentence where the new word is located.
[0072] For example, in the sentence "digital economy has received unprecedented attention, and digital economy will become the basis of people's livelihood", the number of "digital" and "economy" is 4.
[0073] Step S404, calculate the ratio of the number and the length of the sentence.
[0074] Calculate the ratio of the number of nouns in the new word to the number of nouns in the sentence.
[0075] For example, in the sentence "digital economy has received unprecedented attention, and digital economy will become the basis of people's livelihood", the number of nouns in the new word is 4; the number of nouns in the sentence is "digital", "economy", "attention", and "people's livelihood", which is 6. The ratio of the number of nouns in the new word to the number of nouns in the sentence is 67%.
[0076] Step S405, determine whether the ratio is greater than a preset value.
[0077] The ratio is set as a reference value, and it is determined whether the calculated ratio of the number of nouns in the new word to the number of nouns in the sentence is less than the reference value.
[0078] For example, the preset ratio value is set to 50%, and the calculated value of 67% is greater than the preset ratio.
[0079] Step S406, when the ratio is greater than the preset value, extract the sentence.
[0080] When the calculated ratio is greater than the preset ratio, it can be considered that the sentence where the new word is located is an important sentence that can express the meaning of the new word, and the meaning of the new word can be understood according to the context provided by the sentence.
[0081] For example, the calculated ratio of the sentence "digital economy has received unprecedented attention, and digital economy will become the basis of people's livelihood" is greater than the preset ratio, so the sentence is considered an important sentence and is further analyzed.
[0082] Step S407, display the sentence in the preset form format. The preset form format can be to bold the font of the sentence, increase the font size, color the font, etc.
[0083] For example, the font of the sentence "Digital economy has been unprecedented attention, digital economy will become the basis of people's livelihood" is bolded and colored.
[0084] Figure 5 A fourth sub-flow chart of a keyword recognition method provided by an embodiment of the present application is provided. Step S406 specifically includes steps S501-S504.
[0085] Step S501, obtaining a plurality of sentences in which the new word is located.
[0086] Obtain all sentences in which the new word appears in an article, and obtain a plurality of sentences in which the ratio of the number of nouns of the new word to the number of nouns in the sentence is greater than a preset ratio.
[0087] Step S502, calculating the frequency of the appearance of the new word in each sentence.
[0088] Calculate the probability value of the appearance of the new word in the sentence for the plurality of sentences in which the ratio is greater than the preset ratio.
[0089] For example, the probability value of the appearance of "digital economy" in the sentence "Digital economy has been unprecedented attention, digital economy will become the basis of people's livelihood" is thirty-three percent, where "digital economy" is 8 characters and the sentence has 28 characters. The probability value of the sentence "Digital economy is rooted in digital development, and then closely integrated with digital economy in various aspects of the economy." is twelve and a half percent.
[0090] Step S503, determining the sentence with the maximum frequency.
[0091] Calculate the frequency value of the appearance of the new word in each sentence, and obtain the sentence with the maximum frequency value.
[0092] Step S504, extracting the sentence with the maximum frequency.
[0093] Please combine Figure 6 , Figure 6 A fifth sub-flow chart of a keyword recognition method provided by an embodiment of the present application is provided. Step S504 specifically includes steps S601-S603.
[0094] Step S601, calculating the length of the sentence with the maximum frequency.
[0095] Obtain the sentence with the maximum frequency of the appearance of the new word, and calculate the length of the sentence.
[0096] For example, the sentence with the highest frequency of new word appearance is "Digital economy has received unprecedented attention, and digital economy will become the foundation of people's livelihood", and the length of the sentence "Digital economy has received unprecedented attention, and digital economy will become the foundation of people's livelihood" is 28.
[0097] In step S602, if the sentence is longer than the preset length, the position of the new word is obtained.
[0098] The preset length is the number of characters obtained before and after the new word to understand the meaning of the new word. When the preset length is less than the length of the sentence, the position of the new word in the sentence is obtained.
[0099] For example, the length of the sentence "Digital economy has received unprecedented attention, and digital economy will become the foundation of people's livelihood" is 30 characters, and the preset length is set to 10. The preset length is less than the length of the sentence, and the position of the new word is 1-4 and 18-22.
[0100] In step S603, the same number of words are obtained before and after the new word according to the preset length.
[0101] For example, in the sentence "Digital economy has received unprecedented attention, and digital economy will become the foundation of people's livelihood", 10 characters are obtained before and after "digital economy".
[0102] Please combine Figure 7 , Figure 7 A sixth sub-flowchart of a keyword recognition method provided by an embodiment of the present application is shown in FIG. 7. Step S407 specifically includes steps S701-S702.
[0103] In step S701, when it is detected that the new word is clicked, the corresponding sentence is displayed.
[0104] When a user views a new word in a document, the sentence with the highest probability of new word appearance is displayed beside the new word to facilitate the user to understand the new word in combination with the background of the sentence, thereby solving the problem of limited understanding of the new word alone.
[0105] In step S702, when it is detected that the new word has ended clicking, the corresponding sentence is hidden.
[0106] When the user's clicking action ends, the sentence is hidden, and the sentence is displayed all the time when the user clicks, which can reduce the occupation of the display interface space by the sentence.
[0107] Please combine Figure 8 , Figure 8 A seventh sub-flowchart of a keyword recognition method provided by an embodiment of the present application is shown in FIG. 8. Step S107 specifically includes steps S801-S802.
[0108] Step S801, when the to-be-processed document is a to-be-typeset document, re-typesetting the new word and the content of the to-be-processed document according to a preset display format. The preset display format is a pre-set typesetting format of a sentence in a document.
[0109] Step S802, when the to-be-processed document is a typeset document, embedding the new word into the to-be-processed document. If the to-be-processed document is already typeset, only the processed new word needs to be embedded into a suitable position.
[0110] In the above embodiment, in the first step, the frequency of occurrence of a keyword in a document is calculated by using a probability and statistics method, and then the frequency of occurrence of the keyword is compared with a set threshold value. When the frequency of occurrence of the found keyword is greater than the threshold value, the keyword is locked. The position of the keyword in the sentence is found, the position of the keyword is marked, the same document is searched again by using entity technology, the entity found by using the entity technology is locked, and the position of the entity in the corresponding sentence is marked. Finally, by comparing the position of the keyword with the position of the entity, the part that does not coincide is extracted as a new word, which can greatly solve the interference of the entity in the probability algorithm and accurately determine the new word. In the second step, the found new word is marked with a part of speech in a sentence, the sentence with the maximum value of the frequency of occurrence of a noun is obtained, and the sentence with the maximum value of the frequency of occurrence of the noun and the new word are extracted together. When the new word is displayed, two formats are set: displaying the extracted sentence and setting the new word in the sentence to be different from the font of the sentence, for example, bold and enlarged, coloring processing to highlight the new word; displaying the sentence alone, and displaying the sentence corresponding to the new word with the maximum value of the frequency of occurrence of the new word when the user releases the click. The purpose is to better understand the new word and solve the problem of limited understanding of a single new word.
[0111] Please refer to Figure 9which is an internal structure diagram of a computer terminal for performing the keyword recognition method provided by the embodiments of the present application. The computer terminal 10 comprises a computer readable storage medium 11, a processor 12 and a bus 13. The computer readable storage medium 11 comprises at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g. SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the computer readable storage medium 11 can be an internal storage unit of the computer terminal 10, such as a hard disk of the computer terminal 10. In other embodiments, the computer readable storage medium 11 can also be an external storage device of the computer terminal 10, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer readable storage medium 11 can comprise both an internal storage unit and an external storage device of the computer terminal 10. The computer readable storage medium 11 can be used not only to store application software and various data installed in the computer terminal 10, but also to temporarily store data that has been output or will be output.
[0112] The bus 13 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0113] Further, the computer terminal 10 can also comprise a display component 14. The display component 14 can be a light emitting diode (LED) display, a liquid crystal display, a touch liquid crystal display, an organic light-emitting diode (OLED) touch, etc. The display component 14 can also be appropriately referred to as a display device or a display unit, for displaying information processed in the computer terminal 10 and for displaying a visualized user interface.
[0114] Further, the computer terminal 10 can also comprise a communication component 15. The communication component 15 can optionally comprise wired communication components and / or wireless communication components, such as WI-FI communication components, Bluetooth communication components, etc., which are usually used to establish a communication connection between the computer terminal 10 and other intelligent control devices.
[0115] The processor 12 can be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments, for running program codes stored in the computer readable storage medium 11 or processing data. Specifically, the processor 12 executes a processing program to control the computer terminal 10 to perform the method of keyword recognition. It can be understood that, Figure 9 Only the computer terminal 10 with components 11-15 and the method of new word recognition is shown, and those skilled in the art can understand that, Figure 9 The structure shown does not constitute a limitation on the computer terminal 10, and can include fewer or more components than shown, or combine certain components, or different component arrangements.
[0116] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
[0117] The above only lists the preferred embodiments of the present application, of course, cannot limit the scope of the patent rights of the present application, therefore, the equivalent changes made according to the claims of the present application, still belong to the scope covered by the present application.
Claims
1. A keyword spotting method, characterized by, The method comprises: extracting all keywords in a to-be-processed document according to a preset keyword recognition algorithm; obtaining the position corresponding to each keyword; identifying all entity objects in the to-be-processed document according to a preset named entity recognition algorithm; obtaining the position corresponding to each entity object; judging whether there is an entity object in the position corresponding to each keyword according to the position corresponding to each keyword and the position corresponding to each entity object; when no entity object appears in the position corresponding to a keyword, determining the keyword as a new word, wherein the entity object is an entity object in a sentence identified by part-of-speech of the named entity recognition algorithm, and the part-of-speech is a semantic type; displaying the new word and the to-be-processed document in a preset display format; wherein the keyword recognition method further comprises: performing part-of-speech tagging on the new word in the corresponding original sentence; identifying the noun in the new word according to the part-of-speech tagging; counting the number of nouns; calculating the ratio of the number to the length of the sentence; judging whether the ratio is greater than a preset value; when the ratio is greater than the preset value, extracting the sentence; displaying the sentence in the preset display format; wherein extracting the sentence comprises: obtaining a plurality of sentences in which the new word is located; calculating the frequency of the new word in each sentence; determining the sentence with the maximum frequency; and extracting the sentence with the maximum frequency.
2. The keyword spotting method of claim 1, wherein, The method comprises: counting the probability of a word appearing in the to-be-processed document; when the probability of a word appearing in the to-be-processed document is greater than a preset probability, the word is taken as a keyword.
3. The keyword spotting method of claim 1, wherein, The method comprises: performing word segmentation on the content of the to-be-processed document according to a preset word segmentation model; performing part-of-speech tagging on the segmented words to obtain the entity objects.
4. The keyword spotting method of claim 1, wherein, The method further comprises: calculating the length of the sentence with the maximum frequency; if the length of the sentence is greater than a preset length, obtaining the position of the new word; obtaining the same number of words from the position of the new word in both forward and backward directions according to a preset length.
5. The keyword spotting method of claim 1, wherein, The preset display format is different from the display format of other words in the to-be-processed document.
6. The keyword spotting method of claim 1, wherein, The method further comprises: associating the new word with the corresponding sentence; wherein displaying the sentence in the preset display format comprises: when the new word is detected to be clicked, displaying the corresponding sentence; when the new word is detected to have ended being clicked, hiding the corresponding sentence.
7. The keyword spotting method of claim 1, wherein, The to-be-processed document is a to-be-typeset document or a typeset document, and displaying the new word and the to-be-processed document in the preset display format further comprises: when the to-be-processed document is a to-be-typeset document, re-typesetting the content of the new word and the to-be-processed document in the preset display format; when the to-be-processed document is a typeset document, embedding the new word into the to-be-processed document.
8. A computer terminal, characterized in that The computer terminal comprises: a computer-readable storage medium for storing program instructions; and a processor configured to execute the program instructions. a processor configured to execute the program instructions to implement the keyword recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Keyword extraction method and device and electronic equipment
CN107766318A