Information output method and device
By finding and traversing the target words in the clauses of the comment information, extracting opinions phrases and analyzing them, the problem of low integrity of opinions phrases in the prior art is solved, and a more efficient opinion mining effect is achieved.
Patent Information
- Application Number
- CN201810108330.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-02-02
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2038-02-02
AI Technical Summary
The existing opinion mining methods have low integrity in comments and cannot effectively extract complete opinion information.
By searching for preset evaluation words in the clauses of the comment information as the starting point, traversing the word-by-word target words and non-preset target words with part-of-word part-of-word part-of-word, extracting phrases as opinions based on the stop position, and performing word segmentation, Part-of-speech annotation, similarity analysis and combination, and select representative opinion phrases.
It improves the completeness and accuracy of opinion phrases and enhances the effect of opinion mining.
Smart Images

Figure CN110110190B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to an information output method and device. Background Art
[0002] Opinion mining is an important research hotspot in the current intelligent information processing of the Internet and a research topic with great practical value. Opinion mining can be widely used in the fields of online public opinion monitoring, information push, personalized opinion retrieval, business intelligence analysis, etc.
[0003] Current opinion mining methods usually find opinion phrases in comments by setting various matching templates (such as "noun + adjective", "noun + adverb + adjective", etc.), but the completeness of such opinion phrases is usually low. Summary of the invention
[0004] The embodiments of the present application provide an information output method and device.
[0005] In a first aspect, an embodiment of the present application provides an information output method, the method comprising: obtaining a comment information set, wherein the comment information includes at least one clause; for each comment information in the above comment information set, performing the following processing steps on each clause in the comment information: searching the clause for a target evaluation word contained in a preset evaluation word set; in response to finding the above target evaluation word, traversing forward in the clause with the position of the above target evaluation word as the starting point to find the first first target word whose part of speech is the preset part of speech; in response to finding the above first target word, continuing to traverse forward from the current position to find the first second target word whose part of speech is not the preset part of speech; in response to finding the above second target word or not finding the above second target word when traversing to the beginning of the clause, extracting a phrase from the clause as an opinion phrase based on the stop position when stopping the search and the position of the above target evaluation word, and outputting the above opinion phrase.
[0006] In some embodiments, based on the stop position when the search is stopped and the position of the target evaluation word, a phrase is extracted from the clause as an opinion phrase, including: if the word at the stop position is a word with the preset part of speech, then a phrase with the word at the stop position as the starting word and the target evaluation word as the ending word is extracted from the clause.
[0007] In some embodiments, after obtaining the comment information set, the method further includes: segmenting each comment information in the comment information set, and performing part-of-speech tagging for each segmented word.
[0008] In some embodiments, the above method further includes: selecting an opinion phrase from the determined opinion phrases as a representative opinion phrase, and outputting the representative opinion phrase.
[0009] In some embodiments, the above-mentioned selecting an opinion phrase from the determined opinion phrases as a representative opinion phrase includes: determining the similarity between the above-mentioned each opinion phrase and each classification phrase in a preset classification phrase set; based on the determined similarity, dividing the above-mentioned each opinion phrase into at least one opinion phrase group; for each divided opinion phrase group, based on the number of times the opinion phrase appears in the comment information in the above-mentioned comment information set, selecting an opinion phrase from the opinion phrase group as a first opinion phrase; selecting a first opinion phrase from the determined first opinion phrases as a representative opinion phrase.
[0010] In some embodiments, the above-mentioned selecting a first opinion phrase from the determined first opinion phrases as a representative opinion phrase includes: determining the semantic similarity between each first opinion phrase; dividing the above-mentioned first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity; for each divided first opinion phrase group, based on the number of times the first opinion phrase appears in the comment information in the above-mentioned comment information set, selecting a first opinion phrase from the first opinion phrase group as a second opinion phrase; and selecting a second opinion phrase from the determined second opinion phrases as a representative opinion phrase.
[0011] In some embodiments, the selecting of a second opinion phrase from the determined second opinion phrases as a representative opinion phrase includes: dividing the second opinion phrases into at least one second opinion phrase group based on at least one preset word set, wherein the word set includes words with the same meaning; for each divided second opinion phrase group, selecting a second opinion phrase from the second opinion phrase group as a representative opinion phrase based on the number of times the second opinion phrase appears in the comment information in the comment information set.
[0012] In a second aspect, an embodiment of the present application provides an information output device, which includes: an acquisition unit, configured to acquire a set of comment information, wherein the comment information includes at least one clause; a processing unit, configured to perform the following processing steps for each clause in the comment information for each comment information in the above-mentioned comment information set: searching the clause for a target evaluation word included in a preset set of evaluation words; in response to finding the above-mentioned target evaluation word, traversing forward in the clause with the position of the above-mentioned target evaluation word as the starting point, and searching for the first first target word whose part of speech is the preset part of speech; in response to finding the above-mentioned first target word, continuing to traverse forward from the current position, and searching for the first second target word whose part of speech is not the above-mentioned preset part of speech; in response to finding the above-mentioned second target word or not finding the above-mentioned second target word when traversing to the beginning of the clause, extracting a phrase from the clause as an opinion phrase based on the stop position when stopping the search and the position of the above-mentioned target evaluation word, and outputting the above-mentioned opinion phrase.
[0013] In some embodiments, the processing unit includes: an extraction subunit configured to extract a phrase with the word at the stop position as the starting word and the target evaluation word as the ending word from the clause if the word at the stop position is a word with the preset part of speech.
[0014] In some embodiments, the apparatus further comprises: a tagging unit configured to segment each comment information in the comment information set, and perform part-of-speech tagging for each segmented word.
[0015] In some embodiments, the apparatus further comprises: a first processing unit configured to select an opinion phrase from the determined opinion phrases as a representative opinion phrase, and output the representative opinion phrase.
[0016] In some embodiments, the first processing unit includes: a determination subunit configured to determine the similarity between each of the above-mentioned opinion phrases and each classification phrase in a preset classification phrase set; a division subunit configured to divide the above-mentioned opinion phrases into at least one opinion phrase group based on the determined similarity; a first selection subunit configured to select an opinion phrase from the opinion phrase group as a first opinion phrase based on the number of times the opinion phrase appears in the comment information in the above-mentioned comment information set for each divided opinion phrase group; and a second selection subunit configured to select a first opinion phrase from the determined first opinion phrases as a representative opinion phrase.
[0017] In some embodiments, the second selection subunit includes: a determination module configured to determine the semantic similarity between each pair of first opinion phrases; a division module configured to divide the first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity; a first selection module configured to select a first opinion phrase from the first opinion phrase group as a second opinion phrase based on the number of times the first opinion phrase appears in the comment information in the comment information set for each divided first opinion phrase group; and a second selection module configured to select a second opinion phrase from the determined second opinion phrases as a representative opinion phrase.
[0018] In some embodiments, the second selection module is further configured to: divide the second opinion phrases into at least one second opinion phrase group based on at least one preset word set, wherein the word set includes words with the same meaning; for each divided second opinion phrase group, select a second opinion phrase from the second opinion phrase group as a representative opinion phrase based on the number of times the second opinion phrase appears in the comment information in the comment information set.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement a method as described in any implementation method in the first aspect.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0021] The information output method and device provided by the embodiment of the present application can improve the integrity of the mined opinion phrases by performing a specified processing step on each clause included in each comment information in the acquired comment information set. The processing step includes: searching for a target evaluation word included in a preset evaluation word set in the clause; in response to finding the target evaluation word, traversing forward from the position where the target evaluation word is located in the clause as a starting point to find the first first target word with a preset part of speech; in response to finding the first target word, traversing forward from the current position to find the first second target word with a part of speech that is not the preset part of speech; in response to finding the second target word or not finding the second target word when traversing to the beginning of the clause, extracting a phrase from the clause as an opinion phrase based on the stop position when stopping the search and the position where the target evaluation word is located, and outputting the opinion phrase. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0024] Figure 2 is a flow chart of an embodiment of the information output method according to the present application;
[0025] Figure 3 is a flow chart of another embodiment of the information output method according to the present application;
[0026] Figure 4 is a schematic structural diagram of an embodiment of an information output device according to the present application;
[0027] Figure 5 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION
[0028] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0030] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the information output method or information output device of the present application can be applied.
[0031] like Figure 1 As shown, system architecture 100 may include servers 101, 103 and network 102. Network 102 is used to provide a medium for a communication link between server 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links or fiber optic cables.
[0032] The server 101 may be a server that provides various services, for example, a data storage server that stores review information collection.
[0033] The server 103 may be a server that provides various services. For example, the server 103 may obtain a comment information set from the server 101, analyze and process each comment information in the comment information set, and output the processing result (eg, mined opinion phrases).
[0034] It should be noted that the information output method provided in the embodiment of the present application is generally executed by the server 103 , and accordingly, the information output device is generally arranged in the server 103 .
[0035] It should be noted that if the review information set acquired by the server 103 is pre-stored locally, then the system architecture 100 may not include the server 101 .
[0036] It should be understood that Figure 1 The number of servers and networks in the embodiment is only for illustration. Any number of servers and networks may be provided as required.
[0037] Continue to refer Figure 2 , shows a process 200 of an embodiment of an information output method according to the present application. The process 200 of the information output method includes the following steps:
[0038] Step 201, obtaining a comment information set.
[0039] In this embodiment, the electronic device (eg, Figure 1 The server 103 shown in the figure can obtain the comment information set locally, or can obtain the comment information set from a server connected by remote communication (for example Figure 1 The server 101 shown in the figure obtains a set of comment information. The comment information may include at least one clause. For example, for the comment information "the mobile phone has good quality and the battery is very durable", the comment information includes two clauses, namely "the mobile phone has good quality" and "the battery is very durable".
[0040] It should be noted that the review object of the review information may be, for example, an object (such as a mobile phone, a computer, clothes, wine, etc.), an article, a film or TV series, etc. This embodiment does not impose any limitation on the review object of the review information.
[0041] It should be noted that each piece of comment information in the above comment information set may be comment information for the same comment object. In addition, each piece of comment information in the above comment information set may be comment information after word segmentation and part-of-speech tagging.
[0042] Step 202: for each piece of comment information in the comment information set, execute a processing step on each clause in the comment information.
[0043] In this embodiment, for each comment information in the comment information set, the electronic device may perform the following processing steps on each clause in the comment information:
[0044] First, the electronic device can search for a target evaluation word in a preset evaluation word set in the clause, wherein the evaluation word set may contain positive evaluation words (such as "very good", "durable", "beautiful", "cheap", etc.) and negative evaluation words (such as "rubbish", "bad", "expensive", "ugly", etc.).
[0045] Then, in response to the electronic device finding the target evaluation word, the electronic device may traverse forward in the clause starting from the position of the target evaluation word to find the first target word with a preset part of speech, where the preset part of speech may be a noun, for example.
[0046] As an example, suppose the clause is "the quality of the mobile phone is indeed good", which includes the nouns "mobile phone" and "quality", the adverb "indeed" and the adjective "good". In response to the target evaluation word being "good", the electronic device can traverse forward from the position of "good" to find the first target word with a noun part of speech. In the clause "the quality of the mobile phone is indeed good", the electronic device can find the first target word "quality".
[0047] Then, in response to the electronic device finding the first target word, the electronic device may continue to traverse forward from the current position (i.e., the position where the first target word is located) to search for the first second target word whose part of speech is not the preset part of speech. Continuing with the clause "The quality of the mobile phone is really good" as an example, after the electronic device finds the first target word "quality", the electronic device may continue to traverse forward from the position where "quality" is located to search for the first second target word whose part of speech is not a noun. In the clause "The quality of the mobile phone is really good", the word before "quality" is the noun "mobile phone". When the electronic device continues to traverse forward, it can be determined that "mobile phone" is already the beginning of the clause. The electronic device can determine that the second target word has not been found, and the electronic device can stop searching.
[0048] In addition, taking the clause "and the quality of the mobile phone is really good" as an example, after the above-mentioned electronic device finds the first target word "quality", the above-mentioned electronic device can continue to traverse forward from the position where "quality" is located. When traversing to "mobile phone", the above-mentioned electronic device can determine that "mobile phone" is a noun. The above-mentioned electronic device can continue to traverse forward. When traversing to "and", the above-mentioned electronic device can determine that "and" is not a noun. The above-mentioned electronic device can determine that the second target word "and" is found, and the above-mentioned electronic device can stop searching.
[0049] Finally, in response to the electronic device finding the second target word, or the electronic device failing to find the second target word when traversing to the beginning of the clause, the electronic device can extract a phrase from the clause as an opinion phrase based on the stop position when the search stops and the position of the target evaluation word, and output the opinion phrase. For example, the opinion phrase is output to a specified page or a specified file, etc.
[0050] It should be noted that if the word at the stop position is the second target word found by the electronic device, the electronic device can extract a phrase starting with the next word after the second target word and ending with the target evaluation word from the clause as an opinion phrase. Taking the clause "and the quality of the mobile phone is really good" as an example, the target evaluation word found by the electronic device is "good", and the second target word found is "and", the electronic device can extract a phrase starting with the next word after "and" "mobile phone" and ending with "good" from the clause, "the quality of the mobile phone is really good", and the electronic device can use this phrase as an opinion phrase.
[0051] It should be pointed out that after the above-mentioned electronic device finds the first target word, it continues to traverse forward to search for the second target word, which can ensure the integrity of the mined opinion phrases as much as possible. Taking the clause "the mobile phone screen is large" as an example, if the opinion phrase is simply mined using the "noun + adjective" rule, the mined opinion phrase is "the screen is large." However, using the method provided in this embodiment, the mined opinion phrase is "the mobile phone screen is large." The opinion phrase "the mobile phone screen is large" has a higher integrity than "the screen is large."
[0052] In some optional implementations of this embodiment, if the word at the above-mentioned stop position is a word with the above-mentioned preset part of speech, the above-mentioned electronic device can extract a phrase with the word at the above-mentioned stop position as the starting word and the target evaluation word as the ending word from the clause.
[0053] The method provided by the above-mentioned embodiment of the present application improves the completeness of the mined opinion phrases by performing a specified processing step on each clause included in each comment information in the acquired comment information set.
[0054] Continue to see Figure 3 , which shows a process 300 of another embodiment of the information output method. The process 300 of the information output method includes the following steps:
[0055] Step 301, obtaining a comment information set.
[0056] In this embodiment, the electronic device (eg, Figure 1The server 103 shown in the figure can obtain the comment information set locally, or can obtain the comment information set from a server connected by remote communication (for example Figure 1 The server 101 shown in the figure obtains a set of comment information. The comment information may include at least one clause. For example, for the comment information "the mobile phone has good quality and the battery is very durable", the comment information includes two clauses, namely "the mobile phone has good quality" and "the battery is very durable".
[0057] It should be noted that the comment information in the above comment information set may be comment information without word segmentation and part-of-speech tagging.
[0058] Step 302: segment each comment information in the comment information set, and perform part-of-speech tagging for each segmented word.
[0059] In this embodiment, after acquiring the comment information set, the electronic device may segment each comment information in the comment information set and perform part-of-speech tagging for each segmented word.
[0060] As an example, the electronic device may perform a full segmentation method or other processing on the comment information to segment the comment information into words. In addition, the electronic device may store multiple word sets locally or in a server remotely connected to the electronic device in advance, and any two word sets may correspond to different part-of-speech identifiers (e.g., part-of-speech names or part-of-speech numbers, etc.). The electronic device may use these word sets to determine the part-of-speech of each separated word and perform part-of-speech tagging for each word.
[0061] Step 303: for each comment information in the comment information set, execute a processing step on each clause in the comment information.
[0062] In this embodiment, for each comment information in the comment information set, the electronic device may perform the following processing steps on each clause in the comment information:
[0063] First, the electronic device may search for a target evaluation word contained in a preset evaluation word set in a clause.
[0064] Then, in response to the electronic device finding the target evaluation word, the electronic device may traverse forward in the clause starting from the position of the target evaluation word to find the first target word with a preset part of speech.
[0065] Then, in response to the electronic device finding the first target word, the electronic device may continue to traverse forward from the current position to find the first second target word whose part of speech is not the preset part of speech.
[0066] Finally, in response to the above-mentioned electronic device finding the second target word or failing to find the second target word when traversing to the beginning of the clause, the above-mentioned electronic device can extract a phrase from the clause as an opinion phrase based on the stop position when the search is stopped and the position of the target evaluation word, and output the opinion phrase.
[0067] Step 304 , selecting an opinion phrase from the determined opinion phrases as a representative opinion phrase, and outputting the representative opinion phrase.
[0068] In this embodiment, after the electronic device performs the above processing steps for each clause respectively included in each comment information in the above comment information set, the electronic device may select an opinion phrase from the determined opinion phrases as a representative opinion phrase, and output the representative opinion phrase, for example, outputting the representative opinion phrase to a specified page or a specified file, etc.
[0069] As an example, the electronic device may select an opinion phrase as a representative opinion phrase from the opinion phrases through the following steps:
[0070] First, the electronic device may determine the similarity between each of the opinion phrases and each classification phrase in a preset classification phrase set.
[0071] Then, the electronic device may divide the opinion phrases into at least one opinion phrase group based on the determined similarity.
[0072] Then, for each opinion phrase group divided, the electronic device may select an opinion phrase from the opinion phrase group as the first opinion phrase based on the number of times the opinion phrase appears in the comment information in the comment information set. For example, if the opinion phrase group includes more than two opinion phrases, the electronic device may select the opinion phrase that appears the most times in the comment information in the comment information set from the opinion phrase group as the first opinion phrase. If the opinion phrase group includes one opinion phrase, the electronic device may directly select the opinion phrase as the first opinion phrase.
[0073] Finally, the electronic device may select a first opinion phrase from the determined first opinion phrases as a representative opinion phrase. For example, the electronic device may select each first opinion phrase from the determined first opinion phrases as a representative opinion phrase.
[0074] It should be noted that the classification phrases in the classification phrase set may be representative phrases in an existing cluster. The electronic device may use a processing method such as a Single-Pass clustering method to determine the similarity between each of the opinion phrases and each of the classification phrases in the classification phrase set, and divide the opinion phrases into at least one opinion phrase group based on the determined similarity.
[0075] It should be pointed out that the Single-Pass clustering method, also known as the single-channel method or the single-pass method, is a classic method for streaming data clustering. When the above-mentioned electronic device adopts the Single-Pass clustering method, it can use the cosine similarity method to determine the similarity between each of the above-mentioned opinion phrases and each classification phrase in the above-mentioned classification phrase set. For each classification phrase in the above-mentioned classification phrase set, the above-mentioned electronic device can classify the opinion phrases whose similarity with the classification phrase is not less than the similarity threshold into the same opinion phrase group. For any opinion phrase whose similarity with each classification phrase in the above-mentioned classification phrase set is less than the above-mentioned similarity threshold, the above-mentioned electronic device can classify the opinion phrase into an opinion phrase group.
[0076] In some optional implementations of this embodiment, the electronic device may select a first opinion phrase from the first opinion phrases as a representative opinion phrase by taking the following steps:
[0077] First, the electronic device may determine semantic similarities between two first opinion phrases.
[0078] Then, the electronic device may divide the first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity.
[0079] Then, for each divided first opinion phrase group, the electronic device may select a first opinion phrase from the first opinion phrase group as the second opinion phrase based on the number of times the first opinion phrase appears in the comment information in the comment information set. For example, if the first opinion phrase includes more than two first opinion phrases, the electronic device may select the first opinion phrase that appears the most times in the comment information in the comment information set from the first opinion phrase group as the representative opinion phrase. If the first opinion phrase group includes one first opinion phrase, the electronic device may directly select the first opinion phrase as the second opinion phrase.
[0080] Finally, the electronic device may select a second opinion phrase from the determined second opinion phrases as a representative opinion phrase. As an example, the electronic device may select each second opinion phrase from the determined second opinion phrases as a representative opinion phrase.
[0081] It should be noted that the above-mentioned electronic device can use processing means such as the Word2Vec method to determine the semantic similarity between the first opinion phrases, and divide the above-mentioned first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity. For example, first opinion phrases whose semantic similarity is not less than the semantic similarity threshold are classified into the same first opinion phrase group. Here, the Word2Vec method can also be called a word embedding method, which can be used to achieve normalization of semantically related phrases. For example, "cheap price" and "not expensive price" are not similar in edit distance, but their meanings are similar, and Word2Vec calculates similarity based on the context of words, so such phrases can be merged.
[0082] In some optional implementations of this embodiment, the electronic device may select a second opinion phrase from the second opinion phrases as a representative opinion phrase by taking the following steps:
[0083] First, the electronic device may divide the second opinion phrases into at least one second opinion phrase group based on at least one preset word set. The word set may include words with the same meaning (for example, "beautiful" and "beautiful" are a group of words with the same meaning, and "happy" and "happy" are also a group of words with the same meaning). As an example, for any two second opinion phrases in the second opinion phrases, the electronic device may search whether the two second opinion phrases include words in the same word set. If so, the electronic device may classify the two second opinion phrases into the same second opinion phrase group.
[0084] Then, for each divided second opinion phrase group, the electronic device may select a second opinion phrase from the second opinion phrase group as a representative opinion phrase based on the number of times the second opinion phrase appears in the comment information in the comment information set. For example, if the second opinion phrase includes more than two second opinion phrases, the electronic device may select the second opinion phrase that appears the most times in the comment information in the comment information set from the second opinion phrase group as the representative opinion phrase. If the second opinion phrase group includes one second opinion phrase, the electronic device may directly select the second opinion phrase as the representative opinion phrase.
[0085] from Figure 3 It can be seen that Figure 2Compared with the corresponding embodiment, the process 300 of the information output method in this embodiment highlights the steps of segmenting the comment information in the comment information set and tagging the parts of speech for the segmented words, as well as the steps of selecting an opinion phrase from each determined opinion phrase as a representative opinion phrase and outputting the representative opinion phrase. Therefore, the scheme described in this embodiment can achieve more comprehensive information processing. By determining the representative opinion phrase, the normalization processing of the opinion phrase is achieved, which effectively reduces the number of opinion phrases.
[0086] Further references Figure 4 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an information output device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0087] like Figure 4 As shown, the information output device 400 shown in this embodiment includes: an acquisition unit 401 and a processing unit 402. The acquisition unit 401 is configured to acquire a comment information set, wherein the comment information may include at least one clause; the processing unit 402 is configured to perform the following processing steps for each clause in the comment information in the above comment information set: searching for a target evaluation word contained in a preset evaluation word set in the clause; in response to finding the above target evaluation word, traversing forward from the position where the above target evaluation word is located in the clause as a starting point to search for the first first target word whose part of speech is the preset part of speech; in response to finding the above first target word, traversing forward from the current position to search for the first second target word whose part of speech is not the preset part of speech; in response to finding the above second target word or not finding the above second target word when traversing to the beginning of the clause, extracting a phrase from the clause as an opinion phrase based on the stop position when the search is stopped and the position where the above target evaluation word is located, and outputting the above opinion phrase.
[0088] In this embodiment, in the information output device 400, the specific processing of the acquisition unit 401 and the processing unit 402 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201 and step 202 in the corresponding embodiment are not repeated here.
[0089] In some optional implementations of the present embodiment, the processing unit 402 may include: an extraction subunit (not shown in the figure), configured to extract a phrase with the word at the stop position as the starting word and the target evaluation word as the ending word from the clause if the word at the stop position is a word with the preset part of speech.
[0090] In some optional implementations of this embodiment, the apparatus 400 may further include: a tagging unit (not shown in the figure), configured to segment each comment information in the comment information set and perform part-of-speech tagging for each segmented word.
[0091] In some optional implementations of this embodiment, the above-mentioned device 400 may also include: a first processing unit (not shown in the figure), configured to select an opinion phrase from the determined opinion phrases as a representative opinion phrase, and output the representative opinion phrase.
[0092] In some optional implementations of the present embodiment, the above-mentioned first processing unit may include: a determination subunit (not shown in the figure), configured to determine the similarity between the above-mentioned each opinion phrase and each classification phrase in a preset classification phrase set; a division subunit (not shown in the figure), configured to divide the above-mentioned each opinion phrase into at least one opinion phrase group based on the determined similarity; a first selection subunit (not shown in the figure), configured to select an opinion phrase from the opinion phrase group as a first opinion phrase based on the number of times the opinion phrase appears in the comment information in the above-mentioned comment information set for each divided opinion phrase group; a second selection subunit (not shown in the figure), configured to select a first opinion phrase from the determined first opinion phrases as a representative opinion phrase.
[0093] In some optional implementations of the present embodiment, the above-mentioned second selection subunit may include: a determination module (not shown in the figure), configured to determine the semantic similarity between each first opinion phrase; a division module (not shown in the figure), configured to divide the above-mentioned first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity; a first selection module (not shown in the figure), configured to select a first opinion phrase from the first opinion phrase group as a second opinion phrase based on the number of times the first opinion phrase appears in the comment information in the above-mentioned comment information set for each divided first opinion phrase group; a second selection module (not shown in the figure), configured to select a second opinion phrase from the determined second opinion phrases as a representative opinion phrase.
[0094] In some optional implementations of the present embodiment, the second selection module may be further configured to: divide the second opinion phrases into at least one second opinion phrase group based on at least one preset word set, wherein the word set may include words with the same meaning; for each divided second opinion phrase group, select a second opinion phrase from the second opinion phrase group as a representative opinion phrase based on the number of times the second opinion phrase appears in the comment information in the comment information set.
[0095] The device provided by the above-mentioned embodiment of the present application improves the completeness of the mined opinion phrases by performing a specified processing step on each clause included in each comment information in the acquired comment information set.
[0096] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 suitable for implementing an electronic device of an embodiment of the present application. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0097] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0098] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.
[0100] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit and a processing unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a set of comment information".
[0103] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or it may exist independently and not be assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device includes: obtaining a comment information set, wherein the comment information may include at least one clause; for each comment information in the comment information set, performing the following processing steps for each clause in the comment information: searching for a target evaluation word contained in a preset evaluation word set in the clause; in response to finding the target evaluation word, traversing forward from the position where the target evaluation word is located in the clause as the starting point, searching for the first first target word whose part of speech is the preset part of speech; in response to finding the first target word, continuing to traverse forward from the current position, searching for the first second target word whose part of speech is not the above preset part of speech; in response to finding the second target word or not finding the second target word when traversing to the beginning of the clause, extracting a phrase from the clause as an opinion phrase based on the stop position when the search is stopped and the position where the target evaluation word is located, and outputting the opinion phrase.
[0104] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. An information output method, comprising: Obtaining a comment information set, wherein the comment information includes at least one clause; For each comment information in the comment information set, the following processing steps are performed on each clause in the comment information: Searching the clause for a target evaluation word contained in a preset evaluation word set; In response to finding the target evaluation word, traverse forward in the clause starting from the position where the target evaluation word is located to find a first target word whose part of speech is a preset part of speech; In response to finding the first target word, continue traversing forward from the current position to find a first second target word whose part of speech is not the preset part of speech; In response to finding the second target word or not finding the second target word when traversing to the beginning of the clause, a phrase is extracted from the clause as an opinion phrase based on the stop position when the search is stopped and the position of the target evaluation word, including: in response to finding the second target word, extracting a phrase with the second target word's next word as the starting word and the target evaluation word as the ending word as the opinion phrase, wherein all the words include the first target word and other words except the first target word, and outputting the opinion phrase, wherein the second target word's next word and the first target word are both nouns, and the second target word's next word is different from the first target word.
2. The method according to claim 1, wherein: The step of extracting a phrase from the clause as an opinion phrase based on the stop position when the search is stopped and the position of the target evaluation word includes: If the word at the stop position is a word with the preset part of speech, a phrase with the word at the stop position as the starting word and the target evaluation word as the ending word is extracted from the clause.
3. The method according to claim 1, wherein: After obtaining the comment information set, the method further includes: Each comment information in the comment information set is segmented, and each segmented word is tagged with a part of speech.
4. The method according to claim 1, wherein: The method further comprises: An opinion phrase is selected from the determined opinion phrases as a representative opinion phrase, and the representative opinion phrase is output.
5. The method according to claim 4, wherein: The selecting an opinion phrase from the determined opinion phrases as a representative opinion phrase includes: Determining the similarity between each opinion phrase and each classification phrase in a preset classification phrase set; Based on the determined similarity, dividing the opinion phrases into at least one opinion phrase group; For each divided opinion phrase group, based on the number of times the opinion phrase appears in the comment information in the comment information set, selecting an opinion phrase from the opinion phrase group as a first opinion phrase; A first opinion phrase is selected from the determined first opinion phrases as a representative opinion phrase.
6. The method according to claim 5, wherein: The selecting a first opinion phrase from the determined first opinion phrases as a representative opinion phrase includes: Determine the semantic similarity between the first opinion phrases; Based on the determined semantic similarity, dividing the first opinion phrases into at least one first opinion phrase group; For each divided first opinion phrase group, based on the number of times the first opinion phrase appears in the comment information in the comment information set, selecting a first opinion phrase from the first opinion phrase group as a second opinion phrase; A second opinion phrase is selected from the determined second opinion phrases as a representative opinion phrase.
7. The method according to claim 6, wherein: The selecting a second opinion phrase from the determined second opinion phrases as a representative opinion phrase includes: Based on at least one preset word set, dividing the second opinion phrases into at least one second opinion phrase group, wherein the word set includes words with the same meaning; For each divided second opinion phrase group, based on the number of times the second opinion phrase appears in the comment information in the comment information set, a second opinion phrase is selected from the second opinion phrase group as a representative opinion phrase.
8. An information output device, comprising: An acquisition unit configured to acquire a set of comment information, wherein the comment information includes at least one clause; The processing unit is configured to perform the following processing steps on each clause in each comment information in the comment information set: Searching the clause for a target evaluation word contained in a preset evaluation word set; In response to finding the target evaluation word, traverse forward in the clause starting from the position where the target evaluation word is located to find a first target word whose part of speech is a preset part of speech; In response to finding the first target word, continue traversing forward from the current position to find a first second target word whose part of speech is not the preset part of speech; In response to finding the second target word or not finding the second target word when traversing to the beginning of the clause, a phrase is extracted from the clause as an opinion phrase based on the stop position when the search is stopped and the position of the target evaluation word, including: in response to finding the second target word, extracting a phrase with the second target word's next word as the starting word and the target evaluation word as the ending word as the opinion phrase, wherein all the words include the first target word and other words except the first target word, and outputting the opinion phrase, wherein the second target word's next word and the first target word are both nouns, and the second target word's next word is different from the first target word.
9. The device according to claim 8, wherein: The processing unit comprises: The extraction subunit is configured to extract a phrase starting with the word at the stop position and ending with the target evaluation word from the clause if the word at the stop position is a word with the preset part of speech.
10. The device according to claim 8, wherein: The device also includes: The tagging unit is configured to segment each comment information in the comment information set and perform part-of-speech tagging for each segmented word.
11. The device according to claim 8, wherein: The device also includes: The first processing unit is configured to select an opinion phrase from the determined opinion phrases as a representative opinion phrase, and output the representative opinion phrase.
12. The device according to claim 11, wherein The first processing unit comprises: A determination subunit configured to determine the similarity between each of the opinion phrases and each classification phrase in a preset classification phrase set; a division subunit, configured to divide the opinion phrases into at least one opinion phrase group based on the determined similarity; A first selection subunit is configured to select an opinion phrase from each divided opinion phrase group as a first opinion phrase based on the number of times the opinion phrase appears in the comment information in the comment information set; The second selection subunit is configured to select a first opinion phrase from the determined first opinion phrases as a representative opinion phrase.
13. The device according to claim 12, wherein: The second selection subunit includes: a determination module configured to determine semantic similarities between two first opinion phrases; a division module configured to divide the first opinion phrases into at least one first opinion phrase group based on the determined semantic similarity; A first selection module is configured to select a first opinion phrase from each divided first opinion phrase group as a second opinion phrase based on the number of times the first opinion phrase appears in the comment information in the comment information set; The second selection module is configured to select a second opinion phrase from the determined second opinion phrases as a representative opinion phrase.
14. The device according to claim 13, wherein: The second selection module is further configured to: Based on at least one preset word set, the second opinion phrases are divided into at least one second opinion phrase group, wherein the word set includes words with the same meaning; for each divided second opinion phrase group, based on the number of times the second opinion phrase appears in the comment information in the comment information set, a second opinion phrase is selected from the second opinion phrase group as a representative opinion phrase.
15. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
16. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.