Polyphone pronunciation recognition method and device, equipment and storage medium
By combining pre-trained language models, word segmentation and part-of-speech information, generating vectors and then classifying the pronunciation of multi-phonetic characters, the problem of low multi-phonetic character recognition accuracy in the existing technology is solved and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202310214066.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-09-10
AI Technical Summary
Existing multi-phonetic word pronunciation recognition technology has low accuracy, especially open source toolkits such as pypinyin that perform poorly on the CPP data set. The deep learning model does not fully utilize contextual information and grammatical information, resulting in limited performance.
By obtaining the text to be recognized, polyphonetic characters are determined, and pre-trained language models, word segmentation tools and part-of-speech analysis tools are used to generate semantic vectors, word segmentation vectors and part-of-speech vectors. After combining the self-attention module and layer normalization, a fully connected layer is used. Classify the pronunciation of multi-phonetic characters to improve recognition accuracy.
The accuracy of multi-phonetic word recognition has been improved on the public CPP data set, reaching 98.91%, and performs better in actual scenarios, making it more effective than traditional deep learning model methods.
Smart Images

Figure CN118627508A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pronunciation recognition, and in particular to a method, device, equipment and storage medium for polyphonetic character pronunciation recognition. Background Art
[0002] Speech synthesis refers to the use of machine learning models to synthesize human-like reading audio from text. Existing technical solutions include commonly used open source toolkits such as pypinyin, which is a Chinese character pinyin conversion tool (Python version), deep learning models such as g2pM, etc. , g2pM is a Chinese grapheme to phoneme conversion package based on a new open benchmark dataset. The inventors found that most open source toolkits are based on vocabulary, and the biggest problem is low accuracy. On the test set of the public dataset CPP (Chinese Grapheme to Phoneme), pypinyin's accuracy is 86.13%, which is even lower than the accuracy of using a simple majority voting strategy (92.08%). The inventors also found that the deep learning model uses word information, but does not fully use contextual information and grammatical information, etc., and its performance is constrained. Summary of the invention
[0003] In view of the above technical problems, the purpose of this application is to provide a method, device, equipment and storage medium for polyphonetic character pronunciation recognition, aiming to improve the accuracy of polyphonetic character recognition.
[0004] The present application provides a method for recognizing the pronunciation of a polyphonetic character, comprising:
[0005] Get the text to be recognized;
[0006] determining polyphones in the text;
[0007] Encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text;
[0008] Perform word segmentation encoding on the text, and input the word segmentation encoding result into the word segmentation embedding representation module to obtain the word segmentation vector of each word in the text;
[0009] Performing part-of-speech encoding on the text, and inputting the part-of-speech encoding result into a part-of-speech embedding representation module to obtain a part-of-speech vector for each word in the text;
[0010] The semantic vector, word segmentation vector and part-of-speech vector are added together, and based on the addition result, the final vector of each word is obtained after a self-attention module and layer normalization;
[0011] Filtering out the final vector of the polyphonetic character;
[0012] Based on the final vector of the polyphonetic character, the pronunciation of the polyphonetic character is classified using a fully connected layer to obtain the pronunciation of the polyphonetic character.
[0013] Further, the determining of polyphonetic characters in the text includes:
[0014] Get the preset dictionary;
[0015] The polyphonetic characters in the text are determined by searching the dictionary.
[0016] Furthermore, the dictionary is a table, and each record in the table records a character and the pronunciation of the character.
[0017] Furthermore, the pre-trained language model is an ernie3 model.
[0018] Furthermore, the step of performing word segmentation encoding on the text includes:
[0019] Get the word segmentation tool;
[0020] Using the word segmentation tool to segment the text to obtain a word segmentation result;
[0021] The word segmentation result is encoded to obtain the word segmentation encoding result.
[0022] Furthermore, the part-of-speech encoding of the text includes:
[0023] Get the part-of-speech analysis tool;
[0024] Analyzing the part of speech of each word in the text using the part of speech analysis tool;
[0025] Each word in the text is encoded according to the part of speech of the word to obtain the part of speech encoding result.
[0026] Furthermore, the word segmentation tool is jieba or NLTK.
[0027] In a second aspect, an embodiment of the present application provides a method for recognizing the pronunciation of a polyphonetic character, comprising:
[0028] A text acquisition module, used to acquire the text to be recognized;
[0029] A polyphone determination module, used for determining polyphones in the text;
[0030] A semantic vector generation module, used to encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text;
[0031] A word segmentation vector generation module is used to perform word segmentation encoding on the text, and input the word segmentation encoding result into the word segmentation embedding representation module to obtain the word segmentation vector of each word in the text;
[0032] A part-of-speech vector generation module is used to perform part-of-speech encoding on the text, and input the part-of-speech encoding result into a part-of-speech embedding representation module to obtain a part-of-speech vector for each word in the text;
[0033] An addition module, used to add the semantic vector, word segmentation vector and part-of-speech vector, and obtain the final vector of each word based on the addition result after self-attention module and layer normalization;
[0034] A screening module, used for screening out the final vector of the polyphonetic character;
[0035] The polyphone pronunciation determination module is used to classify the pronunciation of the polyphone based on the final vector of the polyphone using a fully connected layer to obtain the pronunciation of the polyphone.
[0036] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the methods described above are implemented.
[0037] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.
[0038] Beneficial effects of this application:
[0039] A method for recognizing the pronunciation of polyphones provided in an embodiment of the present application includes: obtaining a text to be recognized; determining the polyphones in the text; encoding each character of the text, inputting the encoding result into a pre-trained language model, and obtaining a semantic vector of each character of the text; performing word segmentation encoding on the text, inputting the word segmentation encoding result into a word segmentation embedding representation module, and obtaining a word segmentation vector of each character of the text; performing part-of-speech encoding on the text, inputting the part-of-speech encoding result into a part-of-speech embedding representation module, and obtaining a part-of-speech vector of each character of the text; adding the semantic vector, the word segmentation vector, and the part-of-speech vector, and obtaining a final vector of each character based on the addition result through a self-attention module and layer normalization; screening out the final vector of the polyphone; based on the final vector of the polyphone, using a fully connected layer to classify the pronunciation of the polyphone to obtain the pronunciation of the polyphone. It should be noted that, according to the characteristics of Chinese, in most cases, the boundaries of word segments and the differences in parts of speech can directly determine the pronunciation of polyphones. Therefore, compared with existing deep learning model methods (g2pM, etc.), the embodiments of the present application improve the accuracy of polyphone recognition by introducing word segmentation and part of speech information. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the implementation manner will be briefly introduced below. Obviously, the drawings described below are only some implementation manners of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 It is a flowchart of a method for recognizing the pronunciation of a polyphonetic character provided in an embodiment of the present application;
[0042] Figure 2 It is a simplified flow chart of the method for recognizing the pronunciation of polyphonetic characters provided in the embodiment of the present application;
[0043] Figure 3 It is a structural schematic diagram of a polyphonetic character pronunciation recognition device provided in an embodiment of the present application;
[0044] Figure 4 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may also be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.
[0047] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0048] Embodiment 1:
[0049] See also Figure 1 , Figure 2 , the present application embodiment provides a polyphonetic character pronunciation recognition method, including steps S1 to S8:
[0050] S1. Obtain the text to be recognized.
[0051] As in the above step S1, the text to be recognized may be text input by a user, or may be text collected from other paths.
[0052] S2, determining polyphonetic characters in the text.
[0053] S3. Encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text.
[0054] As shown in step S3 above, the pre-trained language model is trained on a large-scale corpus, and its model architecture is usually stacked with multiple layers of transformers.
[0055] S4. Perform word segmentation encoding on the text, and input the word segmentation encoding result into the word segmentation embedding representation module to obtain the word segmentation vector of each word in the text.
[0056] S5. Perform part-of-speech encoding on the text, and input the part-of-speech encoding result into the part-of-speech embedding representation module to obtain the part-of-speech vector of each character in the text.
[0057] As in the above steps S4 and S5, it should be understood that the embedding representation module (embedding) is a module that converts each encoding into a corresponding vector. Therefore, the word segmentation embedding representation module is for word segmentation encoding, and the part-of-speech embedding representation module is for part-of-speech encoding.
[0058] S6. Add the semantic vector, the word segmentation vector, and the part-of-speech vector, and based on the addition result, through the self-attention module and layer normalization, obtain the final vector of each character.
[0059] As in the above step S6, it should be understood that the role of the self-attention module is to perform feature transformation on the input vector to obtain a new vector with context semantics.
[0060] S7. Screen out the final vectors of the polyphonic characters.
[0061] As in the above step S5, after obtaining the final vector of each one, screen out the final vectors of the polyphonic characters from these final vectors.
[0062] S8. Based on the final vectors of the polyphonic characters, use a fully connected layer to classify the pronunciations of the polyphonic characters to obtain the pronunciations of the polyphonic characters.
[0063] It should be noted that according to the characteristics of Chinese, in most cases, the boundaries of word segmentation and the differences in parts of speech can directly determine the pronunciations of polyphonic characters. Therefore, compared with existing deep learning model methods (such as g2pM), the embodiments of the present application improve the accuracy of polyphonic character recognition by introducing word segmentation and part-of-speech information. The embodiments of the present application are tested on the test set of the publicly available CPP dataset, achieving the highest performance (98.91%, compared with 97.85% for g2pM), and the accuracy is even higher in actual scenarios. In addition, it should be noted that the embodiments of the present application introduce word segmentation and part-of-speech information by improving the model.
[0064] The following gives several examples involving the character "好" to illustrate the reasons for model design, that is, word segmentation and part-of-speech information can assist in the judgment of pronunciation. The character "好" has two pronunciations, hao3 (third tone) and hao4 (fourth tone). The part-of-speech abbreviation symbols in the following table are the English abbreviations of the corresponding parts of speech.
[0065] The character "好" forms different parts of speech and word segmentations in the following two sentences. It is pronounced hao3 in the first sentence and hao4 in the second sentence.
[0066] Example sentence: It's a pity that good things always have many setbacks.
[0067] Word Segmentation and Part of Speech:
[0068] But Good things come to those who wait d / adverb l / idiom
[0069] Example sentence: His job is to analyze consumers' shopping preferences
[0070] Word Segmentation and Part of Speech:
[0071]
[0072] The character 'hao' forms two different nouns in the following two sentences, and the word segmentation is different. It is pronounced 'hao4' in the first sentence and 'hao3' in the second sentence. Therefore, introducing word segmentation information can help identify the pronunciation.
[0073] Example sentence: In Qian, there was no donkey. A person who liked to do good things brought one in by boat.
[0074] Word Segmentation and Part of Speech:
[0075]
[0076] Example sentence: Something good is happening.
[0077] Word Segmentation and Part of Speech:
[0078] have Good things occur v / verb n / noun v / verb
[0079] In one embodiment, determining the polyphonic characters in the text includes:
[0080] Obtaining a preset dictionary;
[0081] Determining the polyphonic characters in the text by querying the dictionary.
[0082] In the embodiments of the present application, the dictionary can be pre-constructed or obtained from a third-party database. The dictionary records a large number of characters and all the pronunciations of the corresponding characters.
[0083] In one embodiment, the dictionary is a table, and each record in the table records a character and its pronunciation.
[0084] In the embodiments of the present application, the table is shown as follows.
[0085]
[0086] In one embodiment, the pre-trained language model is the ernie3 model.
[0087] In the embodiments of the present application, Ernie3 is a type of pre-trained language model, and its advantages are as follows: 1. It has a complete set of Chinese characters, and there are basically no Chinese characters outside the encoding. 2. It is more fully trained in Chinese corpora. Therefore, using the Ernie3 model as the Ernie3 model is beneficial to obtaining the semantic vectors of all characters in the text.
[0088] In one embodiment, the step of performing word segmentation and encoding on the text includes:
[0089] Obtain a word segmentation tool;
[0090] Use the word segmentation tool to perform word segmentation on the text to obtain a word segmentation result;
[0091] Perform encoding on the word segmentation result to obtain the word segmentation encoding result.
[0092] In the embodiments of the present application, to perform word segmentation on the text, first, the text needs to be segmented. For example, for the text "偏偏好事多磨" (literally: "unfortunately, good things are always beset with difficulties"), it is segmented into "偏偏" (literally: "unfortunately") and "好事多磨" (literally: "good things are always beset with difficulties").
[0093] In one embodiment, the part-of-speech encoding of the text includes:
[0094] Obtain a part-of-speech analysis tool;
[0095] Use the part-of-speech analysis tool to analyze the part of speech of each word in the text;
[0096] According to the part of speech of the word, perform encoding on each word in the text to obtain the part-of-speech encoding result.
[0097] In the embodiments of the present application, to perform part-of-speech encoding on the text, first, the text needs to be segmented, and then the part of speech of each word is analyzed, as shown in the following table.
[0098] But Good things come to those who wait d / adverb l / idiom
[0099] In the embodiments of the present application, before using the part-of-speech analysis tool to analyze the part of speech of each word in the text, the text also needs to be segmented so as to obtain the part of speech of each word in the text.
[0100] In one embodiment, the word segmentation tool is jieba or NLTK. Jieba is a Chinese word segmentation component that supports three word segmentation modes: precise mode, which attempts to segment the sentence most accurately and is suitable for text analysis. Full mode, which scans all the words in the sentence that can be formed into words, is very fast, but cannot resolve ambiguity. Search engine mode, based on the precise mode, segments long words again to improve the recall rate, which is suitable for search engine word segmentation. In addition, it supports traditional Chinese word segmentation and supports custom dictionaries. In addition, jieba word segmentation also provides a part-of-speech tagging function, which can mark the part of speech of each word after the sentence is segmented, so it can also be used as a part-of-speech analysis tool. NLTK (natural language toolkit) is a natural language processing toolbox written in python, which also has the functions of word segmentation and part-of-speech tagging.
[0101] See also Figure 3 In one embodiment, the present application provides a polyphonetic character pronunciation recognition device, comprising:
[0102] A text acquisition module 1 is used to acquire the text to be recognized;
[0103] A polyphone determination module 2, used for determining polyphones in the text;
[0104] A semantic vector generation module 3 is used to encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text;
[0105] A word segmentation vector generation module 4 is used to perform word segmentation encoding on the text, input the word segmentation encoding result into the word segmentation embedding representation module, and obtain the word segmentation vector of each word in the text;
[0106] A part-of-speech vector generation module 5 is used to perform part-of-speech encoding on the text, and input the part-of-speech encoding result into a part-of-speech embedding representation module to obtain a part-of-speech vector for each word in the text;
[0107] An adding module 6 is used to add the semantic vector, the word segmentation vector and the part-of-speech vector, and obtain the final vector of each word based on the addition result after a self-attention module and layer normalization;
[0108] A screening module 7, used for screening out the final vector of the polyphonetic character;
[0109] The polyphone pronunciation determination module 8 is used to classify the pronunciation of the polyphone based on the final vector of the polyphone using a fully connected layer to obtain the pronunciation of the polyphone.
[0110] Furthermore, the polyphone determination module includes:
[0111] A dictionary acquisition unit, used to acquire a preset dictionary;
[0112] A query unit is used to determine the polyphonetic characters in the text by querying the dictionary.
[0113] Furthermore, the dictionary is a table, and each record in the table records a character and the pronunciation of the character.
[0114] Furthermore, the pre-trained language model is an ernie3 model.
[0115] Furthermore, the word segmentation encoding of the text includes:
[0116] Get the word segmentation tool;
[0117] Using the word segmentation tool to segment the text to obtain a word segmentation result;
[0118] The word segmentation result is encoded to obtain the word segmentation encoding result.
[0119] Furthermore, the part-of-speech encoding of the text includes:
[0120] Get the part-of-speech analysis tool;
[0121] Analyzing the part of speech of each word in the text using the part of speech analysis tool;
[0122] Each word in the text is encoded according to the part of speech of the word to obtain the part of speech encoding result.
[0123] Furthermore, the word segmentation tool is jieba or NLTK.
[0124] Embodiment three:
[0125] Reference Figure 4 The present application also provides a computer device, the internal structure of which can be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor designed for the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a method for recognizing the pronunciation of polyphonetic characters. The network interface of the computer device is used to communicate with an external terminal via a network connection. Furthermore, the above-mentioned computer device can also be provided with an input device and a display screen, etc. When the above-mentioned computer program is executed by a processor, a method for recognizing the pronunciation of polyphones is implemented. The method for recognizing the pronunciation of polyphones includes the following steps: obtaining a text to be recognized; determining the polyphones in the text; encoding each word of the text, inputting the encoding result into a pre-trained language model, and obtaining a semantic vector for each word of the text; performing word segmentation encoding on the text, inputting the word segmentation encoding result into a word segmentation embedding representation module, and obtaining a word segmentation vector for each word of the text; performing part-of-speech encoding on the text, inputting the part-of-speech encoding result into a part-of-speech embedding representation module, and obtaining a part-of-speech vector for each word of the text; adding the semantic vector, word segmentation vector, and part-of-speech vector, and based on the addition result, obtaining a final vector for each word through a self-attention module and layer normalization; screening out the final vector of the polyphone; based on the final vector of the polyphone, using a fully connected layer to classify the pronunciation of the polyphone to obtain the pronunciation of the polyphone. Those skilled in the art will appreciate that Figure 4 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0126] According to the characteristics of Chinese, in most cases, the boundaries of word segments and the differences in parts of speech can directly determine the pronunciation of polyphones. Therefore, compared with the existing deep learning model methods (g2pM, etc.), the embodiments of the present application improve the accuracy of polyphone recognition by introducing word segmentation and part of speech information.
[0127] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method for recognizing the pronunciation of a polyphonetic character is implemented. The method for recognizing the pronunciation of a polyphonetic character comprises the following steps: obtaining a text to be recognized; determining the polyphonetic characters in the text; encoding each character of the text, inputting the encoding result into a pre-trained language model, and obtaining a semantic vector of each character of the text; performing word segmentation encoding on the text, inputting the word segmentation encoding result into a word segmentation embedding representation module, and obtaining a word segmentation vector of each character of the text; performing part-of-speech encoding on the text, inputting the part-of-speech encoding result into a part-of-speech embedding representation module, and obtaining a part-of-speech vector of each character of the text; adding the semantic vector, word segmentation vector, and part-of-speech vector, and obtaining a final vector of each character based on the addition result after a self-attention module and layer normalization; screening out the final vector of the polyphonetic character; based on the final vector of the polyphonetic character, using a fully connected layer to classify the pronunciation of the polyphonetic character to obtain the pronunciation of the polyphonetic character.
[0128] According to the characteristics of Chinese, in most cases, the boundaries of word segments and the differences in parts of speech can directly determine the pronunciation of polyphones. Therefore, compared with the existing deep learning model methods (g2pM, etc.), the embodiments of the present application improve the accuracy of polyphone recognition by introducing word segmentation and part of speech information.
[0129] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0130] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0131] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for recognizing the pronunciation of a polyphonetic character, characterized in that: include: Get the text to be recognized; determining polyphones in the text; Encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text; Perform word segmentation encoding on the text, and input the word segmentation encoding result into the word segmentation embedding representation module to obtain the word segmentation vector of each word in the text; Performing part-of-speech encoding on the text, and inputting the part-of-speech encoding result into a part-of-speech embedding representation module to obtain a part-of-speech vector for each word in the text; The semantic vector, word segmentation vector and part-of-speech vector are added together, and based on the addition result, the final vector of each word is obtained after a self-attention module and layer normalization; Filtering out the final vector of the polyphonetic character; Based on the final vector of the polyphonetic character, the pronunciation of the polyphonetic character is classified using a fully connected layer to obtain the pronunciation of the polyphonetic character.
2. The polyphone pronunciation recognition method according to claim 1, characterized in that: Determining the polyphonetic characters in the text includes: Get the preset dictionary; The polyphonetic characters in the text are determined by searching the dictionary.
3. The polyphone pronunciation recognition method according to claim 2, characterized in that: The dictionary is a table, and each record in the table records a character and the pronunciation of the character.
4. The polyphone pronunciation recognition method according to claim 1, characterized in that: The pre-trained language model is the ernie3 model.
5. The polyphonetic character pronunciation recognition method according to claim 1, characterized in that: The step of performing word segmentation encoding on the text comprises: Get the word segmentation tool; Using the word segmentation tool to segment the text to obtain a word segmentation result; The word segmentation result is encoded to obtain the word segmentation encoding result.
6. The polyphone pronunciation recognition method according to claim 1, characterized in that: The part-of-speech encoding of the text comprises: Get the part-of-speech analysis tool; Analyzing the part of speech of each word in the text using the part of speech analysis tool; Each word in the text is encoded according to the part of speech of the word to obtain the part of speech encoding result.
7. The method for polyphonetic character pronunciation recognition according to claim 5, characterized in that: The word segmentation tool is jieba or NLTK.
8. A polyphonetic character pronunciation recognition device, characterized in that: include: A text acquisition module, used to acquire the text to be recognized; A polyphone determination module, used for determining polyphones in the text; A semantic vector generation module, used to encode each word of the text, input the encoding result into a pre-trained language model, and obtain a semantic vector of each word of the text; A word segmentation vector generation module is used to perform word segmentation encoding on the text, and input the word segmentation encoding result into the word segmentation embedding representation module to obtain the word segmentation vector of each word in the text; A part-of-speech vector generation module is used to perform part-of-speech encoding on the text, and input the part-of-speech encoding result into a part-of-speech embedding representation module to obtain a part-of-speech vector for each word in the text; An addition module, used to add the semantic vector, word segmentation vector and part-of-speech vector, and obtain the final vector of each word based on the addition result after self-attention module and layer normalization; A screening module, used for screening out the final vector of the polyphonetic character; The polyphone pronunciation determination module is used to classify the pronunciation of the polyphone based on the final vector of the polyphone using a fully connected layer to obtain the pronunciation of the polyphone.
9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
