Efficient hybrid text normalization

Through a two-level processing process, combining statistical models and rule-based models, using the BERT model and rule operations, the problem of a large number and overlapping rules in the existing technology is solved, efficient and accurate text normalization is achieved, and the error rate and Run time.

CN118696370APending Publication Date: 2024-09-24TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380021928.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-08
Filing Date
2023-03-16
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing text normalization technology relies on hand-made rules, resulting in a large number of overlapping rules, which is time-consuming and resource-intensive, making it difficult to achieve efficient processing.

Method used

A two-level processing process is adopted. First, a statistical model is used for sequence annotation, and then a rule-based model is used for precise conversion. Combining the BERT model and the rule-based model, including segment merging, position exchange, number conversion, and metric/token replacement operations, generates Normalized text.

Benefits of technology

Significantly reduces segmentation error and sentence error rates, improves tag consistency and sentence coverage, reduces run time, and improves the efficiency and accuracy of text normalization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004993704900000081
    Figure BDA0004993704900000081
  • Figure HDA0004993704910000051
    Figure HDA0004993704910000051
  • Figure HDA0004993704910000031
    Figure HDA0004993704910000031
Patent Text Reader

Abstract

A method and apparatus for efficiently normalizing text by processing input text based on a text normalization model, comprising: processing the input text at a first level comprising a statistical model to obtain a first output; processing the first output at a second stage comprising a rule-based model to obtain normalized text; and outputting the normalized text.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of priority to U.S. Application No. 17 / 940,525, filed on September 8, 2022, the entire contents of which are expressly incorporated by reference into this application. Technical Field

[0003] The present disclosure relates generally to text-to-speech systems and, more particularly, to methods and apparatus for text normalization. Background Art

[0004] Text normalization converts numbers and symbols into corresponding regular words and is an important bridge between speech and text representation. Traditionally, text normalization is handled by handcrafted rules. Each rule can describe a template-based scenario and a corresponding action. Due to the complexity of natural language, the number of rules can easily reach thousands. In addition, some rules may have overlapping conditions, resulting in ambiguous scenarios. Therefore, it is also important to assign reasonable levels to the rule set. Since handcrafting a large number of rules can be time-consuming and resource-intensive, more efficient methods and techniques are needed. Summary of the invention

[0005] According to some embodiments, systems and methods for text normalization are provided.

[0006] According to an exemplary embodiment, a method for text normalization includes receiving input text and processing the input text based on a text normalization model. Processing the input text also includes: (i) processing the input text at a first level including a statistical model to obtain a first output; (ii) processing the first output at a second level including a rule-based model to obtain normalized text; and (iii) outputting the normalized text.

[0007] According to an exemplary embodiment, an apparatus for text normalization includes: at least one memory configured to store computer program code; and at least one processor configured to operate according to the instructions of the computer program code. The computer program code includes text normalization code configured to cause at least one processor to generate at least one normalized text. The text normalization code includes receiving code configured to cause at least one processor to receive input text. The text normalization code also includes a first-level code configured to cause at least one processor to generate a statistical model, and the statistical model processes the input text to obtain a first output. The text normalization code also includes a second-level code configured to cause at least one processor to generate a rule-based model, and the rule-based model transforms the first output into an output normalized text.

[0008] According to an exemplary embodiment, a non-transitory computer-readable medium stores instructions, which, when executed by a processor, cause the processor to receive input text. The instructions also cause the processor to process the input text based on a text normalization model, including: (i) processing the input text at a first level including a statistical model to obtain a first output; (ii) processing the first output at a second level including a rule-based model to obtain a normalized text; and (iii) outputting the normalized text. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is an embodiment of a text normalization system block diagram.

[0010] Figure 2 is a system overview of an embodiment of a text normalization system.

[0011] Figure 3 is an embodiment of a phrase-based attention system.

[0012] Figure 4 It is an example of text normalization training.

[0013] Figure 5 is an embodiment of a text normalization system block diagram.

[0014] Figure 6 Two graphs are shown illustrating the results of a text normalization process, according to various embodiments.

[0015] Figure 7 is a flowchart corresponding to an embodiment of a text normalization method. DETAILED DESCRIPTION

[0016] The following detailed description of exemplary embodiments refers to the accompanying drawings.The same reference numbers in different drawings may identify the same or similar elements.

[0017] The above disclosure provides illustration and description, but is not intended to be exhaustive or to limit the implementation to the precise form disclosed. Modifications and variations may be made according to the above disclosure, or modifications and variations may be obtained from the practice of the implementation. In addition, one or more features or one or more components of an embodiment may be incorporated into another embodiment (or one or more features of another embodiment) or combined with another embodiment (or one or more features of another embodiment). In addition, it should be understood that in the flowcharts and descriptions of the operations provided below, one or more operations may be omitted, one or more operations may be added, one or more operations may be performed (at least in part) simultaneously, and the order of one or more operations may be switched.

[0018] It is apparent that the systems and / or methods described herein can be implemented in various forms of hardware, firmware, or a combination of hardware and software. The actual dedicated control hardware or software code used to implement these systems and / or methods does not limit these implementations. Therefore, the operation and behavior of the systems and / or methods are described herein without reference to specific software codes. It should be understood that software and hardware can be designed to implement the systems and / or methods based on the description herein.

[0019] Even though particular combinations of features are recited in the claims and / or disclosed in the specification, these combinations are not intended to limit the disclosure of possible implementations. In fact, many of these features may be combined in ways not specifically recited in the claims and / or in ways not disclosed in the specification. Although each dependent claim listed below may directly depend on only one claim, the disclosure of possible implementations includes each dependent claim in combination with every other claim in the claims.

[0020] Unless explicitly stated, any element, behavior or instruction used herein should not be interpreted as critical or essential. In addition, as used herein, the articles "one" and "each" are intended to include one or more items and can be used interchangeably with "one or more". If only one item is represented, "one" or similar words are used. In addition, as used herein, the terms "have", "have", "contain", "include", "include" and the like are intended to represent open-ended terms. In addition, unless explicitly stated otherwise, the phrase "based on" is intended to mean "based at least in part". In addition, expressions such as "at least one of [A] and [B]" or "at least one of [A] or [B]" should be understood to include three situations: A exists alone, B exists alone, or A and B exist simultaneously.

[0021] The embodiments of the present disclosure describe in detail a hybrid two-stage process, where the first stage can use statistical models for sequence labeling, and the second stage can use rule-based programs for fast and accurate conversion. The statistical model can cover a wide range of contexts to understand the categories of digital / symbol sequences. The rule-based program can accurately convert subsequences because the conversion is usually determined for each category.

[0022] Figure 1An embodiment of a text normalization apparatus 100 is disclosed. The text normalization apparatus 100 may include an input text 110 that is input into a character-based bidirectional encoder representations from transformers (BERT) model 120. The output of the BERT model 120 may then be acted upon by a rule-based model 130. The rule-based model 130 may include a segment transformer 140, a position exchanger 150, a digitizer 160, and a metric / token replacer 170. After processing in the token-based transformer 130, the normalization apparatus 100 may output a normalized text 180. The text normalization apparatus 100 may include additional blocks, such as additional rule layers, BERT modules of different sizes, and additional checks and manipulation calculations.

[0023] Input text 110 can include a text string consisting of a character combination including text and other marks (e.g., punctuation marks). For example, input text 110 can be a string such as a date. Dates usually contain a mixture of marks and text. There are multiple forms that contain the same information, such as "February 2, 2014" or "2 / 2 / 2014". Other examples can be text messages, which usually contain other marks, such as emoticons or emails, which may contain various punctuation marks, such as the "@" mark. Another example of input text 110 can be a metric or measurement, which may be unclear in the absence of context. For example, "16M" may refer to "sixteen megabytes" or "sixteen meters" according to interpretation. As a non-limiting list, input text 110 can be a mathematical expression, a website uniform resource locator (uniformresource locator, URL), a program code, a language text, a language combination, any combination of previously listed examples, or any unique mark.

[0024] After receiving the input text 110, the text normalization device 100 passes the text to the character-based BERT 120. The character-based BERT model 120 may have been fully trained and annotates each character with a predefined tag. In some embodiments, the BERT model 120 may be a full-size BERT model, or in other embodiments, a one-layer BERT model. A one-layer BERT model is typically faster than a full-size BERT model, but a smaller-sized model may result in decreased performance, such as an increased error rate. One way to compensate for the decreased performance is to add a conditional random field (CRF) loss operation, which annotates the segment as a whole rather than as independent characters. Other embodiments may use both a full-size BERT model and a CFR loss operation, or use only a one-layer BERT model without CFR, or use only a full-size BERT model without a CFR loss operation.

[0025] After tokenizing the input text, the BERT model 120 passes the information to the rule-based model 130. The rule-based model 130 takes the tokenized text and parses the text, finally creating a normalized text output 180. In some embodiments, the rule-based model includes two stages. The first stage may include a segment merger 140, a position exchanger 150. The second stage may include a digitizer 160 and a metric / token replacer 170. To normalize the text, the rule-based model passes the tokenized input text through each stage including various rules.

[0026] The first operation processed is that the text passes through each rule of the first level. For convenience, the segment consolidator 140 is described first. In some embodiments, the segment consolidator 140 merges similar characters together to maintain the meaning of the characters. For example, when converting a date, the segment consolidator 140 can take separate character strings, such as "February", "2", and "2014", and merge them together to form 2014 / 02-02 so that a machine or other computer device can correctly read the text.

[0027] The position exchanger 150 exchanges the position of the input string so that when the input string is read, the normalized text places the words in the correct order. For example, in some languages, the type of the subject needs to be specified before the value of the subject, such as "12.5%" in Chinese, where the percent sign is read before the number, the position exchanger 150 can exchange the percent sign to be read before the value. For any text where the meaning is better preserved by changing the position of characters or words in the input text, the exchange can also be performed.

[0028] After passing through the first level, the text string is processed by the second level, which includes a digitizer 160 and a metric / token replacer 170. The digitizer 160 converts numbers into text. For example, the input may be a string "48", and after the digitizer converts the string into text, the string will read "forty-eight" as output. The metric / token replacer 170 searches for any punctuation or other commonly used abbreviations or other random symbols / characters in the text and replaces them with word representations. As an example, the metric / token replacer 170 receives the input string "&" and replaces it with "and" as output. Other metrics / tokens may contain emoticons, slang, symbols, pictographs, different spellings, American standard code for information interchange (ASCII) art or other pictograph items that convey meaning. Finally, after the string is fully processed, the string is output as normalized text 180.

[0029] Figure 2 An exemplary system 200 using an embodiment of a text normalization apparatus is shown. The exemplary system 200 can be one of a variety of systems, such as a personal computer, a mobile device, a computer cluster, a server, an embedded device, an application specific integrated circuit (ASIC), a microcontroller, or any other device capable of running code. The bus 210 connects the exemplary system 200 together so that all components can communicate with each other. The bus 210 connects the processor 220, the memory 230, the storage component 240, the input component 250, the output component 260, and the interface component.

[0030] The processor 220 may be a single processor, a processor with multiple processors inside, a cluster of (more than one) processors, and / or distributed processing. The processor executes instructions stored in the memory 230 and the storage component 240. The processor 220 operates as a computing device to perform the operations of the text normalization apparatus. The memory 230 is a fast storage, and retrieval of any memory device can be achieved by using a cache memory, where the cache memory can be closely associated with one or more central processing units (CPUs). The storage component 240 can be one of any long-term storage, such as a hard disk drive (HDD), a solid state drive (SSD), a tape, or any other long-term storage format.

[0031] Input component 250 may be any file type or a signal from a user interface component (e.g., a camera or text capture device). Output component 260 outputs the processed information to communication interface 270. The communication interface may be a speaker or other communication device that can display information to a user or another observer such as another computing system.

[0032] Figure 3 An embodiment of phrase-based attention 300 is disclosed, as well as a process for determining phrase boundaries as part of a BERT model input. Phrase-based attention 300 includes input text 310, BERT embedding 320, embedding string 330, phrase embedding 340, BERT encoding 350, and bounded output 360. As an example, the input text 310 contains the date "2018 / 01-09" for processing. As described above, the input text 310 can be any text or other pictographic material. The input text 310 can then be passed to the BERT embedding 320 for annotation for processing. In the BERT embedding 320, the label can define 0 for non-boundaries and 1 for the end of the phrase. For example, the label for "2018" is "0001".

[0033] After computing the embeddings, the character embeddings may be replaced by phrase embeddings 340, which may be the average of all character embeddings in the phrase with or without additional weighting for that particular character. Here, as an example, the phrase "2018 / 01-09" in Figure 3 The weights are added to the calculation shown. After processing the character embeddings, the next part is BERT encoding 350. Finally, BERT encoding 350 takes the attention weights calculated based on the phrase embeddings and produces a bounded output 360.

[0034] Figure 4 An exemplary training method 400 for a token-based transformer is depicted. The training method 400 includes a training text operation 410, a guess (GUESS) token operation 420, a token-based transformer operation 430, and a word error rate calculator operation 440. In addition, the training method uses a BERT model 450 and a cross entropy calculator 460. Operationally, the training starts with the training text 410 being input to the guess token 420, which makes a guess about the type of text present in the input text 410. First, under the guess token operation 420, the tokens of each character are sorted by the character token frequency. The supervision information generated by this operation is weak and easy to obtain. Second, under the guess token operation 420, consecutive numbers share the same token. In addition, the guess token operation 420 can pre-estimate the computational cost, and if the predicted time cost is large, the operation is limited to the top 5 possible tokens.

[0035] After the guessed tag is applied to the input text, the operation proceeds to the tag-based converter operation 430 and the BERT model 450. For convenience, the tag-based converter operation 430 and the word error rate calculator operation 440 will be discussed first. The tag-based converter 430 converts the input text string into text based on the tag from the guessed tag operation 420. For example, the tag-based converter operation 430 can convert numbers and symbols into text. Then, after conversion to text, the string is passed to the word error rate (WER) calculation operation 440, where the WER calculation operation 440 checks the amount of errors generated after the conversion. For a large number of errors, the conversion is sent back through a process with different tags to retrain the method, thereby reducing the number of errors. If the WER is low, the training only takes those sentences with a WER of zero and uses them to train the BERT model 450. Next, the BERT model 450 is applied to help guess the tag, and the BERT model 450 is trained with the re-annotated corpus. The cross entropy 460 is calculated based on the output of the BERT model 450.

[0036] Figure 5 An embodiment of a text normalization apparatus 500 is disclosed. The text normalization apparatus 500 includes an input text 510, which is input into a character-based bidirectional encoder representations from transformers (BERT) model 520. The output of the BERT model 520 is then acted upon by a conditional random field (CRF) 530. After the operation in the CRF 130, the normalization apparatus 500 finally outputs a normalized text 540.

[0037] Input text 510 comprises a text string consisting of a combination of characters, which includes text and other marks (e.g., punctuation marks). For example, input text 510 can be a string such as a date. A date usually contains a mixture of marks and text. For a date, there are multiple forms that contain the same information, such as "February 2, 2014" or "2 / 2 / 2014". Other examples can be text messages, which usually contain other marks, such as emoticons or emails, which may include various punctuation marks, such as the "@" mark. Another example of input text 110 can be a metric or measurement, which may be unclear in the absence of context sometimes. For example, "16M" may refer to "sixteen megabytes" or "sixteen meters" according to interpretation. Finally, as a non-limiting list, input text 110 can be a mathematical expression, a website URL, a program code, a language text, a language combination, any combination of previously listed examples, or any unique mark.

[0038] After receiving the input text 510, the text normalization device 500 passes the text to a character-based BERT model 520. The character-based BERT model 520 may have been fully trained and annotates each character with a predefined tag. In some embodiments, the BERT model 520 is a full-size BERT model, or in other embodiments, a layer of BERT model. A one-layer BERT model is typically faster than a full-size BERT model, but a smaller-sized model may result in decreased performance, such as an increased error rate. After marking the input text, the BERT model 520 passes the information to the rule CRF 130. The CRF loss operation annotates the segment as a whole, rather than as an independent character. The CRF 530 parses the marked text and ultimately creates a normalized text output 540.

[0039] The calculations involved in the text normalization apparatus 500 can be represented by the following equations (1) to (3):

[0040]

[0041] Figure 6 Two figures of the results of performing a text normalization process according to an embodiment of the present disclosure are disclosed. Compared to the rule-based model, the full BERT model significantly reduces segmentation errors, for example, from about 8.3% to 4.9%, and sentence errors are also reduced from 15% to 9.4%. The following figures show the improvement in accuracy for each category. Given only one layer of the BERT model, the proposed phrase-based attention can reduce sentence errors by an absolute decrease of 1%, which is better than the CRF that only produces a 0.6% decrease. Both the proposed phrase-based attention and CRF only increase the running time by 20%.

[0042] For unlabeled two-level text normalization, the initial results have 63% tag consistency and 90% sentence coverage, which means that 90% of sentences can be fully converted with pseudo-tags. During the re-tag process, the machine-assigned tags are taken as the first choice, and all other tags are the same. In addition, 91% of the sentences are labeled and the tag consistency is improved to 70%. The sentence accuracy of the BERT model is 89%, which is slightly lower than the sentence accuracy of the supervised model of 90%, but higher than the sentence accuracy of the rule-based model of 85%.

[0043] The reason for low tag consistency is that different categories can be transformed by the same rules. For example, a phone number and a serial number are pronounced the same way. Therefore, the model may confuse these tags, but the transformation result is the same.

[0044] Figure 7 A flow chart of an embodiment of performing a training process 700 is shown. The operations detailed in process 700 include receiving input text 710, processing the text in a statistical model 720, processing the text in a rule-based model, and then outputting normalized text 740. The input text 710 may include a text string consisting of a combination of characters including text and other tokens such as punctuation marks. Process 700 proceeds to operation 720, where the input text is processed by a statistical model such as a BERT model in an embodiment. In one embodiment, the statistical model may be a full-size BERT model, a half-size BERT model, or a BERT model of other configurations, or other statistical models known to those of ordinary skill in the art. Process 700 proceeds to operation 730, where the output of the statistical model is processed by a rule-based model. For example, a rule-based model can parse tagged text. The rule-based model may include two levels, the first level including a segment merger and a position exchanger, and the second level including a digitizer and a metric / token replacer. Process 700 proceeds to operation 740 where the tokenized input text is normalized and output based on the rules in each level of the rule-based model.

[0045] The above disclosure provides illustration and description, but is not intended to be exhaustive or to limit the implementations to the precise forms disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of the implementations.

[0046] Some embodiments may involve systems, methods and / or computer-readable media of any possible integrated technical details. In addition, one or more of the above components may be implemented as instructions stored on a computer-readable medium and executable by at least one processor (and / or may include at least one processor). The computer-readable medium may include one or more computer-readable non-transitory storage media on which computer-readable program instructions are provided to cause the processor to perform operations.

[0047] A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer readable storage media includes the following: 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, a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device (e.g., a punch card or a raised structure in a groove on which instructions are recorded), and any suitable combination of the foregoing. The computer-readable storage media used herein should not be construed as transient signals in themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through optical cables), or electrical signals transmitted through wires.

[0048] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a corresponding computing / processing device, or downloaded to an external computer or external storage device, via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in a computer-readable storage medium in the corresponding computing / processing device.

[0049] The computer readable program code / instructions for performing the operations may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source code or object code written in any combination of one or more programming languages ​​(including object-oriented programming languages, such as Smalltalk, C++, etc., and procedural programming languages, such as the "C" programming language or similar programming languages). The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) may execute computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform various aspects or operations.

[0050] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device implement the operations specified by one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium, which may instruct a computer, a programmable data processing device, and / or other equipment to operate in a particular manner, so that the computer-readable storage medium having the instructions stored therein includes an article of manufacture, which includes instructions for implementing various aspects of the operations specified by one or more blocks in the flowchart and / or block diagram.

[0051] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operations to be performed on the computer, other programmable apparatus, or other device, thereby producing a computer-implemented process, so that the instructions executed on the computer, other programmable apparatus, or other device implement the operations specified by one or more blocks in the flowchart and / or block diagram.

[0052] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions and operations of possible implementations of systems, methods and computer-readable media according to various embodiments. In this regard, each block in the flowchart or block diagram may represent a module, segment or portion of an instruction, and each block in the flowchart or block diagram includes one or more executable instructions that implement one or more specified logical operations. Compared to what is described in the accompanying drawings, the method, computer system and computer-readable media may include additional blocks, fewer blocks, different blocks or blocks of different arrangements. In some alternative implementations, the operations recorded in the blocks may not occur in the order recorded in the figure. For example, depending on the functions involved, two blocks shown in succession may actually be executed simultaneously or substantially simultaneously, or these blocks may sometimes be executed in reverse order. It will also be noted that each block in the block diagram and / or flowchart illustration and the combination of blocks in the block diagram and / or flowchart illustration can be implemented by a system based on special hardware, and a system based on special hardware performs specified operations or actions, or performs a combination of special hardware and computer instructions.

[0053] It is apparent that the systems and / or methods described herein can be implemented in various forms of hardware, firmware, or a combination of hardware and software. The actual dedicated control hardware or software code used to implement these systems and / or methods does not limit the implementation. Therefore, the operation and behavior of the systems and / or methods are described herein without reference to specific software code - it should be understood that software and hardware can be designed to implement these systems and / or methods based on the description herein.

[0054] The above disclosure also includes the following embodiments:

[0055] (1) A method for text normalization, comprising: receiving input text; processing the input text based on a text normalization model, wherein processing the input text comprises: (i) processing the input text at a first level including a statistical model to obtain a first output; (ii) processing the first output at a second level including a rule-based model to obtain normalized text; and (iii) outputting the normalized text.

[0056] (2) A method for text normalization according to feature (1), wherein the statistical model also includes a bidirectional encoder representations from transformers (BERT) model as a baseline model; and the BERT model decomposes the input text into at least one character and a label, wherein the at least one character includes a token.

[0057] (3) A method for text normalization according to feature (1) or (2), wherein, at a second level including a rule-based model, processing the first output to obtain normalized text comprises: selecting from a group consisting of: (i) exchanging the at least one character with at least one second character to maintain the meaning of the input text; (ii) merging the at least one character with at least one other character to maintain the second meaning of the input text; and (iii) converting the at least one character into one or more words based on the tokenization of the first output.

[0058] (4) A method for text normalization according to feature (3), wherein the token-based conversion includes: converting at least one number into text; converting at least one punctuation mark into text; converting at least one abbreviation into text; and converting at least one compound phrase into text, the at least one compound phrase comprising a combination of text, numbers, symbols, and metrics.

[0059] (5) A method for text normalization according to any one of features (2) to (4), wherein the BERT model includes a phrase-based attention operation.

[0060] (6) A method for text normalization according to feature (5), wherein the phrase-based attention operation is defined as (i) an average value of at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average value of the at least one character embedded in the input text, the at least one character not having at least one weight associated with the at least one character.

[0061] (7) A method for text normalization according to feature (5) or (6), wherein the BERT model includes a phrase-based attention operation.

[0062] (8) A method for text normalization according to any one of features (5) to (7), wherein the BERT model includes a single layer.

[0063] (9) A device for text normalization, comprising: at least one memory configured to store computer program code; at least one processor configured to operate according to the instructions of the computer program code, the computer program code including: text normalization code configured to cause the at least one processor to generate at least one normalized text, the text normalization code including: receiving code configured to cause the at least one processor to receive input text; first-level code configured to cause the at least one processor to generate a statistical model, the statistical model processes the input text to obtain a first output; and second-level code configured to cause the at least one processor to generate a rule-based model, the rule-based model transforms the first output into an output normalized text.

[0064] (10) An apparatus for text normalization according to feature (9), wherein the statistical model includes a bidirectional encoder representations from transformers (BERT) code as a baseline model; and the BERT code is configured to cause the at least one processor to decompose the input text into at least one character and a label, the at least one character including a token.

[0065] (11) An apparatus for text normalization according to feature (9) or (10), wherein the second level code also includes selecting from a group, the group including: a position exchanger code, configured to cause the at least one processor to exchange the at least one character with the second at least one character to maintain the meaning of the input text; a segment merging code, configured to cause the at least one processor to merge the at least one character with at least one other character to maintain the second meaning of the input text; or a tag-based converter code, configured to cause the at least one processor to convert the input text based on tags.

[0066] (12) An apparatus for text normalization according to feature (9), wherein the tag-based converter code further comprises: a number converter code configured to cause the at least one processor to convert at least one number into text; a symbol converter code configured to cause the at least one processor to convert at least one punctuation mark into text; a metric converter code configured to cause the at least one processor to convert at least one abbreviation of a metric into text; and a compound converter code configured to cause the at least one processor to convert at least one compound phrase into text, the at least one compound phrase comprising a combination of text, numbers, symbols and metrics.

[0067] (13) An apparatus for text normalization according to any one of features (9) to (13), wherein the BERT code includes a phrase-based attention code.

[0068] (14) An apparatus for text normalization according to feature (13), wherein the phrase-based attention code is defined as (i) an average value of at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average value of the at least one character embedded in the input text, the at least one character not having at least one weight associated with the at least one character.

[0069] (15) A non-transitory computer-readable medium storing instructions which, when executed by a processor, cause the processor to: receive input text; process the input text based on a text normalization model, including: (i) processing the input text at a first level including a statistical model to obtain a first output; (ii) processing the first output at a second level including a rule-based model to obtain normalized text; and (iii) outputting the normalized text.

[0070] (16) A non-transitory computer-readable medium according to feature (15), wherein the statistical model also includes a bidirectional encoder representations from transformers (BERT) model as a baseline model; and the BERT model decomposes the input text into at least one character and a label, wherein the at least one character includes a token.

[0071] (17) A non-transitory computer-readable medium according to feature (15) or (16), wherein the second level includes a rule-based model, processing the first output to obtain normalized text, including: selecting from the group consisting of: (i) exchanging the at least one character with the second at least one character to maintain the meaning of the input text; (ii) merging the at least one character with at least one other character to maintain the second meaning of the input text; or (iii) converting the at least one character into one or more words based on the tokenization of the first output.

[0072] (18) A non-transitory computer-readable medium according to feature (17), wherein the token-based conversion includes: converting at least one number into text; converting at least one punctuation mark into text; converting at least one abbreviation of a metric into text; and converting at least one compound phrase into text, the at least one compound phrase comprising a combination of text, numbers, marks, and metrics.

[0073] (19) A non-transitory computer-readable medium according to any one of features (16) to (18), wherein the BERT model includes a phrase-based attention operation.

[0074] (20) A non-transitory computer-readable medium as described in feature (19), wherein the phrase-based attention operation is defined as (i) an average of at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average of the at least one character embedded in the input text, the at least one character not having at least one weight associated with the at least one character.

Claims

1. A method for text normalization, comprising: Receive input text; Processing the input text based on a text normalization model, wherein processing the input text comprises: (i) processing the input text at a first stage including a statistical model to obtain a first output; (ii) processing the first output at a second stage including a rule-based model to obtain normalized text; and (iii) outputting the normalized text.

2. The method for text normalization according to claim 1, wherein: The statistical model also includes a transformer-based bidirectional encoder representation BERT model as a baseline model; and The BERT model decomposes the input text into at least one character and a label, the at least one character including a token.

3. The method for text normalization according to claim 1, wherein: The step of processing the first output to obtain normalized text at a second level including a rule-based model comprises: selecting from the group consisting of: (i) exchanging the at least one character with a second at least one character to maintain the meaning of the input text; (ii) merging the at least one character with at least one other character to maintain the second meaning of the input text; and (iii) based on the tokenization of the first output, converting the at least one character into one or more words.

4. The method for text normalization according to claim 3, wherein: The tag-based conversion includes: Convert at least one number into text; converting at least one punctuation mark into text; converting at least one abbreviation into text; and At least one compound phrase is transformed into text, the at least one compound phrase comprising a combination of text, numbers, symbols, and metrics.

5. The method for text normalization according to claim 2, wherein: The BERT model contains a phrase-based attention operation.

6. The method for text normalization according to claim 5, wherein: The phrase-based attention operation is defined as (i) an average of at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average of at least one character embedded in the input text, the at least one character not having the at least one weight associated with the at least one character.

7. The method for text normalization according to claim 5, wherein: The BERT model contains a phrase-based attention operation.

8. The method for text normalization according to claim 5, wherein: The BERT model includes a single layer.

9. A device for text normalization, comprising: at least one memory configured to store computer program code; At least one processor configured to operate according to the instructions of the computer program code, the computer program code comprising: A text normalization code is configured to cause the at least one processor to generate at least one normalized text, the text normalization code comprising: receiving code configured to cause the at least one processor to receive input text; A first level of code configured to cause the at least one processor to generate a statistical model, the statistical model processing the input text to obtain a first output; and The second level code is configured to cause the at least one processor to generate a rule-based model, wherein the rule-based model transforms the first output into an output normalized text.

10. The apparatus for text normalization according to claim 9, wherein: The statistical model includes a transformer-based bidirectional encoder representation BERT code as a baseline model; and The BERT code is configured to cause the at least one processor to decompose the input text into at least one character and a label, the at least one character comprising a token.

11. The apparatus for text normalization according to claim 9, wherein: The second level code further comprises: selected from the group consisting of: a position exchanger code configured to cause the at least one processor to exchange the at least one character with a second at least one character to maintain the meaning of the input text; segment merging code configured to cause the at least one processor to merge the at least one character together to maintain the second meaning of the input text; or The token-based converter code is configured to cause the at least one processor to convert the input text based on tokens.

12. The apparatus for text normalization according to claim 9, wherein the token-based converter code further comprises: digitizer code configured to cause the at least one processor to convert at least one digit into text; token converter code configured to cause the at least one processor to convert at least one punctuation mark into text; metric converter code configured to cause the at least one processor to convert at least one abbreviation of a metric into text; as well as A composite converter code is configured to cause the at least one processor to transform at least one composite phrase into text, the at least one composite phrase comprising a combination of text, numbers, tokens, and metrics.

13. The apparatus for text normalization according to claim 9, wherein: The BERT code contains a phrase-based attention code.

14. The apparatus for text normalization according to claim 13, wherein: The phrase-based attention code is defined as (i) an average value of the at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average value of the at least one character embedded in the input text, the at least one character not having the at least one weight associated with the at least one character.

15. A non-transitory computer-readable medium having instructions stored therein, which, when executed by a processor, cause the processor to: Receive input text; Processing the input text based on a text normalization model includes: (i) processing the input text at a first stage including a statistical model to obtain a first output; (ii) processing the first output at a second stage including a rule-based model to obtain normalized text; and (iii) outputting the normalized text.

16. The non-transitory computer readable medium of claim 15, wherein: The statistical model also includes a transformer-based bidirectional encoder representation BERT model as a baseline model; and The BERT model decomposes the input text into at least one character and a label, the at least one character including a token.

17. The non-transitory computer readable medium of claim 15, wherein: The step of processing the first output to obtain normalized text at a second level including a rule-based model comprises: selecting from the group consisting of: (i) exchanging the at least one character with a second at least one character to maintain the meaning of the input text; (ii) merging the at least one character with at least one other character to maintain the second meaning of the input text; or (iii) based on the tokenization of the first output, converting the at least one character into one or more words.

18. The non-transitory computer readable medium of claim 17, wherein: The tag-based conversion includes: Convert at least one number into text; converting at least one punctuation mark into text; converting at least one abbreviation of the metric into text; and At least one compound phrase is transformed into text, the at least one compound phrase comprising a combination of text, numbers, symbols, and metrics.

19. The non-transitory computer readable medium of claim 16, wherein: The BERT model contains a phrase-based attention operation.

20. The non-transitory computer readable medium of claim 19, wherein: The phrase-based attention operation is defined as (i) an average of at least one character embedded in the input text, the at least one character having at least one weight associated with the at least one character, and (ii) an average of at least one character embedded in the input text, the at least one character not having the at least one weight associated with the at least one character.