Text reading method and device, electronic equipment and storage medium
By dividing the character strings of the text of the review and searching in the search database, using the string recognition fixed expressions correctly expressed in the specified fields, the problems of high false alarm rates and low recall rates in the prior art are solved, and higher recognition accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411801035.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-25
AI Technical Summary
When identifying fixed expression statements, the prior art cannot accurately distinguish sensitive content from ordinary content due to the complexity and diversity of language expressions due to the high false alarm rate and low recall rate.
By dividing strings of the text of the review and searching these strings in the search database, the strings correctly expressed in the specified field are used to identify fixed expressions in the text, reducing the false positive rate and improving the recognition accuracy.
It realizes more accurate identification of fixed expressions in the text, reduces the false positive rate, improves the accuracy of identification, reduces the dependence on manual review and testing, and improves the efficiency of text proofreading.
Smart Images

Figure CN119884337A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of text processing, and in particular to a text proofreading method, device, electronic equipment and storage medium. Background Art
[0002] With the rapid development of information technology, the speed and scope of text content dissemination have greatly increased, which may contain sensitive or inappropriate fixed expressions. Fixed expressions are fixed sentences or expressions with specific meanings and uses. In order to maintain the cleanliness of the network environment and improve the quality of the text, it is necessary to effectively identify and filter sensitive words or inappropriate fixed expressions in the text content. However, when identifying fixed expression sentences, the existing technology often has problems such as high false alarm rate and low recall rate due to the complexity and diversity of language expression, and cannot accurately distinguish between sensitive content and ordinary content. In addition, if manual review and testing are used to assist in improving accuracy, a lot of manpower is required. Therefore, there is an urgent need for a text proofreading solution that improves the accuracy of fixed expression recognition. Summary of the invention
[0003] The embodiment of the present invention provides a text review method, which aims to solve the problem that the existing technology often has a high false alarm rate and a low recall rate when identifying fixed expression sentences due to the complexity and diversity of language expression. The embodiment of the present invention provides a text review scheme for improving the accuracy of fixed expression recognition. By dividing the text to be reviewed into strings and searching these strings in a retrieval database, the fixed expressions in the text can be more accurately identified. Since the retrieval database contains the strings of correct expressions in the specified field, it can effectively distinguish between inappropriate content and ordinary content in the specified field, thereby reducing the false alarm rate and improving the accuracy of recognition.
[0004] In a first aspect, an embodiment of the present invention provides a text review method for reviewing text in a specified field, the method comprising the following steps:
[0005] Get the text to be reviewed;
[0006] Performing character string division on the text to be reviewed to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed;
[0007] Retrieving the character string to be reviewed in a search database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the search database includes character strings correctly expressed in the specified field;
[0008] Based on the recalled character string, a proofreading result of the text to be proofread is determined.
[0009] Optionally, the step of dividing the text to be reviewed into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed includes:
[0010] Performing character string division on the text to be reviewed to obtain an initial character string;
[0011] Perform keyword filtering processing on the initial character string based on the keywords of the specified field;
[0012] If the initial character string contains the keyword, the initial character string is determined as the character string to be reviewed;
[0013] If the initial character string does not contain the keyword, the initial character string is discarded.
[0014] Optionally, searching the to-be-checked character string in a search database to obtain at least one recalled character string corresponding to the to-be-checked character string includes:
[0015] Searching the character string to be reviewed in the search database;
[0016] If at least one correctly expressed character string is retrieved, determining that the character string to be reviewed belongs to the specified field, and determining at least one recalled character string corresponding to the character string to be reviewed from the at least one correctly expressed character string;
[0017] If the correctly expressed character string cannot be retrieved, it is determined that the character string to be reviewed does not belong to the specified field, and the character string to be reviewed is discarded.
[0018] Optionally, determining the proofreading result of the text to be proofread based on the recalled character string includes:
[0019] Calculating the similarity between the character string to be reviewed and the recalled character string;
[0020] Based on the similarity, determining at least one hit character string in at least one of the recalled character strings;
[0021] The proofreading result of the text to be proofread is determined according to the hit character string.
[0022] Optionally, the calculating the similarity between the character string to be reviewed and the recalled character string includes:
[0023] Calculate the number of hits of the characters in the recalled character string that have the same characters in the character string to be reviewed;
[0024] Based on the number of hits, the similarity between the character string to be reviewed and the recalled character string is determined.
[0025] Optionally, the determining at least one hit character string in at least one of the recalled character strings based on the similarity includes:
[0026] For each of the character strings to be reviewed, if there is at least one of the recalled character strings whose similarity is greater than or equal to the similarity threshold, it is determined that the character string to be reviewed belongs to the specified field, and at least one hit character string is determined from the at least one recalled character string whose similarity is greater than or equal to the similarity threshold;
[0027] If the similarity is less than the similarity threshold, it is determined that the character string to be reviewed does not belong to the designated field, and the character string to be reviewed and at least one of the recalled characters corresponding to the character string to be reviewed are discarded.
[0028] Optionally, determining the proofreading result of the text to be proofread according to the hit character string includes:
[0029] Determine whether the hit character string is the entire character string or a part of the character string to be reviewed;
[0030] If the hit character string is the entire character string or a part of the character string in the to-be-checked character string, it is determined that there is a correctly expressed character string in the to-be-checked text;
[0031] If the hit character string is not the entire character string in the character string to be reviewed, and is not a partial character string in the character string to be reviewed, it is determined that there is an incorrectly expressed character string in the text to be reviewed.
[0032] In a second aspect, an embodiment of the present invention further provides a text review device, the text review device comprising:
[0033] An acquisition module is used to acquire the text to be reviewed;
[0034] A division module, used for dividing the text to be reviewed into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed;
[0035] A retrieval module, configured to retrieve the character string to be reviewed in a retrieval database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the retrieval database includes character strings correctly expressed in the specified field;
[0036] A processing module is used to determine the proofreading result of the text to be proofread based on the recalled character string.
[0037] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the text proofreading method provided in the embodiment of the present invention when executing the computer program.
[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the text proofreading method provided in the embodiment of the invention are implemented.
[0039] In an embodiment of the present invention, a text to be reviewed is obtained; the text to be reviewed is divided into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed; the character strings to be reviewed are searched in a search database to obtain at least one recall character string corresponding to the character strings to be reviewed, and the search database includes character strings correctly expressed in a specified field; based on the recall character strings, a review result of the text to be reviewed is determined. The present invention can more accurately identify fixed expressions in the text by dividing the text to be reviewed into character strings and searching in a search database. Since the search database includes character strings correctly expressed in a specified field, it can effectively distinguish between inappropriate content and ordinary content in the specified field, thereby reducing the false alarm rate, improving the accuracy of recognition, and eliminating the need for manual review and testing, thereby improving the efficiency of text review. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a flow chart of a text review method provided by an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of keyword extraction provided by an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of a search database and keyword initialization provided by an embodiment of the present invention;
[0044] Figure 4 is a schematic diagram of similarity judgment provided by an embodiment of the present invention;
[0045] Figure 5 is a flow chart of another text review method provided by an embodiment of the present invention;
[0046] Figure 6 is a structural schematic diagram of a text review device provided by an embodiment of the present invention;
[0047] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] like Figure 1 As shown, Figure 1 1 is a flowchart of a text review method provided by an embodiment of the present invention, the text review method comprising the steps of:
[0050] 101. Get the text to be reviewed.
[0051] In an embodiment of the present invention, the text review method can be applied to a text review platform, which can be constructed based on a server or a distributed server, and includes a text interface and a text review program. The text interface can be used to obtain text data to be reviewed, which can be text in different formats, and the text review program can be used to implement each step of the text review method.
[0052] The above-mentioned text review platform can be used for text review in a specified field. The above-mentioned specified field can be a user-specified field, a default field, or a dedicated field. The above-mentioned field can be various existing fields, such as the political field, the art field, the entertainment field, the education field, etc. Different fields have different fixed expressions. Correspondingly, texts in different fields will also have some fixed expressions in their respective fields. For example, "implementing XXX's policy", "holding XXX meeting", etc. in the political field, "the heavenly sound of XX", "XX graceful", etc. in the art field, "XXX big coffee", "actor XXX", etc. in the entertainment field, "XXX classroom", "open XX page of the book", etc. in the education field.
[0053] Through the text interface, the text uploaded by the user is received and used as the text to be reviewed. The user's selection instruction for the field can also be received, and the field selected by the user is determined as the designated field.
[0054] 102. Perform character string division on the text to be reviewed to obtain multiple character strings to be reviewed corresponding to the text to be reviewed.
[0055] In the embodiment of the present invention, the text to be reviewed is divided into character strings. The entire text to be reviewed is decomposed into smaller character strings. One text to be reviewed can be divided into multiple character strings to be reviewed. The above character strings can be sentences.
[0056] The text to be reviewed can be divided into strings through regular expressions, natural language processing (NLP) or word segmentation tools. Regular expressions can split text according to spaces, punctuation marks or other specific characters.
[0057] In a possible embodiment, the text to be reviewed can be processed by the word segmentation tool Jieba to obtain multiple character strings to be reviewed. Jieba's precise mode can be used to accurately segment the character strings in the text to be reviewed as the character strings to be reviewed. If there are some fixed-expression proper nouns or terms that are not in Jieba's default dictionary, a custom dictionary can be added to improve the accuracy of word segmentation. By adding fixed-expression proper nouns or terms in a specified field, a character string that is more in line with the expression habits of the specified field can be split out.
[0058] 103. Search the character string to be reviewed in a search database to obtain at least one recalled character string corresponding to the character string to be reviewed.
[0059] In an embodiment of the present invention, the above retrieval database includes character strings correctly expressed in a specified field. Specifically, the above retrieval database may include character strings correctly expressed in multiple fields, and these character strings are stored regionally by field.
[0060] For each string to be reviewed, a search will be performed in the search database to obtain at least one recalled string. It should be noted that not every string to be reviewed will have a corresponding string retrieved. For a string to be reviewed that has no corresponding string retrieved, it means that it is not a string in the specified field. For the string to be reviewed, only the string to be reviewed that has a corresponding string retrieved can be retained, and the corresponding string retrieved for the string to be reviewed can be determined as a recalled string.
[0061] 104. Determine a proofreading result of the text to be proofread based on the recalled character string.
[0062] In the embodiment of the present invention, after obtaining the recalled string corresponding to the string to be reviewed, the recalled string can be sent to manual review, and the staff can judge whether the string to be reviewed is a correctly expressed string. If all the strings to be reviewed are correctly expressed strings, it can be determined that the review result of the text to be reviewed is passed; if there is a string to be reviewed that is an incorrectly expressed string, it can be determined that the review result of the text to be reviewed is failed.
[0063] For texts that fail to pass the proofreading, the incorrectly expressed character strings to be proofread can be marked.
[0064] In a possible embodiment, it is also possible to determine whether the string to be reviewed is a correctly expressed string by determining whether the recalled string is included in the string to be reviewed. If one recalled string is included in the string to be reviewed, it can be said that all the strings to be reviewed are correctly expressed strings. If all recalled strings are not included in the string to be reviewed, it can be said that all the strings to be reviewed are incorrectly expressed strings.
[0065] In an embodiment of the present invention, a text to be reviewed is obtained; a character string is divided into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed; a character string to be reviewed is searched in a search database to obtain at least one recall character string corresponding to the character string to be reviewed, and the search database includes character strings correctly expressed in a specified field; and a review result of the text to be reviewed is determined based on the recall character strings. The present invention can more accurately identify fixed expressions in the text by dividing the character string to be reviewed and searching in a search database. Since the search database includes character strings correctly expressed in a specified field, it can effectively distinguish between inappropriate content and ordinary content in the specified field, thereby reducing the false alarm rate, improving the accuracy of recognition, and eliminating the need for manual review and testing, thereby improving the efficiency of text review. .
[0066] It is understandable that in the specific implementation of this application, text data, user data, retrieval data and other related data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training, deployment and calling of algorithm models, must comply with relevant laws, regulations and standards of relevant countries and regions.
[0067] Optionally, in the step of performing string division on the text to be reviewed to obtain multiple strings to be reviewed corresponding to the text to be reviewed, the text to be reviewed can be divided into strings to obtain initial strings; keyword filtering processing is performed on the initial strings based on keywords in a specified field; if an initial string contains a keyword, the initial string is determined as a string to be reviewed; if an initial string does not contain a keyword, the initial string is discarded.
[0068] In an embodiment of the present invention, the text to be reviewed can be processed by the word segmentation tool Jieba to obtain multiple initial strings. The exact mode of Jieba can be used to accurately segment the strings in the text to be reviewed as initial strings. If there are some proper nouns or terms with fixed expressions not in the default dictionary of Jieba, a custom dictionary can be added to improve the accuracy of word segmentation.
[0069] After obtaining the initial strings, the initial strings can be filtered, and the initial strings that do not belong to the specified field are filtered out. The remaining initial strings can be considered as initial strings belonging to the specified field. The remaining initial strings are determined as strings to be reviewed.
[0070] In a possible embodiment, keyword extraction can be performed on the initial strings, and the extracted keywords are compared with the keywords in the specified field loaded into the memory. The initial strings where the comparison fails are filtered. The keyword extraction function provided by Jieba can be used to extract keywords in the initial strings based on the TF-IDF algorithm. The specific steps of keyword extraction can be as Figure 2 shown.
[0071] Among the extracted keywords, there may be some non-political words, and these words can be removed by setting filtering conditions, such as removing stop words (['of', 'is', 'in', 'have']), and only retaining words of specific parts of speech, such as nouns, verbs, adjectives, etc.
[0072] Optionally, in the step of retrieving the strings to be reviewed in the retrieval database to obtain at least one recalled string corresponding to the strings to be reviewed, the strings to be reviewed are retrieved in the retrieval database; if at least one correctly expressed string is retrieved, it is determined that the strings to be reviewed belong to the specified field, and at least one recalled string corresponding to the strings to be reviewed is determined from at least one correctly expressed string; if no correctly expressed string is retrieved, it is determined that the strings to be reviewed do not belong to the specified field, and the strings to be reviewed are discarded.
[0073] In the embodiment of the present invention, a large number of correct and standardized string expressions in a specified field are stored in the retrieval database. During the retrieval process, if a correct expression string matching the string to be reviewed can be found, it means that the string to be reviewed belongs to the specified field and its expression is standardized. At this time, the most appropriate recall string can be selected from the matched correctly expressed strings according to certain rules (such as matching degree, relevance, etc.), for example, the top ten strings can be selected as the recall strings of the string to be reviewed.
[0074] If the correct expression string matching the string to be reviewed is not found during the search process, it means that the string to be reviewed may not belong to the specified field. In this case, in order to avoid adding subsequent review processes and wasting computing resources, the strings to be reviewed that cannot be matched can be discarded.
[0075] In order to improve the accuracy and efficiency of retrieval, the retrieval database needs to be updated and maintained regularly, including adding new correctly expressed strings, deleting outdated or erroneous records, and optimizing retrieval algorithms.
[0076] The above-mentioned retrieval database can be an Elasticsearch (ES) database, which is an open source search engine based on Lucene and provides full-text search and analysis functions. In the present invention, the ES database is used to set a matching threshold and perform a first round of rough recall of correctly expressed strings. For the strings to be reviewed that are not filtered out by keywords, a first round of recall matching can be performed through word segmentation matching of the ES database to determine whether the strings to be reviewed belong to a fixed expression in a specified field. The top N strings with the highest similarity under the set threshold can be obtained from the ES database as the recall strings of the strings to be reviewed, and N recalled strings can be obtained.
[0077] In a possible embodiment, the initialization of the above-mentioned search database and the initialization of the specified field keywords can be parameterized Figure 3 ,like Figure 3 As shown, fixed expression sentences in a specified field can be collected, keywords can be extracted from the fixed expression sentences, and the keywords in the fixed expression sentences can be loaded into the memory as keywords in the specified field for keyword pre-filtering. By first performing word segmentation on the fixed expression sentences, Jieba's precise mode can be used to accurately segment the strings in the fixed expression sentences, and the strings in the fixed expression sentences can be synchronized to the ES database for storage.
[0078] Optionally, in the step of determining the proofreading result of the text to be proofread based on the recalled character string, the similarity between the character string to be proofread and the recalled character string can be calculated; based on the similarity, at least one hit character string can be determined in at least one recalled character string; and based on the hit character string, the proofreading result of the text to be proofread is determined.
[0079] In the embodiment of the present invention, the similarity between the character string to be reviewed and the recalled character string can be calculated by similarity algorithms such as cosine similarity, semantic similarity, metric similarity, etc. The similarity between the character string to be reviewed and the recalled character string can also be calculated based on ASCII code values.
[0080] It should be noted that the similarity algorithm for calculating the similarity between the character string to be reviewed and the recalled character string is different from the similarity algorithm used in the search database.
[0081] Recall strings with similarities greater than or equal to a similarity threshold can be determined as hit strings. If the similarities corresponding to multiple recall strings are greater than or equal to the similarity threshold, similarity TOPK can be used to select K hit strings, where K is less than or equal to N.
[0082] Optionally, in the step of calculating the similarity between the character string to be reviewed and the recalled character string, the number of hits of the characters in the recalled character string with the same characters in the character string to be reviewed may be calculated; and the similarity between the character string to be reviewed and the recalled character string is determined based on the number of hits.
[0083] In an embodiment of the present invention, the number of hits of characters in the recalled string that have the same characters in the string to be reviewed is calculated, and the calculation of the number of hits is completed by comparing the characters in the recalled string with those in the string to be reviewed. Each character in the recalled string can be checked one by one to see if it appears in the string to be reviewed. Whenever a matching character is found, the number of hits increases by 1 until all characters in the recalled string have been checked. The ratio between the number of hits and the number of characters in the recalled string can be calculated, and the higher the ratio, the greater the similarity. If the ratio is 1, it means that all the characters in the recalled string appear in the string to be reviewed, and the similarity is 1. If the number of hits is 0, it means that all the characters in the recalled string appear in the string to be reviewed, and the similarity is 0.
[0084] Optionally, in the step of determining at least one hit string in at least one recalled string based on similarity, for each string to be reviewed, if there is at least one recalled string whose similarity is greater than or equal to a similarity threshold, it is determined that the string to be reviewed belongs to the specified field, and at least one hit string is determined in at least one recalled string whose similarity is greater than or equal to the similarity threshold; if the similarity is less than the similarity threshold, it is determined that the string to be reviewed does not belong to the specified field, and the string to be reviewed and at least one recalled string corresponding to the string to be reviewed are discarded.
[0085] In the embodiment of the present invention, by determining whether the similarity is greater than or equal to the similarity threshold, those character strings that are sufficiently similar to the character string to be reviewed can be selected from all recalled character strings. If the similarity of a recalled character string is greater than or equal to the similarity threshold, it can be considered that the recalled character string is similar to the character string to be reviewed and can be used as a candidate for a hit character string.
[0086] At least one hit string is determined from the recalled strings whose similarity is greater than or equal to the similarity threshold, and the hit string can be finally determined from the candidate recalled strings. Specifically, when the similarity of the recalled strings reaches or exceeds the threshold, TOPK recalled strings can be taken as hit strings and can be determined as hit strings.
[0087] The above-mentioned hit character string can be used to finally determine whether the character string to be reviewed is a correctly expressed character string.
[0088] By screening the similarity and determining the hit character string, it can be ensured that only the recalled character string that is sufficiently similar to the character string to be reviewed will be determined as the hit character string, thereby improving the accuracy of the review result.
[0089] In a possible embodiment, the similarity is 0 or 1, the similarity threshold is 1, a similarity of 1 indicates similarity, and a similarity of 0 indicates dissimilarity. Figure 4 As shown, at the beginning, input the recall string, input the string to be reviewed, traverse and compare each character of the string, after the traversal is completed, determine whether all the characters in the recall string are in the string to be reviewed, if so, it is determined that the string to be reviewed is similar to the recall string, and the string to be reviewed and the corresponding recall string are retained, if not, it means that the string to be reviewed is not similar to the recall string, and the recall string corresponding to the string to be reviewed is discarded, if a string to be reviewed discards all the recall strings, it means that the string to be reviewed does not belong to the specified field, and the string to be reviewed can also be discarded.
[0090] Optionally, in the step of determining the proofreading result of the text to be proofread based on the hit string, it can be determined whether the hit string is the entire string or a part of the string to be proofread; if the hit string is the entire string or a part of the string to be proofread, it is determined that there is a correctly expressed string in the text to be proofread; if the hit string is not the entire string in the string to be proofread, and is not a part of the string to be proofread, it is determined that there is an incorrectly expressed string in the text to be proofread.
[0091] In an embodiment of the present invention, the character string to be reviewed is compared with each corresponding hit character string, and the inclusion relationship between the character string to be reviewed and the hit character string is analyzed. Since the hit character string is a correctly expressed character string, if the character string to be reviewed contains a complete hit character string, it means that the character string to be reviewed contains the correctly expressed character string, which is also a correctly expressed character string.
[0092] The above inclusion can be full inclusion or partial inclusion. Full inclusion means that the character string to be reviewed is the same as the hit character string, that is, the characters of the character string to be reviewed and the hit character string are the same, and the character order is the same. Partial inclusion means that a part of the character string to be reviewed is the same as the hit character string, that is, a part of the character string to be reviewed and the hit character string are the same, and the character order is the same.
[0093] The longest common subsequence (LCS) or the longest common substring (LCSS) etc. may be used to quantify the identical parts between two character strings, and then determine the inclusion relationship between the character string to be checked and the hit character string.
[0094] In a possible embodiment, Figure 5 As shown, Figure 5 is a flowchart of another text review method provided by an embodiment of the present invention. Figure 5 In the process, start proofreading the fixed expressions of the text to be proofread in the specified field; divide the sentences; pre-filter the keywords; determine whether the keywords are hit. If not, it does not belong to the specified field sentence. If it is hit, perform recall matching in the ES retrieval database to determine whether the TOPN sentences under the recall threshold are hit. If not, it does not belong to the specified field sentence. If it is hit, calculate the sentence similarity (ASCII code is calculated by character); determine whether there are one or more matches. If not, it does not belong to the specified field sentence. If yes, it belongs to the specified field sentence. Perform inclusion relationship analysis on the original sentence and the matched recall sentence; determine whether the original sentence contains the recall sentence. If yes, the original sentence is the correct expression sentence in the specified field. If not, the original sentence is the wrong expression sentence in the specified field.
[0095] like Figure 6As shown, an embodiment of the present invention provides a text review device, the text review device comprising:
[0096] An acquisition module 601 is used to acquire the text to be reviewed;
[0097] A division module 602 is used to divide the text to be reviewed into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed;
[0098] A retrieval module 603 is used to search the character string to be reviewed in a retrieval database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the retrieval database includes character strings correctly expressed in the specified field;
[0099] The processing module 604 is used to determine the proofreading result of the text to be proofread based on the recalled character string.
[0100] Optionally, the segmentation module 602 is also used to perform string segmentation on the text to be reviewed to obtain an initial string; perform keyword filtering on the initial string based on keywords in the specified field; if the initial string contains the keywords, the initial string is determined as the string to be reviewed; if the initial string does not contain the keywords, the initial string is discarded.
[0101] Optionally, the retrieval module 603 is also used to search the character string to be proofread in the retrieval database; if at least one correctly expressed character string is retrieved, it is determined that the character string to be proofread belongs to the specified field, and at least one recalled character string corresponding to the character string to be proofread is determined in at least one correctly expressed character string; if the correctly expressed character string cannot be retrieved, it is determined that the character string to be proofread does not belong to the specified field, and the character string to be proofread is discarded.
[0102] Optionally, the processing module 604 is further configured to calculate the similarity between the character string to be proofread and the recalled character string; based on the similarity, determine at least one hit character string in at least one recalled character string; and determine the proofreading result of the text to be proofread according to the hit character string.
[0103] Optionally, the processing module 604 is further configured to calculate the number of hits of the characters in the recalled character string that have the same characters in the character string to be reviewed; and determine the similarity between the character string to be reviewed and the recalled character string based on the number of hits.
[0104] Optionally, the processing module 604 is also used to, for each of the character strings to be proofread, if there is at least one recalled character string whose similarity is greater than or equal to the similarity threshold, determine that the character string to be proofread belongs to the specified field, and determine at least one hit character string from at least one recalled character string whose similarity is greater than or equal to the similarity threshold; if the similarity is less than the similarity threshold, determine that the character string to be proofread does not belong to the specified field, and discard the character string to be proofread and at least one recalled character string corresponding to the character string to be proofread.
[0105] Optionally, the processing module 604 is also used to determine whether the hit string is the entire string or part of the string to be proofread; if the hit string is the entire string or part of the string to be proofread, it is determined that there is a correctly expressed string in the text to be proofread; if the hit string is not the entire string in the string to be proofread, and is not part of the string in the string to be proofread, it is determined that there is an incorrectly expressed string in the text to be proofread.
[0106] like Figure 7 As shown, an embodiment of the present invention further provides an electronic device, including a processor, and the processor can execute any one of the above-mentioned text proofreading methods.
[0107] Specifically, it includes a processor 701 and a memory 702, and a computer program for executing the text review method stored in the memory 702 and capable of running on the processor 701, wherein:
[0108] The processor 701 runs the computer program of the text review method stored in the memory 702 to perform the following steps:
[0109] Get the text to be reviewed;
[0110] Performing character string division on the text to be reviewed to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed;
[0111] Retrieving the character string to be reviewed in a search database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the search database includes character strings correctly expressed in the specified field;
[0112] Based on the recalled character string, a proofreading result of the text to be proofread is determined.
[0113] Optionally, the processor 701 performs character string segmentation on the text to be reviewed to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed, including:
[0114] Performing character string division on the text to be reviewed to obtain an initial character string;
[0115] Perform keyword filtering processing on the initial character string based on the keywords of the specified field;
[0116] If the initial character string contains the keyword, the initial character string is determined as the character string to be reviewed;
[0117] If the initial character string does not contain the keyword, the initial character string is discarded.
[0118] Optionally, the step of searching the to-be-checked character string in a search database to obtain at least one recalled character string corresponding to the to-be-checked character string executed by the processor 701 includes:
[0119] Searching the character string to be reviewed in the search database;
[0120] If at least one correctly expressed character string is retrieved, determining that the character string to be reviewed belongs to the specified field, and determining at least one recalled character string corresponding to the character string to be reviewed from the at least one correctly expressed character string;
[0121] If the correctly expressed character string cannot be retrieved, it is determined that the character string to be reviewed does not belong to the specified field, and the character string to be reviewed is discarded.
[0122] Optionally, the determining of the proofreading result of the text to be proofread based on the recalled character string performed by the processor 701 includes:
[0123] Calculating the similarity between the character string to be reviewed and the recalled character string;
[0124] Based on the similarity, determining at least one hit character string in at least one of the recalled character strings;
[0125] The proofreading result of the text to be proofread is determined according to the hit character string.
[0126] Optionally, the calculating of the similarity between the character string to be reviewed and the recalled character string performed by the processor 701 includes:
[0127] Calculate the number of hits of the characters in the recalled character string that have the same characters in the character string to be reviewed;
[0128] Based on the number of hits, the similarity between the character string to be reviewed and the recalled character string is determined.
[0129] Optionally, the determining, based on the similarity, at least one hit character string in at least one of the recalled character strings performed by the processor 701 includes:
[0130] For each of the character strings to be reviewed, if there is at least one of the recalled character strings whose similarity is greater than or equal to the similarity threshold, it is determined that the character string to be reviewed belongs to the specified field, and at least one hit character string is determined from the at least one recalled character string whose similarity is greater than or equal to the similarity threshold;
[0131] If the similarity is less than the similarity threshold, it is determined that the character string to be reviewed does not belong to the designated field, and the character string to be reviewed and at least one of the recalled characters corresponding to the character string to be reviewed are discarded.
[0132] Optionally, the determining of the proofreading result of the text to be proofread according to the hit character string performed by the processor 701 includes:
[0133] Determine whether the hit character string is the entire character string or a part of the character string to be reviewed;
[0134] If the hit character string is the entire character string or a part of the character string in the to-be-checked character string, it is determined that there is a correctly expressed character string in the to-be-checked text;
[0135] If the hit character string is not the entire character string in the character string to be reviewed, and is not a partial character string in the character string to be reviewed, it is determined that there is an incorrectly expressed character string in the text to be reviewed.
[0136] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the text proofreading method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0138] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A text proofreading method, characterized in that: For text review in a specified field, the method comprises the following steps: Get the text to be reviewed; Performing character string division on the text to be reviewed to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed; Retrieving the character string to be reviewed in a search database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the search database includes character strings correctly expressed in the specified field; Based on the recalled character string, a proofreading result of the text to be proofread is determined.
2. The text proofreading method according to claim 1, characterized in that: The step of dividing the text to be reviewed into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed includes: Performing character string division on the text to be reviewed to obtain an initial character string; Perform keyword filtering processing on the initial character string based on the keywords of the specified field; If the initial character string contains the keyword, the initial character string is determined as the character string to be reviewed; If the initial character string does not contain the keyword, the initial character string is discarded.
3. The text proofreading method according to claim 1, characterized in that: The step of searching the character string to be reviewed in a search database to obtain at least one recalled character string corresponding to the character string to be reviewed includes: Searching the character string to be reviewed in the search database; If at least one correctly expressed character string is retrieved, determining that the character string to be reviewed belongs to the specified field, and determining at least one recalled character string corresponding to the character string to be reviewed from the at least one correctly expressed character string; If the correctly expressed character string cannot be retrieved, it is determined that the character string to be reviewed does not belong to the specified field, and the character string to be reviewed is discarded.
4. The text proofreading method according to any one of claims 1 to 3, characterized in that: The step of determining the proofreading result of the text to be proofread based on the recalled character string includes: Calculating the similarity between the character string to be reviewed and the recalled character string; Based on the similarity, determining at least one hit character string in at least one of the recalled character strings; The proofreading result of the text to be proofread is determined according to the hit character string.
5. The text proofreading method according to claim 4, characterized in that: The calculating the similarity between the character string to be reviewed and the recalled character string includes: Calculate the number of hits of the characters in the recalled character string that have the same characters in the character string to be reviewed; Based on the number of hits, the similarity between the character string to be reviewed and the recalled character string is determined.
6. The text proofreading method according to claim 4, characterized in that: The step of determining at least one hit character string from at least one of the recalled character strings based on the similarity comprises: For each of the character strings to be reviewed, if there is at least one of the recalled character strings whose similarity is greater than or equal to the similarity threshold, it is determined that the character string to be reviewed belongs to the specified field, and at least one hit character string is determined from the at least one recalled character string whose similarity is greater than or equal to the similarity threshold; If the similarity is less than the similarity threshold, it is determined that the character string to be reviewed does not belong to the designated field, and the character string to be reviewed and at least one of the recalled characters corresponding to the character string to be reviewed are discarded.
7. The text proofreading method according to claim 4, characterized in that: Determining the proofreading result of the text to be proofread according to the hit character string includes: Determine whether the hit character string is the entire character string or a part of the character string to be reviewed; If the hit character string is the entire character string or a part of the character string in the to-be-checked character string, it is determined that there is a correctly expressed character string in the to-be-checked text; If the hit character string is not the entire character string in the character string to be reviewed, and is not a partial character string in the character string to be reviewed, it is determined that there is an incorrectly expressed character string in the text to be reviewed.
8. A text review device, characterized in that: The text review device comprises: An acquisition module is used to acquire the text to be reviewed; A division module, used for dividing the text to be reviewed into character strings to obtain a plurality of character strings to be reviewed corresponding to the text to be reviewed; A retrieval module, configured to retrieve the character string to be reviewed in a retrieval database to obtain at least one recalled character string corresponding to the character string to be reviewed, wherein the retrieval database includes character strings correctly expressed in the specified field; A processing module is used to determine the proofreading result of the text to be proofread based on the recalled character string.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the text review method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the text proofreading method according to any one of claims 1 to 7 are implemented.