Polyphonetic character processing method and device

By using a combination of bidirectional long-short-term memory network and part-of-speech vectors in the polyphonic character ambiguity elimination system, the problems of rule conflicts and complex feature extraction in the polyphonic character ambiguity elimination system are solved, and the accuracy of pronunciation prediction of polyphonic characters is improved.

CN113268989BActive Publication Date: 2024-10-18BEIJING KINGSOFT DIGITAL ENTERTAINMENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110528205.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2024-10-18
Estimated Expiration
2041-05-14

AI Technical Summary

Technical Problem

Polyphonetic word ambiguity disambiguation systems based on rules and statistical models in the prior art have problems such as rule conflicts, complex feature extraction, and inaccurate semantic encoding, resulting in inaccurate polyphonetic word disambiguation predictions.

Method used

A bidirectional long-short-term memory network based on the language model and polyphonic character disambiguation model is used to enhance the encoding of polyphonic character position information and contextual information through the combination of semantic context vectors and part-of-speech vectors, and improve the pronunciation prediction accuracy of the polyphonic character disambiguation model.

Benefits of technology

It improves the pronunciation prediction accuracy of the polyphonic character ambiguity elimination system, enhances the combination of semantic features of polyphonic characters in Chinese sentences, and solves the problems of complex feature extraction and inaccurate semantic encoding in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113268989B_ABST
    Figure CN113268989B_ABST
Patent Text Reader

Abstract

The polyphone processing method and device provided in the present application, wherein the method includes a bidirectional long short-term memory network based on a language model and a polyphone disambiguation model, obtaining a semantic context vector of a Chinese sentence containing polyphones; segmenting the Chinese sentence, and determining the part-of-speech vector of the polyphones in the Chinese sentence based on the words obtained by the segmentation and the part-of-speech of the words; determining the encoding vector of the Chinese sentence based on the polyphones in the Chinese sentence and the part-of-speech vector; inputting the semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone. Specifically, the polyphone processing method introduces a language model in the information encoding stage of the Chinese sentence containing polyphones, and introduces the part-of-speech information of the words before and after the polyphones in the Chinese sentence, so as to improve the prediction accuracy of the polyphone disambiguation model for the pronunciation of the polyphones in the Chinese sentence in the polyphone disambiguation task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a polyphonetic character processing method, a polyphonetic character processing apparatus, a computing device, and a computer-readable storage medium. Background Art

[0002] The earliest Chinese polyphone disambiguation was based on rules. These rules were summarized by linguists and encoded into computers in a way that computers can understand. However, the rule-based Chinese polyphone disambiguation system has the problem that a polyphone may match multiple rules, resulting in rule conflicts. As the scale of data increases, statistical models based on data have gradually become the preferred solution for the polyphone disambiguation task. Traditional machine learning models (such as decision trees and maximum entropy models) and deep neural networks have begun to be applied to the polyphone disambiguation task. However, the deep neural network polyphone disambiguation system based on statistical models has a complex feature extraction process, the semantic encoding of sentences is not accurate enough, and the feature combination is single, which results in inaccurate predictions of the polyphone disambiguation system. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method for processing polyphonetic characters, a polyphonetic character processing apparatus, a computing device and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a method for processing polyphonetic characters is provided, comprising:

[0005] A bidirectional long short-term memory network based on the language model and the polyphone disambiguation model is used to obtain the semantic context vector of Chinese sentences containing polyphones.

[0006] Segmenting the Chinese sentence, and determining the part-of-speech vector of the polyphonetic character in the Chinese sentence based on the words obtained by the segmentation and the part-of-speech of the words;

[0007] Determining an encoding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector;

[0008] The semantic context vector and the encoding vector are input into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone.

[0009] According to a second aspect of an embodiment of the present application, a polyphonetic character processing device is provided, comprising:

[0010] A first vector acquisition module is configured as a bidirectional long short-term memory network based on a language model and a polyphone disambiguation model to obtain a semantic context vector of a Chinese sentence containing polyphones;

[0011] A second vector acquisition module is configured to segment the Chinese sentence and determine the part-of-speech vector of the polyphone in the Chinese sentence based on the words obtained by the segmentation and the part-of-speech of the words;

[0012] A third vector acquisition module is configured to determine the encoding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector;

[0013] The pronunciation acquisition module is configured to input the semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone.

[0014] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the steps of the polyphonetic character processing method when executing the computer instructions.

[0015] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the polyphonetic character processing method are implemented.

[0016] The polyphone processing method and device provided in the present application, wherein the method includes a bidirectional long short-term memory network based on a language model and a polyphone disambiguation model to obtain a semantic context vector of a Chinese sentence containing polyphones; segmenting the Chinese sentence, and determining the part-of-speech vector of the polyphones in the Chinese sentence based on the words obtained by the segmentation and the part-of-speech of the words; determining the encoding vector of the Chinese sentence based on the polyphones in the Chinese sentence and the part-of-speech vector; inputting the semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone. Specifically, the polyphone processing method introduces a language model and a bidirectional long short-term memory network in the information encoding stage of a Chinese sentence containing polyphones, strengthens the extraction of semantic information and context information of the Chinese sentence, and utilizes the positional encoding mechanism in the language model to enhance the semantic encoding effect of the position information of the polyphones in the Chinese sentence; at the same time, the part-of-speech information of the words before and after the polyphones in the Chinese sentence is introduced to enrich the semantic feature combination of the Chinese sentence containing the polyphones input into the polyphone disambiguation model, so as to improve the prediction accuracy of the polyphone disambiguation model for the pronunciation of the polyphones in the Chinese sentence in the polyphone disambiguation task. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;

[0018] Figure 2It is a flowchart of a method for processing polyphonic characters provided by an embodiment of the present application;

[0019] Figure 3 It is a processing flowchart of a method for processing polyphonic characters provided by an embodiment of the present application;

[0020] Figure 4 It is a schematic structural diagram of a device for processing polyphonic characters provided by an embodiment of the present application. Detailed implementation manners

[0021] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.

[0022] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed items.

[0023] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0024] First, the noun terms related to one or more embodiments of the present invention are explained.

[0025] Speech synthesis system: A software model system that converts text into corresponding pronunciations.

[0026] Character sound conversion: The process of converting a corresponding Chinese character into a corresponding pinyin. For example, "古都" (ancient capital) is converted into "gu3 du1" after character sound conversion.

[0027] Eliminating polyphonic character ambiguity: In a speech synthesis system, character sound conversion is an essential module, and eliminating polyphonic character ambiguity is the core of the character sound conversion module. In Chinese, some characters correspond to two or more pronunciations. Eliminating polyphonic character ambiguity refers to how to enable the model in the computer to accurately distinguish the correct pronunciation of polyphonic characters through the context information in Chinese so that the character sound conversion module can obtain the correct pinyin of polyphonic characters.

[0028] POS: English full name: part of speech, Chinese full name: part-of-speech tagging.

[0029] Word embedding: embedding word vectors to convert the input character sequence into a vector form in a high-dimensional space.

[0030] Transformer model: A neural network model that solves sequence problems based only on the attention model. The model is mainly divided into two parts: encoder and decoder. The basic structure of the encoder and decoder is similar, both consisting of a multi-head self-attention layer and a fully connected layer. Compared with the traditional recurrent neural network model that solves sequence problems, the Transformer model can capture text information over longer distances.

[0031] BERT model: BERT, or Bidirectional Encoder Representation from Transformers, refers to the encoder part of the bidirectional Transformer model and is a self-encoding language model. It is a pre-trained language model in natural language processing that encodes the model input and generates the corresponding word vector.

[0032] BLSTM: Bidirectional Encoder Representation from Transformers. Bidirectional LSTM layer, a basic structural unit of neural networks, is designed to extract contextual information of the input sequence.

[0033] Full connect layer: Fully connected layer, a basic structural unit of a neural network.

[0034] Jieba: A Chinese word segmentation tool, its Chinese name is Jieba. For example, if there is a sentence "in the ancient capital of Xi'an", the Jieba analysis tool will divide it into "in / ancient capital / Xi'an".

[0035] Hanlp: It is a toolkit consisting of a series of model budgeting methods, combined with distributed natural language processing of deep neural networks. It has the characteristics of complete functions, efficient performance, clear architecture, up-to-date corpus, and customization. It provides functions such as lexical analysis, Chinese word segmentation, syntactic analysis, text analysis, and sentiment analysis.

[0036] In the prior art, the earliest disambiguation of Chinese polyphonic characters was rule-based. These rules were summarized by linguists and encoded into a computer in a computer-readable manner. However, in a rule-based Chinese polyphonic character disambiguation system, there is a problem that a single polyphonic character may match multiple rules, resulting in rule conflicts. For example, for the word "朝阳" (literally "facing the sun"), the defined rule is that when it appears as an adjective, it is pronounced as "chao1 yan g2". However, in sentence 1 (The direction facing the sun has abundant sunlight), the adjective "朝阳" should be pronounced as "chao1yang2"; in sentence 2 (The computer industry is a sunrise industry), the same adjective "朝阳" should be pronounced as "zhao1 yang2". The problem of the correct pronunciation of polyphonic characters in Chinese sentences has not been well solved.

[0037] With the increase in data scale, data-based statistical models have gradually become the preferred solution for the task of polyphonic character disambiguation. Traditional machine learning models (such as decision trees and maximum entropy models) and deep neural networks have begun to be applied to the task of polyphonic character disambiguation. Among them, traditional machine learning models adopt an end-to-end approach, that is, using data in the original format as input and the expected output as the final output, and all intermediate processes are carried out inside the model. This approach is now widely applied to various tasks. However, for a deep neural network polyphonic character disambiguation system based on a statistical model, the feature extraction process is complex, the semantic encoding of sentences is not accurate enough, and the feature combination is single. Therefore, the prediction of the polyphonic character disambiguation system is inaccurate.

[0038] Based on this, in this application, a method for processing polyphonic characters, a device for processing polyphonic characters, a computing device, and a computer-readable storage medium are provided, which will be described in detail one by one in the following embodiments.

[0039] Figure 1 FIG. shows a structural block diagram of a computing device 100 according to an embodiment of the present specification. The components of the computing device 100 include, but are not limited to, a memory 110 and a processor 120. The processor 120 is connected to the memory 110 through a bus 130, and a database 150 is used to store data.

[0040] The computing device 100 also includes an access device 140, which enables the computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, and so on.

[0041] In one embodiment of the present specification, the above components of the computing device 100 and Figure 1 other components not shown therein may also be connected to each other, for example, via a bus. It should be understood that Figure 1 the block diagram of the computing device shown is only for illustrative purposes and is not a limitation on the scope of the present specification. Those skilled in the art can add or replace other components as needed.

[0042] The computing device 100 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 100 can also be a mobile or stationary server.

[0043] Wherein, the processor 120 can execute Figure 2 the steps in the method shown. Figure 2 is a flowchart showing a method for processing polyphonic characters according to an embodiment of the present application, specifically including the following steps.

[0044] Step 202: Obtain a semantic context vector of a Chinese sentence containing polyphonic characters based on a bidirectional long short-term memory network of a language model and a polyphonic character disambiguation model.

[0045] Wherein, a polyphonic character is a Chinese character corresponding to two or more pronunciations. For example, the pronunciations corresponding to the polyphonic character "dou" include: "du", "dou", and the pronunciations corresponding to the polyphonic character "dan" include: "dan", "chan", "shan", etc. Then a Chinese sentence containing polyphonic characters can be understood as: a Chinese sentence containing at least one polyphonic character.

[0046] In addition, a language model can be understood as a pre-trained language model based on deep learning, such as the BERT model. In specific use, it can be understood as a part of the model architecture of a polyphone disambiguation model, and a bidirectional long short-term memory network, i.e., BLSTM, can also be understood as a part of the model architecture of the polyphone disambiguation model. By combining the language model and BLSTM, after obtaining the semantic vector of each character in a Chinese sentence through the language model, the semantic context vector of the Chinese sentence can be extracted through BLSTM, and finally, the semantic context vector of the Chinese sentence combined with context information can be obtained, realizing the encoding of a Chinese sentence containing polyphones.

[0047] Specifically, before obtaining the semantic context vector of a Chinese sentence containing polyphones based on the language model and the bidirectional long short-term memory network of the polyphone disambiguation model, a Chinese sentence containing polyphones is received or obtained. The Chinese sentence contains at least one polyphone. Taking the Chinese sentence "I have been to both Beijing and Nanjing" as an example, the Chinese sentence contains a polyphone "dou".

[0048] In specific implementation, obtaining the semantic context vector of a Chinese sentence containing polyphones by the bidirectional long short-term memory network based on the language model and the polyphone disambiguation model includes:

[0049] Inputting the Chinese sentence containing polyphones into the language model to obtain the semantic vector of the Chinese sentence;

[0050] Inputting the semantic vector into the bidirectional long short-term memory network of the polyphone disambiguation model to obtain the semantic context vector of the Chinese sentence.

[0051] In practical applications, after receiving or obtaining a Chinese sentence containing polyphones (hereinafter referred to as a Chinese sentence), the Chinese sentence is first input into a pre-trained BERT model to extract the context information in the Chinese sentence and preliminarily extract the semantic information (i.e., semantic vector) of the Chinese sentence. By using the positional encoding mechanism in the BERT model, the encoding effect of the position information of the polyphones in the Chinese sentence is enhanced.

[0052] Then, the semantic vector of the Chinese sentence obtained through the BERT model is used as the input of the bidirectional long short-term memory network (i.e., BLSTM) of the polyphone disambiguation model to further extract the context information of the Chinese sentence and obtain the semantic context vector of the Chinese sentence.

[0053] Among them, the semantic vector represents the semantic information extracted from the Chinese sentence containing polyphonic characters. What the language model itself considers is the meaning of each character in the Chinese sentence. Still taking the Chinese sentence containing polyphonic characters "I have been to both Beijing and Nanjing" as an example, when this Chinese sentence is input into the language model, the semantic vector obtained for this Chinese sentence represents the actual meanings of each character in this Chinese sentence, such as "north, capital, and, south, capital, I, have, been, to".

[0054] In specific implementation, when this Chinese sentence is input into the language model, the language model will output a semantic vector of 512 * 9. Among them, the parameter 512 represents the dimension, and 9 represents the number of characters in the Chinese sentence. That is, when this Chinese sentence is input into the language model, the language model will represent each character in this Chinese sentence with a 512-dimensional vector, and finally output the overall 512 * 9 semantic vector of this Chinese sentence.

[0055] In actual application, the obtained semantic vector of this Chinese sentence is then input into the BLSTM for processing. The BLSTM will comprehensively consider the correlation relationship between each character in this Chinese sentence and its previous and next characters, thereby changing the value of its corresponding semantic vector to obtain the semantic context vector in the Chinese sentence. Among them, the value of each semantic vector can characterize the correlation relationship with its previous and next characters.

[0056] Still using the above example, the semantic vector of the Chinese sentence containing polyphonic characters "I have been to both Beijing and Nanjing" is input into the BLSTM. The BLSTM refers to the correlation relationship between each character and its previous or next one or two characters (for example, the first character only considers the correlation relationship with its next character, and the last character only considers the correlation relationship with its previous character), and updates each value in the semantic vector of each character in the Chinese sentence "north, capital, and, south, capital, I, have, been, to" through its correlation relationship. The updated semantic vector is the 512 * 9 semantic downward context vector of this Chinese sentence.

[0057] In specific implementation, after receiving or obtaining the Chinese sentence "I have been to both Beijing and Nanjing", this Chinese sentence is input into the pre-trained BERT model to initially extract the semantic information of this Chinese sentence and obtain the semantic vector A of this Chinese sentence; then the semantic vector A is input into the BLSTM layer to further extract the context information of this Chinese sentence and obtain the semantic context vector B. The detailed description of the acquisition of the semantic vector and the semantic context vector in this Chinese sentence can be referred to the above embodiments and will not be elaborated here.

[0058] In the embodiment of the present application, the BERT pre-training model and BLSTM are introduced in the information encoding stage of the Chinese sentence, which can strengthen the extraction of semantic information and context information of the Chinese sentence. The positional encoding mechanism in the BERT model can also be used to enhance the semantic encoding effect of the position information of polyphonic characters in the Chinese sentence. First, the BERT model extracts the semantic information in the Chinese sentence, that is, extracts and encodes the semantic information of the characters and phrases in the Chinese sentence, and selects the BERT model output as the input of the BLSTM layer, further extracts each character or each phrase in the Chinese sentence, and the context information of the characters before and after or before and after words, obtains the semantic context vector, and considers the before and after information and the before and after relationship of each character in the Chinese sentence through the processing of the BLSTM layer, so that the subsequent polyphonic character disambiguation model can not only consider the voice information of the polyphonic characters, but also consider the context information of the polyphonic characters when determining the pronunciation of the polyphonic characters in the Chinese sentence, so as to ensure the accuracy of the pronunciation of the polyphonic characters.

[0059] Step 204: Segment the Chinese sentence, and determine the part-of-speech vectors of the polyphonetic characters in the Chinese sentence based on the words obtained by the segmentation and the parts of speech of the words.

[0060] Specifically, the word segmentation of the Chinese sentence includes:

[0061] The Chinese sentences after filtering the numbers are segmented through the preset segmentation tool, and the parts of speech are tagged for the segmented words.

[0062] The preset word segmentation tools include but are not limited to Jieba or Hanlp, etc. Any other word segmentation tools that can implement word segmentation and part-of-speech tagging for Chinese sentences are also acceptable, and this specification does not impose any limitation on this.

[0063] In a specific implementation, before segmenting the Chinese sentence, the method further includes: filtering out numbers contained in the Chinese sentence.

[0064] Taking the Chinese sentence "I have been to Beijing and Nanjing once" as an example, after filtering out the numbers contained in the Chinese sentence, the obtained Chinese sentence is "I have been to Beijing and Nanjing times".

[0065] In actual applications, numbers do not have polyphones. Therefore, in order to reduce unnecessary features in Chinese sentences and improve the subsequent recognition efficiency of the polyphone disambiguation model, the Chinese sentence will be traversed before word segmentation to filter out the numbers contained in the Chinese sentence, so as to improve the word segmentation efficiency of the Chinese sentence and the subsequent recognition efficiency of the polyphone disambiguation model.

[0066] Still taking the Chinese sentence “I have been to both Beijing and Nanjing” as an example, the results of word segmentation of the Chinese sentence based on word segmentation tools such as Jieba or Hanlp are shown in Table 1.

[0067] Table 1

[0068]

[0069]

[0070] Referring to Table 1, the Chinese sentence "I have been to both Beijing and Nanjing" is divided into six words "Beijing / and / Nanjing / I / both / have / been / to", and each word corresponds to a part of speech.

[0071] In an embodiment of the present application, the Chinese sentence after digital filtering can be segmented based on word segmentation tools such as Jieba or Hanlp, and the words formed in the Chinese sentence after the segmentation can be tagged with parts of speech. Subsequently, the accuracy of the polyphone disambiguation model in distinguishing the pronunciation of polyphones can be improved based on the parts of speech of the two phrases before and after the polyphones after the segmentation of the Chinese sentence.

[0072] In a specific implementation, the word obtained based on word segmentation and the part of speech of the word determines the part of speech vector of the polyphone in the Chinese sentence, including:

[0073] Obtaining words after word segmentation of the Chinese sentence, and determining the part of speech of each word;

[0074] Determine a polyphone in the Chinese sentence based on a polyphone dictionary, and determine a word containing the polyphone, a word immediately preceding the word containing the polyphone, and a word immediately following the word containing the polyphone;

[0075] The part-of-speech vector of the polyphone in the Chinese sentence is determined based on the part-of-speech of the word containing the polyphone, the part-of-speech of the previous word adjacent to the word containing the polyphone, and the part-of-speech of the next word adjacent to the word containing the polyphone.

[0076] The polyphone dictionary may be understood as a pre-defined polyphone dictionary, through which it is possible to determine which character in a Chinese sentence containing polyphones is a polyphone.

[0077] Specifically, after segmenting the Chinese sentence and performing part-of-speech tagging on the segmented words, a custom polyphonic character dictionary can be used to query and determine the polyphonic characters contained in the Chinese sentence, that is, all the polyphonic characters contained in the Chinese sentence are identified and extracted through this polyphonic character dictionary. And determine the words containing the polyphonic character after segmentation, the word before and the word after this word; finally, combine the part-of-speech of this word, the part-of-speech of the word before this word and the part-of-speech of the word after this word to form the part-of-speech vector of the polyphonic character in this Chinese sentence.

[0078] Experimental results show that the part-of-speech information of the words before and after a polyphonic character can significantly improve the accuracy of the polyphonic character disambiguation model in accurately distinguishing the pronunciation of polyphonic characters. Therefore, in practical applications, the part-of-speech of the word containing the polyphonic character itself, the part-of-speech of the word before it, and the part-of-speech of the word after it after segmenting the Chinese sentence containing the polyphonic character are combined to form the part-of-speech vector of the polyphonic character in this Chinese sentence representing the part-of-speech, which is used for subsequent pronunciation recognition of polyphonic characters.

[0079] Still taking the Chinese sentence "I have been to both Beijing and Nanjing" as an example, after segmenting this Chinese sentence, it becomes six words: "Beijing / and / Nanjing / I / have / been to". Among them, the word containing the polyphonic character is "both", the word before "both" is "I", and the word after "both" is "have been to". As can be seen from Table 1, the part-of-speech of "both" is "d", the part-of-speech of "I" is "r", and the part-of-speech of "have been to" is "v". Then the part-of-speech vector of the polyphonic character in this Chinese sentence is: r d v.

[0080] In the embodiment of this application, after segmenting the Chinese sentence, the part-of-speech of the word containing the polyphonic character and the part-of-speech of the two words before and after this word are used as the part-of-speech vector of the polyphonic character in this Chinese sentence. Subsequently, through this part-of-speech vector, the prediction accuracy of the polyphonic character disambiguation model for the pronunciation of polyphonic characters can be greatly improved.

[0081] Step 206: Based on the polyphonic characters in the Chinese sentence and the part-of-speech vector, determine the encoding vector of the Chinese sentence.

[0082] Specifically, after obtaining the part-of-speech vector of the polyphonic characters in the Chinese sentence, the polyphonic characters in this text sentence are concatenated and encoded with this part-of-speech vector, and used as the encoding vector of the Chinese sentence, so that the polyphonic character disambiguation model can more fully understand the context information in the Chinese sentence based on the polyphonic characters in the Chinese sentence, the part-of-speech of this polyphonic character, and the part-of-speech of the words before and after this polyphonic character, thereby improving the prediction accuracy of the polyphonic character disambiguation model. The specific implementation method is as follows:

[0083] The determining the encoding vector of the Chinese sentence based on the polyphonic characters in the Chinese sentence and the part-of-speech vector includes:

[0084] After concatenating the polyphonic characters in the Chinese sentence with the part-of-speech vector, input them into the word embedding vector layer of the polyphonic character disambiguation model to obtain the encoded vector of the Chinese sentence.

[0085] Still taking the above as an example, the polyphonic character is "dou", and the part-of-speech vector is "r d v". Then concatenate the polyphonic characters in the Chinese sentence with the part-of-speech vector to obtain "dou r d v"; then input "dou r d v" into the word embedding vector layer of the polyphonic character disambiguation model to obtain the encoded vector of the Chinese sentence. Among them, the word embedding vector layer is the Wordembedding layer of the polyphonic character disambiguation model.

[0086] In practical applications, Chinese characters and letters cannot be directly used for calculation in the model. Therefore, after concatenating the polyphonic characters in the Chinese sentence with the part-of-speech vector, they are uniformly encoded to avoid the problem of inconsistent encoded vectors caused by separately encoding Chinese characters and letters. In the embodiments of the present application, the two encodings are combined into one, ensuring the consistency of the encoding of the same character. That is, after concatenating the polyphonic characters with the part-of-speech vector, through the Word embeddi ng layer, they are encoded into an encoded vector with consistency.

[0087] Step 208: Input the semantic context vector and the encoded vector into the polyphonic character disambiguation model to obtain the pronunciation corresponding to the polyphonic character.

[0088] Specifically, the step of inputting the semantic context vector and the encoded vector into the polyphonic character disambiguation model to obtain the pronunciation corresponding to the polyphonic character includes:

[0089] After concatenating the semantic context vector with the encoded vector, input them into the fully connected layer of the polyphonic character disambiguation model to obtain at least two pronunciations of the polyphonic character and the probability value of each pronunciation;

[0090] Take the pronunciation with the highest probability value as the pronunciation corresponding to the polyphonic character and output it through the polyphonic character disambiguation model.

[0091] In specific implementation, first concatenate the semantic context vector of the Chinese sentence with the encoded vector, and then input the concatenated vector into the fully connected layer (i.e., the Full-connect layer) of the polyphonic character disambiguation model. The fully connected layer outputs the pronunciation corresponding to the polyphonic character in the Chinese sentence and the probability value of each pronunciation. Finally, the output layer of the polyphonic character disambiguation model selects the pronunciation with the highest probability value as the pronunciation of the polyphonic character and outputs it.

[0092] In the embodiments of the present application, in the information encoding stage of a Chinese sentence containing polyphonic characters, a language model is introduced to strengthen the extraction of the context information of the sentence. The positional encoding mechanism in the language model is utilized to enhance the semantic encoding effect of the position information of the polyphonic characters, and the part-of-speech information of the words before and after the polyphonic characters in the Chinese sentence is introduced to enrich the feature combination of the Chinese sentence containing polyphonic characters input into the polyphonic character disambiguation model, so as to improve the prediction accuracy of the pronunciation of the polyphonic characters in the Chinese sentence by the polyphonic character disambiguation model in the polyphonic character disambiguation task.

[0093] In another embodiment of this specification, in order to reduce the computational consumption of the polyphonic character disambiguation model during training and actual use and improve the prediction speed of polyphonic characters, the length of the Chinese sentence containing polyphonic characters will be processed. The specific implementation method is as follows:

[0094] After determining the part-of-speech vector of the polyphonic character in the Chinese sentence, it further includes:

[0095] Determining the starting position of the previous word adjacent to the word containing the polyphonic character in the Chinese sentence; and

[0096] Determining the ending position of the next word adjacent to the word containing the polyphonic character in the Chinese sentence.

[0097] Still taking the Chinese sentence "I have been to both Beijing and Nanjing" as an example, after segmenting this Chinese sentence, it becomes six words: "Beijing / and / Nanjing / I / have / been to". Among them, the word containing the polyphonic character is "both". The previous word of "both" is "I", and the next word is "have been to". See Table 2.

[0098] Table 2

[0099]

[0100] The index value subscript of the first character in the Chinese sentence starts from 0. Therefore, referring to Table 2, the position index value of the previous word "I" of the polyphonic character "both" in "I have been to both Beijing and Nanjing" is 5, and the position index value of the next word "have been to" is 1. Therefore, it is determined that the starting position of the previous word "I" adjacent to the word containing the polyphonic character "both" in this Chinese sentence is 5; it is determined that the ending position of the next word "have been to" adjacent to the word containing the polyphonic character "both" in the Chinese sentence is 8.

[0101] In the embodiments of the present application, by calculating the starting position of the previous word of the word containing the polyphonic character in the original sentence and the ending position of the next word in the original sentence, subsequent processing of the original sentence can be performed based on this starting position and ending position to save the length of the original sentence and improve the prediction speed of the polyphonic character disambiguation model.

[0102] In addition, the step of determining the part of speech of a subsequent word adjacent to the word containing the polyphonetic character after the end position in the Chinese sentence further includes:

[0103] The semantic context vector of the Chinese sentence is processed based on the starting position and the ending position to obtain a target semantic context vector of the Chinese sentence.

[0104] Specifically, the semantic context vector of the Chinese sentence is processed based on the starting position and the ending position, which can be understood as intercepting the semantic context vector of the Chinese sentence based on the starting position and the ending position to obtain the target semantic context vector of the Chinese sentence, so that the overall length of the target semantic context vector of the Chinese sentence is shorter, which greatly increases the prediction speed of the polyphone disambiguation model.

[0105] In practical applications, the semantic context vector of a Chinese sentence is of the same length as the original length of the Chinese sentence. By truncating the semantic context vector of the Chinese sentence based on the starting position and the ending position, the overall length of the semantic context vector of the Chinese sentence can be shortened while ensuring the integrity of the extraction of the head and tail information of the target semantic context vector.

[0106] In the embodiment of the present application, the semantic context vector output by the BLSTM layer is a semantic and context information vector obtained based on the overall input sentence. If the overall length is too large, it will increase the computational consumption of the training and reasoning process of the polyphone disambiguation model and reduce the speed. In the polyphone disambiguation task, the information near the position of the polyphone is more important. Therefore, the starting position of the previous word of the required polyphone and the ending position of the next word can be calculated first, hoping to retain the semantic information near the polyphone as much as possible, and delete the semantic information far from the polyphone, so as to reduce the computational consumption of the training and reasoning process of the polyphone disambiguation model and increase the speed.

[0107] Similarly, after obtaining the target semantic context vector, after determining the encoding vector of the Chinese sentence, the method further includes:

[0108] The target semantic context vector and the encoding vector are input into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone.

[0109] Specifically, the step of inputting the target semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone includes:

[0110] The target semantic context vector is concatenated with the encoding vector and then input into the fully connected layer of the polyphonetic character disambiguation model to obtain at least two pronunciations of the polyphonetic character and a probability value of each pronunciation;

[0111] The pronunciation with the highest probability value is used as the pronunciation corresponding to the polyphonic character and output through the polyphonic character disambiguation model.

[0112] In specific implementation, first, the target semantic context vector of the Chinese sentence is concatenated with the encoding vector, and then the concatenated vector is input into the fully connected layer (i.e., the Full-connect layer) of the polyphonic character disambiguation model. The fully connected layer outputs the pronunciation corresponding to the polyphonic character in the Chinese sentence and the probability value of each pronunciation. Finally, the output layer of the polyphonic character disambiguation model selects the pronunciation with the highest probability value as the pronunciation of the polyphonic character and outputs it.

[0113] In the embodiment of the present application, the polyphonic character processing method introduces a language model in the information encoding stage of the Chinese sentence containing polyphonic characters to strengthen the extraction of the context information of the sentence. Using the positional encoding mechanism in the language model, the semantic encoding effect of the polyphonic character position information is enhanced, and the part-of-speech information of the words before and after the polyphonic character in the Chinese sentence is introduced to enrich the feature combination of the Chinese sentence containing the polyphonic character input into the polyphonic character disambiguation model, so as to improve the prediction accuracy of the pronunciation of the polyphonic character in the Chinese sentence by the polyphonic character disambiguation model in the polyphonic character disambiguation task. And based on the start position of the word before the required polyphonic character and the end position of the word after it, the length of the Chinese sentence is shortened to reduce the computational consumption in the training and inference processes of the polyphonic character disambiguation model and improve the speed.

[0114] See Figure 3 , Figure 3 shows a flowchart of processing the sentence "I have been to both Beijing and Nanjing" as a Chinese sentence containing polyphonic characters in a polyphonic character processing method provided by an embodiment of the present application, which specifically includes the following steps.

[0115] Step 302: Input a Chinese sentence containing polyphonic characters.

[0116] Specifically, the Chinese sentence containing polyphonic characters is: "I have been to both Beijing and Nanjing", where the polyphonic character is "both".

[0117] In specific implementation, "I have been to both Beijing and Nanjing" is used as the input of the polyphonic character disambiguation model, and the corresponding pronunciation of the polyphonic character "both" is output based on the polyphonic character disambiguation model.

[0118] Step 304: Input the Chinese sentence containing polyphonic characters into the BERT model to obtain vector A.

[0119] Specifically, "I have been to both Beijing and Nanjing" is used as the input of the BERT model to preliminarily extract the semantic information of the whole sentence and obtain the output vector A.

[0120] Step 306: Input vector A into the BLSTM layer to obtain vector B.

[0121] Specifically, the word vector A is used as the input of the BLSTM layer to further extract context information and obtain vector B.

[0122] Step 308: By querying the polyphonic character dictionary, extract the polyphonic characters in the Chinese sentence containing polyphonic characters.

[0123] Specifically, use the custom polyphonic character dictionary to query and extract the polyphonic character "dou" in the Chinese sentence "I have been to both Beijing and Nanjing".

[0124] Step 310: Segment the Chinese sentence containing polyphonic characters and perform part-of-speech tagging.

[0125] Specifically, use the word segmentation tool to segment the Chinese sentence "I have been to both Beijing and Nanjing" into individual words, and perform part-of-speech tagging on each word formed after segmentation. For example, after segmenting and performing part-of-speech tagging on "I have been to both Beijing and Nanjing", "Beijing loc / and c / Nanjing loc / I r / dou d / have been to v" can be obtained.

[0126] Step 312: Extract the part-of-speech vectors and position index values of the word before and after the polyphonic character word after segmentation.

[0127] Specifically, extract the part-of-speech vectors of the word "I" before the polyphonic character word "dou" and the word "have been to" after it, as well as the starting position 5 of the word "I" before and the ending position 8 of the word "have been to" after.

[0128] Step 314: Concatenate the polyphonic characters in the Chinese sentence with the part-of-speech vectors of the word before and after the polyphonic character word after segmentation and input them into the word embedding vector layer to obtain the encoded vector C of this Chinese sentence.

[0129] Specifically, input "dou r d v" into the Word embedding layer to obtain the encoded vector C of this Chinese sentence.

[0130] Step 316: Intercept vector B based on the starting position and ending position to obtain vector D.

[0131] Step 318: Concatenate vector D and vector C and use them as the input of the fully connected layer Full-connect layer.

[0132] Step 320: The fully connected layer Full-connect layer outputs the pronunciation with the highest probability as the pronunciation of the polyphonic character in this Chinese sentence.

[0133] In the embodiment of the present application, the polyphone processing method introduces a language model in the information encoding stage of the Chinese sentence containing polyphones, strengthens the extraction of the context information of the sentence, utilizes the positional encoding mechanism in the language model, enhances the semantic encoding effect of the polyphone position information, and introduces the part-of-speech information of the words before and after the polyphones in the Chinese sentence, enriches the feature combination of the Chinese sentence containing polyphones input into the polyphone disambiguation model, so as to improve the prediction accuracy of the polyphone disambiguation model for the pronunciation of the polyphones in the Chinese sentence in the polyphone disambiguation task. And based on the starting position of the previous word and the ending position of the next word of the required polyphone, the length of the Chinese sentence is shortened to reduce the computational consumption of the training and reasoning process of the polyphone disambiguation model and improve the speed.

[0134] Corresponding to the above method embodiment, the present application also provides a polyphonetic character processing device embodiment, Figure 4 FIG. 1 is a schematic diagram showing the structure of a polyphonetic character processing device provided by an embodiment of the present application. Figure 4 As shown, the device comprises:

[0135] A first vector obtaining module 402 is configured as a bidirectional long short-term memory network based on a language model and a polyphone disambiguation model to obtain a semantic context vector of a Chinese sentence containing polyphones;

[0136] A second vector obtaining module 404 is configured to perform word segmentation on the Chinese sentence, and determine the part-of-speech vector of the polyphone in the Chinese sentence based on the words obtained by word segmentation and the part-of-speech of the words;

[0137] A third vector obtaining module 406 is configured to determine a coding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector;

[0138] The pronunciation acquisition module 408 is configured to input the semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone.

[0139] Optionally, the first vector obtaining module 402 is further configured to:

[0140] Inputting a Chinese sentence containing polyphonetic characters into a language model to obtain a semantic vector of the Chinese sentence;

[0141] The semantic vector is input into a bidirectional long short-term memory network of a polyphone disambiguation model to obtain a semantic context vector of the Chinese sentence.

[0142] Optionally, the second vector obtaining module 404 is further configured to:

[0143] The Chinese sentences after filtering the numbers are segmented through the preset segmentation tool, and the parts of speech are tagged for the segmented words.

[0144] Optionally, the second vector obtaining module 404 is further configured to:

[0145] Obtaining words after word segmentation of the Chinese sentence, and determining the part of speech of each word;

[0146] Determine a polyphone in the Chinese sentence based on a polyphone dictionary, and determine a word containing the polyphone, a word immediately preceding the word containing the polyphone, and a word immediately following the word containing the polyphone;

[0147] The part-of-speech vector of the polyphone in the Chinese sentence is determined based on the part-of-speech of the word containing the polyphone, the part-of-speech of the previous word adjacent to the word containing the polyphone, and the part-of-speech of the next word adjacent to the word containing the polyphone.

[0148] Optionally, the third vector obtaining module 406 is further configured to:

[0149] The polyphones in the Chinese sentence are concatenated with the part-of-speech vectors and input into the word embedding vector layer of the polyphone disambiguation model to obtain the encoding vector of the Chinese sentence.

[0150] Optionally, the pronunciation acquisition module 408 is further configured to:

[0151] The semantic context vector is concatenated with the encoding vector and then inputted into the fully connected layer of the polyphonetic character disambiguation model to obtain at least two pronunciations of the polyphonetic character and a probability value of each pronunciation;

[0152] The pronunciation with the highest probability value is used as the pronunciation corresponding to the polyphonetic character and output through the polyphonetic character disambiguation model.

[0153] Optionally, the device further comprises:

[0154] The location determination module is configured as follows:

[0155] Determine the starting position of the previous word adjacent to the word containing the polyphonetic character in the Chinese sentence; and

[0156] Determine the end position of a subsequent word adjacent to the word containing the polyphonetic character in the Chinese sentence.

[0157] Optionally, the device further comprises:

[0158] The vector processing module is configured as follows:

[0159] The semantic context vector of the Chinese sentence is processed based on the starting position and the ending position to obtain a target semantic context vector of the Chinese sentence.

[0160] Optionally, the device further comprises:

[0161] The pronunciation determination module is configured as follows:

[0162] The target semantic context vector and the encoding vector are input into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone.

[0163] Optionally, the pronunciation determination module is configured to:

[0164] The target semantic context vector is concatenated with the encoding vector and then input into the fully connected layer of the polyphonetic character disambiguation model to obtain at least two pronunciations of the polyphonetic character and a probability value of each pronunciation;

[0165] The pronunciation with the highest probability value is used as the pronunciation corresponding to the polyphonetic character and output through the polyphonetic character disambiguation model.

[0166] In an embodiment of the present application, the polyphone processing device introduces a language model and a bidirectional long short-term memory network in the information encoding stage of a Chinese sentence containing polyphones, strengthens the extraction of semantic information and contextual information of the Chinese sentence, and utilizes the positional encoding mechanism in the language model to enhance the semantic encoding effect of the position information of the polyphones in the Chinese sentence; at the same time, the part-of-speech information of the words before and after the polyphones in the Chinese sentence is introduced to enrich the semantic feature combination of the Chinese sentence containing polyphones that is input into the polyphone disambiguation model, so as to improve the prediction accuracy of the polyphone disambiguation model for the pronunciation of the polyphones in the Chinese sentence in the polyphone disambiguation task.

[0167] The above is a schematic scheme of a polyphonetic character processing device of this embodiment. It should be noted that the technical scheme of the polyphonetic character processing device and the technical scheme of the polyphonetic character processing method described above are of the same concept, and the details of the technical scheme of the polyphonetic character processing device that are not described in detail can all be referred to the description of the technical scheme of the polyphonetic character processing method described above.

[0168] It should be noted that the components in the device claim should be understood as the functional modules that must be established to implement the steps of the program flow or the steps of the method, and the functional modules are not actually divided or separated. The device claim defined by such a group of functional modules should be understood as the functional module architecture of the solution mainly implemented by the computer program recorded in the specification, and should not be understood as the physical device that mainly implements the solution by hardware.

[0169] An embodiment of the present application further provides a computing device, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the steps of the polyphonetic character processing method.

[0170] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the polyphonetic character processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the polyphonetic character processing method described above.

[0171] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which implement the steps of the polyphonetic character processing method when executed by a processor.

[0172] The above is a schematic scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical scheme of the computer-readable storage medium and the technical scheme of the polyphonetic character processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer-readable storage medium can be found in the description of the technical scheme of the polyphonetic character processing method described above.

[0173] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0174] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0175] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0176] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0177] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for processing polyphones, characterized in that: include: Based on a language model and a bidirectional long short-term memory network of a polyphone disambiguation model, a semantic context vector of a Chinese sentence containing polyphones is obtained, wherein the language model is used to obtain a semantic vector of the Chinese sentence, and the semantic vector is a semantic vector that enhances the position information of the polyphones in the Chinese sentence through a position encoding mechanism of the language model, and the bidirectional long short-term memory network is used to extract context information of the Chinese sentence based on the semantic vector to obtain the semantic context vector of the Chinese sentence; Segmenting the Chinese sentence, and determining the part-of-speech vector of the polyphone in the Chinese sentence based on the words obtained by the segmentation and the parts-of-speech of the words, wherein the part-of-speech vector of the polyphone in the Chinese sentence is determined according to the part-of-speech of the word containing the polyphone in the words obtained by the segmentation, the part-of-speech of the previous word adjacent to the word containing the polyphone, and the part-of-speech of the next word adjacent to the word containing the polyphone; Determining an encoding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector; The target semantic context vector and the encoding vector are input into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone, wherein the target semantic context vector is determined by processing the semantic context vector according to the starting position of the previous word adjacent to the word containing the polyphone obtained by word segmentation, and the ending position of the next word, the starting position of the previous word is the starting position of the previous word in the Chinese sentence, and the ending position of the next word is the ending position of the next word in the Chinese sentence.

2. The polyphonetic character processing method according to claim 1, characterized in that: The bidirectional long short-term memory network based on the language model and the polyphone disambiguation model obtains the semantic context vector of the Chinese sentence containing polyphones, including: Inputting a Chinese sentence containing polyphonetic characters into a language model to obtain a semantic vector of the Chinese sentence; The semantic vector is input into a bidirectional long short-term memory network of a polyphone disambiguation model to obtain a semantic context vector of the Chinese sentence.

3. The polyphonetic character processing method according to claim 1, characterized in that: The word segmentation of the Chinese sentence includes: The Chinese sentences after filtering the numbers are segmented through the preset segmentation tool, and the parts of speech are tagged for the segmented words.

4. The polyphone processing method according to claim 3, characterized in that: The determining of the part-of-speech vector of the polyphonetic character in the Chinese sentence based on the words obtained by word segmentation and the part-of-speech of the words includes: Obtaining words after word segmentation of the Chinese sentence, and determining the part of speech of each word; Determine a polyphone in the Chinese sentence based on a polyphone dictionary, and determine a word containing the polyphone, a word immediately preceding the word containing the polyphone, and a word immediately following the word containing the polyphone; The part-of-speech vector of the polyphone in the Chinese sentence is determined based on the part-of-speech of the word containing the polyphone, the part-of-speech of the previous word adjacent to the word containing the polyphone, and the part-of-speech of the next word adjacent to the word containing the polyphone.

5. The method for processing polyphones according to any one of claims 1 to 4, characterized in that: The step of determining the encoding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector comprises: The polyphones in the Chinese sentence are concatenated with the part-of-speech vectors and input into the word embedding vector layer of the polyphone disambiguation model to obtain the encoding vector of the Chinese sentence.

6. The polyphonetic character processing method according to claim 1, characterized in that: The step of inputting the target semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone includes: The target semantic context vector is concatenated with the encoding vector and then input into the fully connected layer of the polyphonetic character disambiguation model to obtain at least two pronunciations of the polyphonetic character and a probability value of each pronunciation; The pronunciation with the highest probability value is used as the pronunciation corresponding to the polyphonetic character and is output through the polyphonetic character disambiguation model.

7. A polyphonetic character processing device, characterized in that: include: A first vector acquisition module is configured as a bidirectional long short-term memory network based on a language model and a polyphone disambiguation model to obtain a semantic context vector of a Chinese sentence containing polyphones, wherein the language model is used to obtain a semantic vector of the Chinese sentence, and the semantic vector is a semantic vector that enhances the position information of the polyphones in the Chinese sentence through a position encoding mechanism of the language model, and the bidirectional long short-term memory network is used to extract context information of the Chinese sentence based on the semantic vector to obtain the semantic context vector of the Chinese sentence; A second vector obtaining module is configured to perform word segmentation on the Chinese sentence, and determine the part-of-speech vector of the polyphone in the Chinese sentence based on the words obtained by the word segmentation and the part-of-speech of the words, wherein the part-of-speech vector of the polyphone in the Chinese sentence is determined according to the part-of-speech of the word containing the polyphone in the words obtained by the word segmentation, the part-of-speech of the previous word adjacent to the word containing the polyphone, and the part-of-speech of the next word adjacent to the word containing the polyphone; A third vector acquisition module is configured to determine the encoding vector of the Chinese sentence based on the polyphonetic characters in the Chinese sentence and the part-of-speech vector; The pronunciation acquisition module is configured to input the target semantic context vector and the encoding vector into the polyphone disambiguation model to obtain the pronunciation corresponding to the polyphone, wherein the target semantic context vector is determined by processing the semantic context vector according to the starting position of the previous word adjacent to the word containing the polyphone after word segmentation, and the ending position of the next word, the starting position of the previous word is the starting position of the previous word in the Chinese sentence, and the ending position of the next word is the ending position of the next word in the Chinese sentence.

8. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer instructions, the steps of the polyphone processing method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instruction is executed by a processor, the steps of the polyphone processing method described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Polyphone pronunciation discriminating method and device based on deep neural network

    CN107729313A

  • Method and device for determining pronunciation of polyphonic characters

    CN110277085A

  • Speech synthesis method and device, electronic equipment and storage medium

    CN110782870A

  • Polyphone pronunciation disambiguation device and polyphone pronunciation disambiguation method

    CN111611810A

  • Polyphone processing method and device and model training method and device

    CN111967260A