Terminology and noun error correction method and device, electronic equipment and medium

By performing text segment recognition and term dictionary detection on the text, combined with knowledge graph verification, the problems of low efficiency and low accuracy of term noun correction in the existing technology are solved, and efficient and accurate term noun correction is achieved.

CN114118067BActive Publication Date: 2025-09-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111458336.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-09-23
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

Existing text error correction methods are inefficient and inaccurate when processing professional terminology and nouns, especially in scenarios where terminology and nouns are concentrated in the text, resulting in a high number of false recalls.

Method used

By identifying text fragments of the text to be corrected, we can obtain text fragments containing terminology and nouns, and use terminology dictionaries, N-Gram language models, etc. to detect and correct errors. In addition, we can combine knowledge graphs to verify the rationality of candidate terms and improve the efficiency and accuracy of error correction.

Benefits of technology

The efficiency and accuracy of terminology and noun error correction have been improved, especially in texts where terminology and nouns are concentrated, which significantly reduces the probability of false recalls and improves the accuracy of drug terminology error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114118067B_ABST
    Figure CN114118067B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and apparatus, electronic device, and medium for correcting terminology errors, relating to the field of artificial intelligence, and in particular, to the fields of natural language processing, data mining, and machine learning. The implementation scheme comprises: performing text segment identification on a text to be corrected to obtain a first text segment, wherein the first text segment is shorter than the text to be corrected and contains at least one terminology to be identified as having errors; obtaining a first terminology based on the first text segment, wherein the first terminology is a terminology identified as having errors; and determining a second terminology based on the first terminology to replace the first terminology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, in particular to the fields of natural language processing, data mining and machine learning technology, and specifically to a method, device, electronic device, computer-readable storage medium and computer program product for terminology correction. Background Art

[0002] Text error correction technology is widely used in technical fields such as optical character recognition (OCR) and speech recognition. Commonly used text error correction methods include rule-based methods and methods using deep models.

[0003] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention

[0004] The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for terminology correction.

[0005] According to one aspect of the present disclosure, a computer-implemented method for correcting terminology and nouns is provided, comprising: performing text segment identification on a text to be corrected to obtain a first text segment, wherein the length of the first text segment is smaller than the text to be corrected, and the first text segment contains at least one terminology and noun to be identified as having an error; based on the first text segment, obtaining a first terminology and noun, wherein the first terminology and noun is a terminology and noun that has been identified as having an error; and determining a second terminology and noun based on the first terminology and noun, wherein the second terminology and noun is used to replace the first terminology and noun.

[0006] According to another aspect of the present disclosure, a training method for a text segment recognition model for term noun error correction is provided, comprising: obtaining a sample data set, wherein each sample data in the sample data set includes a sample text, a plurality of first text segments, and category labels corresponding to the plurality of first text segments, and wherein the length of each first text segment in the plurality of first text segments is smaller than the sample text; initializing multiple parameters of the text segment recognition model; and for each sample data, performing the following operations: inputting the sample text into the text segment recognition model to obtain an output value, wherein the output value includes a plurality of predicted second text segments and categories corresponding to the plurality of second text segments; and adjusting multiple parameters of the text segment recognition model based on the plurality of second text segments, the categories corresponding to the plurality of second text segments, the plurality of first text segments, and the category labels corresponding to the plurality of first text segments.

[0007] According to another aspect of the present disclosure, a terminology noun correction device is provided, comprising: an identification unit configured to perform text segment identification on a text to be corrected to obtain a first text segment, wherein the length of the first text segment is smaller than the text to be corrected, and the first text segment contains at least one terminology noun to be identified as having an error; a first acquisition unit configured to acquire a first terminology noun based on the first text segment, wherein the first terminology noun is a terminology noun that has been identified as having an error; and a determination unit configured to determine a second terminology noun based on the first terminology noun, wherein the second terminology noun is used to replace the first terminology noun.

[0008] According to another aspect of the present disclosure, a training device for a text segment recognition model for term noun error correction is provided, comprising: a second acquisition unit, configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample text, a plurality of first text segments, and category labels corresponding to the plurality of first text segments, and wherein the length of each first text segment in the plurality of first text segments is smaller than the sample text; an initialization unit, configured to initialize a plurality of parameters of the text segment recognition model; and an input unit, configured to input the sample text into the text segment recognition model to obtain an output value, wherein the output value includes a plurality of predicted second text segments and categories corresponding to the plurality of second text segments; and an adjustment unit, configured to adjust a plurality of parameters of the text segment recognition model based on the plurality of second text segments, the categories corresponding to the plurality of second text segments, the plurality of first text segments, and the category labels corresponding to the plurality of first text segments.

[0009] According to one or more embodiments of the present disclosure, the accuracy of term noun error correction can be improved.

[0010] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0012] Figure 1 A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0013] Figure 2 A flowchart of a computer-implemented terminology noun error correction method according to an embodiment of the present disclosure is shown;

[0014] Figure 3 A flowchart of a computer-implemented terminology noun error correction method according to an embodiment of the present disclosure is shown;

[0015] Figure 4 A flowchart of a method for training a text segment recognition model for term noun error correction according to an embodiment of the present disclosure is shown;

[0016] Figure 5 A structural block diagram of a terminology and noun error correction device according to an embodiment of the present disclosure is shown;

[0017] Figure 6 A structural block diagram of a terminology and noun error correction device according to an embodiment of the present disclosure is shown;

[0018] Figure 7 A structural block diagram of a training device for a text segment recognition model for term noun error correction according to an embodiment of the present disclosure is shown;

[0019] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0020] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.

[0022] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.

[0023] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.

[0025] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the term noun correction method to be performed.

[0026] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0027] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0028] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to obtain the text to be corrected. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.

[0029] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may use various communication protocols.

[0030] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0031] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0032] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.

[0033] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0034] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.

[0035] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0036] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0037] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in accordance with the present disclosure.

[0038] At present, the main methods used to correct text errors involving professional terminology and nouns in texts include the following three methods:

[0039] (1) Rule-based methods: Matching detection and recall of terminology and nouns is performed through general entity dictionaries, N-Gram language models, confusion dictionaries, phonetic dictionaries, and similar-sounding dictionaries;

[0040] (2) Supervised learning method: By constructing a labeled training dataset, the model is trained based on the training dataset, and then the trained model is used for prediction. The models used mainly include the following categories: sequence labeling models, generation models, and translation models. Among them, the more commonly used models include LSTM, BERT, Seq2Seq models, etc.

[0041] (3) A two-stage solution based on error detection and recall: This solution is a combination of the above two methods, which divides text error correction into two stages: error detection and recall. In the error detection stage, various dictionaries, confusion sets, language models, or sequence labeling methods are mainly used to predict the erroneous sites; in the recall stage, multiple candidates are recalled for the erroneous sites through methods such as pinyin matching and N-Gram model, and finally the ranking model is used to rank the candidates, and the candidate with the highest ranking score is finally selected.

[0042] All three of the above solutions require error detection on the entire text, so they all have the problem of low efficiency. Moreover, due to the large number of false recalls, they all have the problem of low error correction accuracy.

[0043] Therefore, according to the embodiments of the present disclosure, Figure 2 As shown, a computer-implemented terminology noun correction method is provided, including: step S201, performing text segment identification on a text to be corrected to obtain a first text segment, wherein the length of the first text segment is smaller than the text to be corrected, and the first text segment contains at least one terminology noun to be identified as having errors; step S202, based on the first text segment, obtaining a first terminology noun, wherein the first terminology noun is a terminology noun that has been identified as having errors; and step S203, determining a second terminology noun based on the first terminology noun, wherein the second terminology noun is used to replace the first terminology noun.

[0044] According to the terminology and noun error correction method of the embodiment of the present invention, before error detection of terminology and nouns in a text is performed, an identification step of text segments containing terminology and nouns is added. By only performing terminology and noun detection and error correction on text segments containing terminology and nouns, the error correction efficiency is improved, false recalls can be reduced, and the accuracy of terminology and noun error correction can be improved.

[0045] Among them, for some scenarios, the technical effect achieved by the above method is particularly significant. In these scenarios, the text to be corrected for professional terminology shows the following characteristics: in the entire text, the term distribution is concentrated in several fragments. According to some embodiments, the text to be corrected with the above characteristics can be obtained in the scenario of voice recognition of electronic medical records. Among them, the drug terms in electronic medical records are usually concentrated in several text fragments of the entire electronic medical record text. Therefore, by applying the above method, these text fragments can be identified first, and then these text fragments can be used to detect and correct drug terms, thereby improving the accuracy and efficiency of drug term correction.

[0046] Text segment recognition for the text to be corrected can be achieved by applying a trained text segment recognition model. By inputting the text to be corrected into the text segment recognition model, one or more first text segments are obtained. These segments contain the terminology to be identified for errors. For example, by inputting electronic medical records into the text segment recognition model, one or more text segments containing the pharmaceutical terminology to be identified for errors are obtained.

[0047] For the above-mentioned first text segment, terminology and noun error detection can be performed by applying a matching detection method based on a terminology dictionary, N-Gram language model, confusion dictionary, phonetic dictionary, form-similar dictionary, etc., or by applying a sequence labeling model, a generation model, a translation model and other types of models to predict incorrect terminology and nouns. It can be understood that those skilled in the art can choose a terminology and noun error detection method according to actual conditions, and there is no limitation here.

[0048] According to some embodiments, obtaining a first term noun based on a first text fragment may include: identifying the first text fragment based on a first term dictionary through a word segmentation tool to obtain a correct term noun in the first text fragment and a second text fragment, wherein the second text fragment is a text fragment after the correct term noun is removed from the first text fragment; and obtaining the first term noun based on the second text fragment.

[0049] The word segmentation tool may be Jieba v0.40 or other tools. It is understandable that those skilled in the art may also select other word segmentation tools according to actual conditions, and this is not limited here.

[0050] The first terminology dictionary configured in the word segmentation tool can be a specialized terminology dictionary for the professional field described in the text to be corrected. Based on this specialized terminology dictionary, a matching check can be performed on the first text segment to identify the correct terminology and nouns. These terminology and nouns are then removed from the first text segment through word segmentation, thereby obtaining one or more second text segments, i.e., text segments that do not contain the correct terminology and nouns. The second text segments are then tested using the aforementioned terminology and noun error detection method to obtain the first terminology and nouns.

[0051] Therefore, by screening out the correct terms and nouns in the first text segment, the probability of incorrect recall can be further reduced and the accuracy of term and noun error correction can be improved.

[0052] Since both the operation of detecting incorrect terminology and the operation of detecting correct terminology in the first text segment are applied to the first terminology dictionary, according to some embodiments, the terminology and noun error correction method further includes: in response to determining that multiple terminology and nouns in the first terminology dictionary have the same ending part, deleting the ending part of each of the multiple terminology and nouns to obtain multiple third terminology and nouns, wherein the length of the ending part is shorter than that of each of the multiple terminology and nouns; and adding the multiple third terminology and nouns to the first terminology dictionary to obtain a second terminology and nouns, wherein the second terminology and nouns are used to replace the first terminology and nouns.

[0053] In certain professional terminology dictionaries, the terms in some specialized fields may share the same suffixes. For example, in a pharmaceutical terminology dictionary, some pharmaceutical terms are "XXXX enteric-coated tablets" or "XXXX sustained-release tablets," and "enteric-coated tablets" or "sustained-release tablets" are the aforementioned suffixes. If the pharmaceutical term is free of ambiguity after removing the suffix, the pharmaceutical term without the suffix can be used as a supplementary vocabulary in the pharmaceutical terminology dictionary. This can further enrich the vocabulary of the pharmaceutical terminology dictionary, thereby increasing the coverage of the terminology dictionary and, in turn, improving the accuracy of the aforementioned operations of detecting incorrect terminology nouns and detecting correct terminology nouns in the first text segment.

[0054] It is understandable that the mining of the above suffix words can be achieved through methods such as text data mining, which is not limited here.

[0055] According to some embodiments, determining the second term noun based on the first term noun may include: determining a plurality of candidate term nouns based on the first term noun; and determining the second term noun based on the plurality of candidate term nouns.

[0056] After detecting the first term to be corrected, matching and recall can be performed using term dictionaries, N-Gram language models, confusion dictionaries, phonetic and similar dictionaries, and similar-sounding dictionaries. Prediction and recall can also be performed using models such as sequence tagging models, thereby obtaining multiple candidate terms. A ranking model can then be applied to score and rank these multiple candidate terms to obtain a second term, i.e., the candidate with the highest score, to replace the first term.

[0057] It is understandable that those skilled in the art can select the recall and sorting methods at their own discretion, and no limitation is made here.

[0058] According to some embodiments, Figure 3 As shown, a computer-implemented terminology and noun correction method is also provided, including: step S301, identifying text segments of the text to be corrected to obtain a first text segment, wherein the length of the first text segment is smaller than the text to be corrected, and the first text segment contains at least one terminology and noun to be identified as to whether it is erroneous; step S302, identifying the first text segment based on a first terminology dictionary through a word segmentation tool to obtain correct terminology and nouns in the first text segment and a second text segment, wherein the second text segment is the text segment after the correct terminology and nouns are removed from the first text segment; step S303, obtaining the first terminology and noun based on the second text segment; and step S304, determining a second terminology and noun based on the first terminology and noun to replace the first terminology and noun. Figure 3Steps S301 to S304 in the embodiment are similar to those in the above embodiment and are not described in detail here.

[0059] For terminology correction in some professional fields, after obtaining the candidate term with the highest score, the rationality of the candidate term can be verified through knowledge graphs and other methods. For example, when correcting drug terminology in electronic medical records, the "Diagnosis-Drug Local Knowledge Graph" can be applied to verify whether the generated candidate drug term has a connection with the diagnosed symptoms involved in the electronic medical records, thereby verifying the rationality of the candidate drug term. If, after verification, it is found that the candidate drug term has no relationship with the symptoms involved in the electronic medical records, the candidate drug term will be discarded. In this way, the rationality of term correction can be further guaranteed from a medical perspective, and the accuracy of term correction can also be improved.

[0060] According to some embodiments, Figure 4 As shown, a training method for a text segment recognition model for term noun error correction is also provided, including: step S401, obtaining a sample data set, wherein each sample data in the sample data set includes a sample text, multiple first text segments and category labels corresponding to the multiple first text segments, and wherein the length of each first text segment in the multiple first text segments is smaller than the sample text; step S402, initializing multiple parameters of the text segment recognition model; and for each sample data, performing the following operations: step S403, inputting the sample text into the text segment recognition model to obtain an output value, wherein the output value includes the predicted multiple second text segments and the categories corresponding to the multiple second text segments; and step S404, adjusting multiple parameters of the text segment recognition model based on the multiple second text segments, the categories corresponding to the multiple second text segments, the multiple first text segments and the category labels corresponding to the multiple first text segments.

[0061] In this way, the text segment recognition model can be trained, and the trained model can be applied to the text segment recognition process of the above-mentioned terminology and noun correction, thereby improving the efficiency and accuracy of terminology and noun correction.

[0062] According to some embodiments, the text segment recognition model may be an LSTM model or a BERT model. It is understood that those skilled in the art may select the model to be applied based on actual circumstances, and this is not limited here.

[0063] According to some embodiments, the sample data set includes a plurality of positive sample data, and wherein the first text segment of each positive sample data in the plurality of positive sample data contains at least one of the term nouns.

[0064] According to some embodiments, the sample data set includes a plurality of negative sample data, and wherein the first text segment of each of the plurality of negative sample data does not contain the term noun.

[0065] The sample data set can be constructed in the following way: first, the sample text is divided into multiple first text segments by punctuation marks or according to a fixed character length. Then, the term noun is identified for each first text segment through methods such as term dictionary matching. When a first text segment is identified as containing a term noun, the first text segment is annotated with a label indicating that it contains the term noun as positive sample data; similarly, when a first text segment is not identified as containing a term noun, the first text segment is annotated with a label indicating that it does not contain the term noun as negative sample data. For example, when constructing a sample data set for training a model for text segment recognition of electronic medical records, the electronic medical records can be used as sample text, and by applying methods such as drug term dictionary matching, multiple first text segments marked with whether they contain drug term nouns are obtained. Through the above method, the sample data set can be obtained without manual labeling, thereby saving labor costs.

[0066] According to some embodiments, the ratio of positive sample data to negative sample data in the sample dataset satisfies a preset ratio. If the difference in the number of positive and negative samples is too large, the trained model may have low prediction accuracy. Therefore, by determining the ratio of positive and negative samples to construct a sample dataset, the recognition accuracy of the above-mentioned text segment recognition model can be further improved.

[0067] It is understood that the above sample data and the positive-negative sample ratio can be determined by those skilled in the art based on actual circumstances and are not limited here. For example, for a sample data set used to train a model for text segment recognition in electronic medical records, in actual situations, the amount of positive sample data differs significantly from the amount of negative sample data. Therefore, depending on the actual situation, the positive-negative sample ratio can be determined to be 1:10 or 1:11, making the sample data set used to train the model more consistent with actual circumstances, thereby ensuring that the model trained using the sample data set has a higher prediction accuracy.

[0068] According to some embodiments, Figure 5As shown, a terminology noun correction device 500 is also provided, including: an identification unit 510, configured to perform text segment identification on the text to be corrected to obtain a first text segment, wherein the length of the first text segment is smaller than the text to be corrected, and the first text segment contains at least one terminology noun to be identified as having an error; a first acquisition unit 520, configured to acquire a first terminology noun based on the first text segment, wherein the first terminology noun is a terminology noun that has been identified as having an error; and a determination unit 530, configured to determine a second terminology noun based on the first terminology noun, wherein the second terminology noun is used to replace the first terminology noun.

[0069] The operations of units 510 to 530 of the terminology correction device 500 are similar to the operations of steps S201 to S203 of the above-mentioned terminology correction method, and are not described in detail here.

[0070] According to some embodiments, Figure 6 As shown, a terminology and noun correction device 600 is also provided, wherein a first acquisition unit 620 includes: an identification subunit 621, configured to identify the first text segment based on a first term dictionary through a word segmentation tool to obtain the correct terminology and noun in the first text segment and a second text segment, wherein the second text segment is the text segment after the correct terminology and noun are removed from the first text segment; and an acquisition subunit 622, configured to obtain the first terminology and noun based on the second text segment.

[0071] The operations of the units 610 to 630 and the subunits 621 to 622 of the terminology correction device 600 are similar to the operations of steps S301 to S304 of the above-mentioned terminology correction method, and are not described in detail here.

[0072] According to some embodiments, wherein the first term noun is obtained by detecting the first text segment based on a first term dictionary, the term noun error correction device may further include: a deletion unit, configured to, in response to determining that multiple term nouns in the first term dictionary have the same suffix part, delete the suffix parts of the multiple term nouns respectively to obtain multiple third term nouns, wherein the length of the suffix part is smaller than each of the multiple term nouns; and an adding unit, configured to add the multiple third term nouns to the first term dictionary to obtain a second term dictionary, wherein the second term dictionary is used to replace the first term dictionary.

[0073] According to some embodiments, the determining unit includes: a first determining subunit configured to determine a plurality of candidate term nouns based on the first term noun; and a second determining subunit configured to determine the second term noun based on the plurality of candidate term nouns.

[0074] According to some embodiments, the text to be corrected processed by the term noun correction device may be obtained in a scenario of voice recognition of electronic medical records.

[0075] According to some embodiments, Figure 7 As shown, a training device 700 for a text segment recognition model for term noun error correction is also provided, comprising: a second acquisition unit 710, configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample text, a plurality of first text segments and category labels corresponding to the plurality of first text segments, and wherein the length of each first text segment in the plurality of first text segments is smaller than the sample text; an initialization unit 720, configured to initialize multiple parameters of the text segment recognition model; and an input unit 730, configured to input the sample text into the text segment recognition model to obtain an output value, wherein the output value includes the predicted plurality of second text segments and the categories corresponding to the plurality of second text segments; and an adjustment unit 740, configured to adjust the plurality of parameters of the text segment recognition model based on the plurality of second text segments, the categories corresponding to the plurality of second text segments, the plurality of first text segments and the category labels corresponding to the plurality of first text segments.

[0076] The operations of units 710 to 740 of the training device 700 for a text segment recognition model for terminology and noun error correction are similar to the operations of steps S401 to S404 of the above-mentioned training method for a text segment recognition model for terminology and noun error correction, and are not described in detail here.

[0077] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.

[0078] refer to Figure 8, a block diagram of an electronic device 800 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0079] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0080] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the electronic device 800. The input unit 806 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 808 can include but is not limited to a magnetic disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0081] The computing unit 801 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the resident point identification method. For example, in some embodiments, the resident point identification method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the resident point identification method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the resident point identification method by any other suitable means (e.g., via firmware).

[0082] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0083] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0084] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.

[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0086] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0087] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0088] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0089] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. In addition, the steps may be performed in an order different from that described in this disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after this disclosure.

Claims

1. A computer-implemented method for correcting terminology errors, comprising: Performing text segment recognition on the text to be corrected to obtain a first text segment, wherein the text to be corrected is an electronic medical record text obtained in a scenario of voice recognition of electronic medical records, the length of the first text segment is shorter than the text to be corrected, and the first text segment contains at least one terminology to be identified as to whether it is incorrect, and wherein performing text segment recognition on the text to be corrected includes inputting the text to be corrected into a trained text segment recognition model to identify, through the text segment recognition model, the first text segment in which the terminology is concentrated, and the first text segment contains at least one pharmaceutical terminology to be identified as to whether it is incorrect; A first term noun is obtained based on the first text segment, wherein the first term noun is a term noun that is identified as having errors, and the first term noun is obtained by detecting the first text segment based on a first term dictionary, and wherein processing the first term dictionary includes: In response to determining that a plurality of term nouns in the first term dictionary have the same ending part, deleting the ending parts of the plurality of term nouns respectively to obtain a plurality of third term nouns, wherein the length of the ending part is smaller than that of each of the plurality of term nouns; and adding the plurality of third term nouns to the first term dictionary to obtain a second term dictionary, wherein the second term dictionary is used to replace the first term dictionary; Based on the first term noun, a second term noun is determined, wherein the second term noun is used to replace the first term noun.

2. The method according to claim 1, wherein The acquiring of a first term noun based on the first text segment includes: Identifying the first text segment using a word segmentation tool based on a first term dictionary to obtain a correct term noun in the first text segment and a second text segment, wherein the second text segment is a text segment obtained by removing the correct term noun from the first text segment; and Based on the second text segment, the first term noun is obtained.

3. The method according to claim 1 or 2, wherein Determining a second term based on the first term includes: Determining a plurality of candidate term nouns based on the first term noun; and The second term noun is determined based on the multiple candidate term nouns.

4. A method for training a text segment recognition model for a term noun error correction method according to any one of claims 1 to 3, the training method comprising: Obtaining a sample data set, wherein each sample data in the sample data set includes sample text, multiple first text segments, and category labels corresponding to the multiple first text segments, and wherein each of the multiple first text segments is shorter than the sample text, the sample text is an electronic medical record text obtained in a scenario of voice recognition of electronic medical records, and the first text segment contains at least one pharmaceutical terminology to be identified as incorrect; Initializing multiple parameters of the text segment recognition model; and For each sample data, perform the following operations: Inputting the sample text into the text segment recognition model to obtain an output value, wherein the output value includes a plurality of predicted second text segments and categories corresponding to the plurality of second text segments respectively; and Adjusting multiple parameters of the text segment recognition model based on the multiple second text segments, the categories respectively corresponding to the multiple second text segments, the multiple first text segments, and the category labels respectively corresponding to the multiple first text segments; In which, the trained text segment recognition model is configured to perform text segment recognition on the electronic medical record text to be corrected in the terminology and noun correction process, so as to obtain text segments in which pharmaceutical terminology and nouns to be identified for errors are concentrated. The terminology and noun correction process also includes obtaining the first terminology and noun that has been identified as having errors based on the identified text segment, and determining the second terminology and noun to replace the first terminology and noun based on the first terminology and noun.

5. The method according to claim 4, wherein The sample data set includes a plurality of positive sample data, and wherein the first text segment of each of the plurality of positive sample data contains at least one of the term nouns.

6. The method according to claim 4 or 5, wherein: The sample data set includes a plurality of negative sample data, and wherein the first text segment of each of the plurality of negative sample data does not contain the term noun.

7. The method according to claim 4 or 5, wherein: The ratio of the number of positive sample data to the number of negative sample data in the sample data set meets a preset ratio.

8. The method according to claim 4 or 5, wherein: The text segment recognition model is an LSTM model or a BERT model.

9. A terminology correction device comprising: A recognition unit is configured to perform text segment recognition on the text to be corrected to obtain a first text segment, wherein the text to be corrected is an electronic medical record text obtained in a scenario of voice recognition of electronic medical records, the length of the first text segment is shorter than the text to be corrected, and the first text segment contains at least one terminology noun to be identified as to whether it is incorrect, and wherein the text segment recognition of the text to be corrected includes inputting the text to be corrected into a trained text segment recognition model to identify the first text segment in which the terminology nouns are concentrated through the text segment recognition model, and the first text segment contains at least one pharmaceutical terminology noun to be identified as to whether it is incorrect; A first acquiring unit is configured to acquire a first term noun based on the first text segment, wherein the first term noun is a term noun that has been identified as having an error, and the first term noun is acquired by detecting the first text segment based on a first term dictionary, and wherein processing the first term dictionary includes: In response to determining that a plurality of term nouns in the first term dictionary have the same ending part, deleting the ending parts of the plurality of term nouns respectively to obtain a plurality of third term nouns, wherein the length of the ending part is smaller than that of each of the plurality of term nouns; and adding the plurality of third terminology nouns to the first terminology dictionary to obtain a second terminology dictionary, wherein the second terminology dictionary is used to replace the first terminology dictionary; and The determining unit is configured to determine a second term noun based on the first term noun, wherein the second term noun is used to replace the first term noun.

10. The device according to claim 9, wherein The first acquiring unit is further configured to: an identification subunit configured to identify the first text segment based on a first term dictionary using a word segmentation tool to obtain a correct term noun in the first text segment and a second text segment, wherein the second text segment is a text segment obtained by removing the correct term noun from the first text segment; and The acquiring subunit is configured to acquire the first term noun based on the second text segment.

11. The device according to claim 9 or 10, wherein The determining unit includes: A first determining subunit is configured to determine a plurality of candidate term nouns based on the first term noun; and The second determining subunit is configured to determine the second term noun based on the multiple candidate term nouns.

12. A training device for a text segment recognition model used in the terminology and noun error correction method according to any one of claims 1 to 3, the training device comprising: a second acquisition unit configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample text, a plurality of first text segments, and category labels corresponding to the plurality of first text segments, and wherein the length of each of the plurality of first text segments is shorter than the sample text, the sample text is an electronic medical record text acquired in a scenario of voice recognition of an electronic medical record, and the first text segment includes at least one pharmaceutical terminology to be identified as incorrect; an initialization unit, configured to initialize multiple parameters of the text segment recognition model; and an input unit configured to input the sample text into the text segment recognition model to obtain an output value, wherein the output value includes a plurality of predicted second text segments and categories corresponding to the plurality of second text segments; and an adjusting unit configured to adjust a plurality of parameters of the text segment recognition model based on the plurality of second text segments, the categories respectively corresponding to the plurality of second text segments, the plurality of first text segments, and the category labels respectively corresponding to the plurality of first text segments; In which, the trained text segment recognition model is configured to perform text segment recognition on the electronic medical record text to be corrected in the terminology and noun correction process, so as to obtain text segments in which pharmaceutical terminology and nouns to be identified for errors are concentrated. The terminology and noun correction process also includes obtaining the first terminology and noun that has been identified as having errors based on the identified text segment, and determining the second terminology and noun to replace the first terminology and noun based on the first terminology and noun.

13. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

15. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN111062221A

  • Text error correction method and device, electronic equipment and storage medium

    CN112580324A

  • Risk text extraction method and device, electronic equipment and storage medium

    CN112861511A