Polyphonetic character disambiguation method, electronic device and computer-readable storage medium

By extracting the semantic features of the target text and matching text and using sequential neural networks, the problem of small sample polyphonic word disambiguation is solved, the pronunciation of polyphonic words is determined in the case of data scarcity, and the accuracy of speech synthesis is improved.

CN113486672BActive Publication Date: 2024-10-22TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202110852173.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-10-22
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

The existing technology requires a large amount of polyphone annotated text and expensive corpus collection during the polyphone disambiguation process, making it difficult to implement polyphone disambiguation suitable for small samples.

Method used

By obtaining the semantic features of the target polyphone in the target text and the matching semantic features in the matching texts with different pronunciations, and using the temporal neural network to compare the similarity of the semantic features, the pronunciation of the polyphone in the target text is determined without the need for a large amount of training data.

Benefits of technology

It achieves effective multi-phonetic character disambiguation under small sample data, improves the accuracy of determining the pronunciation of polyphonic characters, and reduces data requirements and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113486672B_ABST
    Figure CN113486672B_ABST
Patent Text Reader

Abstract

The present application discloses a polyphone disambiguation method, an electronic device, and a computer-readable storage medium, the method comprising: obtaining a target text, determining a target polyphone in the target text, and extracting a target semantic feature of the target polyphone in the target text; obtaining multiple matching texts containing the target polyphone, and extracting matching semantic features of the target polyphone in the matching text; wherein the matching text at least includes texts corresponding to the target polyphone with different pronunciations; inputting the target semantic feature and multiple matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and multiple matching hidden layer representations corresponding to the multiple matching semantic features; determining the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and the multiple matching hidden layer representations. The polyphone disambiguation method provided by the present application realizes polyphone disambiguation suitable for small samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of speech synthesis, and more specifically, to a polyphone disambiguation method, an electronic device, and a computer-readable storage medium. Background Art

[0002] As we all know, there are a certain number of polyphones in modern Chinese, which have different pronunciations in different contexts. In order to accurately mark the pronunciation of Chinese characters, polyphones need to be disambiguated during speech synthesis.

[0003] In the related art, polyphone disambiguation is performed based on statistical machine learning, and polyphone disambiguation is regarded as a classification problem in machine learning. First, a large amount of text corpus containing polyphone pinyin annotations is collected, and then the context information of the polyphone is extracted using a machine learning algorithm, and finally the pronunciation of the polyphone is determined based on this information. This method requires a large amount of polyphone annotated text, but the public data available in the industry is very scarce, and the cost of collecting a considerable amount of text corpus is also very expensive.

[0004] Therefore, how to achieve polyphone disambiguation applicable to small samples is a technical problem that technicians in this field need to solve. Summary of the invention

[0005] The purpose of the present application is to provide a polyphone disambiguation method, an electronic device and a computer-readable storage medium, which realize polyphone disambiguation suitable for small samples.

[0006] To achieve the above objectives, the present application provides a polyphonetic character disambiguation method in a first aspect, comprising:

[0007] Acquire a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text;

[0008] Acquire multiple matching texts containing the target polyphone, and extract matching semantic features of the target polyphone in the matching texts; wherein the matching texts at least include texts corresponding to the target polyphone with different pronunciations;

[0009] Inputting the target semantic feature and the plurality of matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and a plurality of matching hidden layer representations corresponding to the plurality of matching semantic features;

[0010] The pronunciation of the target polyphonetic character in the target text is determined based on the similarity between the target latent layer representation and the plurality of matching latent layer representations.

[0011] To achieve the above-mentioned purpose, the second aspect of the present application provides an electronic device, including:

[0012] Memory for storing computer programs;

[0013] A processor is used to implement the steps of the polyphone disambiguation method as described above when executing the computer program.

[0014] To achieve the above-mentioned purpose, the third aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the polyphone disambiguation method as described above are implemented.

[0015] It can be seen from the above scheme that a polyphone disambiguation method provided by the present application includes: obtaining a target text, determining a target polyphone in the target text, and extracting a target semantic feature of the target polyphone in the target text; obtaining multiple matching texts containing the target polyphone, and extracting matching semantic features of the target polyphone in the matching text; wherein the matching text at least includes texts corresponding to the target polyphone with different pronunciations; inputting the target semantic feature and multiple matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and multiple matching hidden layer representations corresponding to multiple matching semantic features; determining the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and the multiple matching hidden layer representations.

[0016] The polyphone disambiguation method provided by the present application extracts the target semantic features of the target polyphone in the target text, and at the same time extracts the semantic features presented by the target polyphone under different pronunciations, i.e., matching semantic features, and uses a temporal neural network to compare the target semantic features with multiple matching semantic features, and uses the degree of proximity of the semantic features as a criterion for similar pronunciations to select the most likely pronunciation of the target polyphone in the target text. The present application does not require a large amount of training data, but only requires matching texts containing target polyphones with different pronunciations. In the case of a shortage of polyphone annotation data, the disambiguation of polyphones can still be achieved. The present application also discloses an electronic device and a computer-readable storage medium, which can also achieve the above-mentioned technical effects.

[0017] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific implementation methods, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0019] Figure 1 An architecture diagram of a polyphonetic character disambiguation system provided in an embodiment of the present application;

[0020] Figure 2 A flowchart of another polyphone disambiguation method provided in an embodiment of the present application;

[0021] Figure 3 A flowchart of another polyphone disambiguation method provided in an embodiment of the present application;

[0022] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The embodiment of the present application discloses a polyphone disambiguation method, which realizes polyphone disambiguation applicable to a small sample.

[0025] See also Figure 1 , a flow chart of a polyphone disambiguation method provided in an embodiment of the present application, such as Figure 1 As shown, including:

[0026] S101: Acquire a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text;

[0027] The input of this embodiment is a target text containing a target polyphone, and the purpose is to determine the correct pronunciation of the target polyphone in the context of the target text. In this step, the target semantic features of the target polyphone in the target text are extracted so that the subsequent steps can determine the pronunciation of the target polyphone in the target text based on the target semantic features.

[0028] As a feasible implementation manner, extracting the target semantic feature of the target polyphonic character in the target text includes: encoding the target text at the character level to obtain encoding information; inputting the encoding information into a neural network model to obtain a feature vector sequence of the same length as the target text; using the feature vector corresponding to the target polyphonic character in the feature vector sequence as the target semantic feature of the target polyphonic character in the target text. In a specific implementation, first, the target text is encoded at the character level to obtain encoding information. Here, the character-level encoding may include One-hot encoding, randomly initialized vector representations, etc., which are not specifically limited herein. Then, the encoding information is input into a neural network model that supports character-level feature output to obtain a feature vector sequence of the same length as the number of characters in the target text. The neural network model here may include an LSTM (Long short-term memory) network, a BERT (Bidirectional Encoder Representations from Transformers) network pre-trained with a large-scale corpus, etc., which are not specifically limited herein. Finally, the feature vector corresponding to the target polyphonic character in the feature vector sequence is selected as the target semantic feature of the target polyphonic character in the target text. Taking the target text "The last two players will enter the relegation zone" as an example, it includes a total of 10 Chinese characters. After character-level encoding, the encoding information [c_1, c_2, …, c_10] is obtained. After calculation by the neural network model, the hidden layer representations at all time points, that is, the feature vector sequence, is [h_1, h_2, …, h_10]. Since the polyphonic character "will" is located at the 5th position in the target text, h_5 is selected as the semantic feature of the polyphonic character "will" in the target text.

[0029] It should be noted that during the extraction process of the target semantic feature, in addition to inputting the original target text into the neural network model, more abundant auxiliary information, such as the word segmentation annotation and part-of-speech annotation results of the target text, can also be input into the neural network model simultaneously, so as to obtain more abundant context information, that is, to enrich the semantic feature extraction result.

[0030] S102: Obtain multiple matching texts containing the target polyphonic character, and extract the matching semantic features of the target polyphonic character in the matching texts; wherein, the matching texts at least include texts corresponding to the target polyphonic character with different pronunciations;

[0031] In this step, multiple matching texts containing the target polyphone are obtained as matching objects, and the target polyphone presents different pronunciations in the matching text, that is, the matching text is used to present the contextual contexts in which the different pronunciations of the target polyphone are located. It should be noted that the matching text can be derived from the training data set of the temporal neural network in the subsequent steps, or a text selected manually with obvious semantic distinction of polyphones can be used, which is not specifically limited in this embodiment. Taking the target text "the last two will enter the demotion zone" as an example, the word "will" is the target polyphone, so it is necessary to obtain matching texts containing the word "will" with different pronunciations, such as "keep the grilled fish in rice" and "PLA generals". Further, the matching semantic features of the target polyphone in each matching text are extracted to represent the different contextual modes in which different pronunciations are located. The specific extraction method is similar to the target semantic feature extraction method introduced in the previous step, which will not be repeated here.

[0032] S103: inputting the target semantic feature and the plurality of matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and a plurality of matching hidden layer representations corresponding to the plurality of matching semantic features;

[0033] S104: Determine the pronunciation of the target polyphonetic character in the target text based on the similarity between the target hidden layer representation and the plurality of matching hidden layer representations.

[0034] This embodiment uses a time-series neural network to compare the target semantic features with multiple matching semantic features, uses the degree of proximity of the semantic features as a criterion for similar pronunciation, and selects the most likely pronunciation of the target polyphone in the target text. The time-series neural network supports models in which multiple features are input sequentially. The sequential input can be regarded as inputting features to the network in sequence at different time points, such as LSTM, GRU (Gated recurrent unit), etc., which are not specifically limited here.

[0035] It is understandable that in order to enable the temporal neural network to compare the semantic features of the target polyphone in different contexts, it is necessary to use the training text and matching text containing the target polyphone to train the temporal neural network. The training process of the temporal neural network includes the following steps: obtaining the training text containing the target polyphone, and extracting the training semantic features of the target polyphone in the training text; obtaining multiple matching texts containing the target polyphone, and extracting the matching semantic features of the target polyphone in the matching text; wherein the matching text at least includes the text corresponding to the target polyphone with different pronunciations; training the temporal neural network based on the standard pronunciation of the target polyphone in the training text, the training semantic features and the multiple matching semantic features to obtain the trained temporal neural network. In a specific implementation, the semantic features of the training text and the multiple matching texts are extracted respectively, wherein the matching text needs to include the target matching text corresponding to the standard pronunciation of the target polyphone in the training text, that is, the pronunciation of the target polyphone in the target matching text is the same as its pronunciation in the training text, and both are the above-mentioned standard pronunciation. The training semantic features corresponding to the training text and the matching semantic features corresponding to the multiple matching texts are input into the temporal neural network to obtain the training hidden layer representation corresponding to the training semantic features and the matching hidden layer representation corresponding to the multiple semantic features. The similarity between the training hidden layer representation and the multiple matching hidden layer representations is calculated, and the parameters of the temporal neural network are adjusted accordingly. The adjustment goal is to maximize the similarity between the training hidden layer representation and the target matching hidden layer representation. The target matching hidden layer representation is the hidden layer representation obtained after the semantic features corresponding to the above target matching text are passed through the temporal neural network. The trained temporal neural network is used to analyze the multiple input semantic features, calculate which matching semantic feature the target semantic feature is more similar to, and then determine the more likely pronunciation of the target polyphone in the target text.

[0036] When determining the pronunciation of the target polyphone in the target text, first, the target semantic features of the target polyphone in the target text and its matching semantic features in multiple matching texts are input into the trained temporal neural network to obtain the target hidden layer representation corresponding to the target semantic features and the target hidden layer representation corresponding to the multiple matching semantic features. For example, the target semantic feature corresponding to the target polyphone in the target text T_target is H_target, and the matching semantic features corresponding to the target polyphone in the matching texts T_1 and T_2 are H_1 and H_2, respectively, which are input into the temporal neural network in the form of [H_1, H_2, H_target] in time sequence, thereby obtaining the hidden layer representation [X_1, X_2, X_target]. Secondly, the target hidden layer representation is compared with the matching hidden layer representation, that is, the similarity between the target hidden layer representation and the multiple matching hidden layer representations is calculated, and it is determined which matching semantic feature the target semantic feature is more similar to, and then the more likely pronunciation of the target polyphone in the target text is determined. As a feasible implementation, the calculation of the similarity between the target hidden layer representation and the multiple matching hidden layer representations includes: calculating the cosine distance between the target hidden layer representation and the multiple matching hidden layer representations, and using the cosine distance as the similarity between the target hidden layer representation and the multiple matching hidden layer representations. In the above example, if CosineDistance(X_target,X_1)>CosineDistance(X_target,X_2), it is considered that the pronunciation of the target polyphone in the target text is more likely to be its pronunciation in T_1, and conversely, if CosineDistance(X_target,X_1)<CosineDistance(X_target,X_2), it is considered that the pronunciation of the target polyphone in the target text is more likely to be its pronunciation in T_2. Furthermore, the pronunciation of the target polyphone in the target text can be determined through multiple comparisons, that is, the determination of the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and multiple matching hidden layer representations includes: calculating the similarity between the target hidden layer representation and multiple matching hidden layer representations, and determining the target matching hidden layer representation with the greatest similarity to the target hidden layer representation; determining the pronunciation of the target polyphone in the matching text corresponding to the target matching hidden layer representation as the pronunciation of the target polyphone in the target text. In a specific implementation, if the semantic features of the target polyphone in the target text are very similar to the semantics of the target polyphone in a matching text, it can be considered that the target polyphone in the target text has the same pronunciation as the target polyphone in the matching text.

[0037] As a preferred embodiment, after calculating the similarity between the target hidden layer representation and the multiple matching hidden layer representations, it also includes: determining the weight coefficient corresponding to each matching text, and adjusting the similarity between the corresponding matching hidden layer representation and the target hidden layer representation based on the weight coefficient corresponding to the matching text; accordingly, the determination of the target matching hidden layer representation with the greatest similarity to the target hidden layer representation includes: determining the target matching hidden layer representation with the greatest similarity after adjustment to the target hidden layer representation. In a specific implementation, the corresponding similarity can be adjusted according to the weight coefficient corresponding to each matching text, for example, a higher weight coefficient is assigned to the matching text with a very certain pronunciation, so as to improve the accuracy of determining the pronunciation of the target polyphone. Preferably, the matching text includes an error case text, and the weight coefficient corresponding to the error case text is greater than the weight coefficient corresponding to other matching texts. For some error cases that are difficult to solve, the text corresponding to the error case, or the phrases and phrases in the text that are highly associated with the polyphone, can be directly added to the matching text, and given a higher weight coefficient, so that these error cases can be processed preferentially.

[0038] It should be noted that, during the training phase of the temporal neural network, the training semantic features corresponding to the training text can be used as the input of the last time point of the temporal neural network to ensure the feature integrity of the target polyphone of the temporal neural network as much as possible and prevent its information from being forgotten by the model. Correspondingly, during the use phase of the temporal neural network, the target semantic features corresponding to the target text can also be used as the input of the last time point of the temporal neural network. In this process, the accuracy of determining the pronunciation of the target polyphone can be improved by increasing the number of matching texts and the number of comparisons.

[0039] Since the function realized by the time series neural network during the training process is to compare the similarities and differences of the semantic features of the target polyphone in the training text and the target polyphone in the matching text, and select the pronunciation of the polyphone with the most similar semantic features in the matching text as the final result, the time series neural network does not need to memorize and recognize the various pronunciation modes of the target polyphone through a large amount of data, but only needs to learn to select one with more similar contextual semantics among multiple matching texts. Based on this, when the time series neural network has been trained, for polyphones that have not appeared in the training data set, a few matching texts with different pronunciations of the polyphone can be manually added to achieve the disambiguation of the polyphone. It can be seen that the present embodiment realizes the expansion of polyphones suitable for small samples.

[0040] The polyphone disambiguation method provided in the embodiment of the present application extracts the target semantic features of the target polyphone in the target text, and at the same time extracts the semantic features presented by the target polyphone under different pronunciations, i.e., matching semantic features, and uses a temporal neural network to compare the target semantic features with multiple matching semantic features, and uses the degree of proximity of the semantic features as a criterion for similar pronunciations to select the most likely pronunciation of the target polyphone in the target text. The embodiment of the present application does not require a large amount of training data, but only requires matching texts containing target polyphones with different pronunciations. In the case of a shortage of polyphone annotation data, the disambiguation of polyphones can still be achieved.

[0041] The embodiment of the present application discloses a method for disambiguating polyphones. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically:

[0042] See also Figure 2 , a flowchart of another polyphone disambiguation method provided in an embodiment of the present application, such as Figure 2 As shown, including:

[0043] S201: Acquire a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text;

[0044] S202: Obtain a candidate matching text set corresponding to the target polyphone; wherein the matching text set at least includes matching texts corresponding to the target polyphone with different pronunciations;

[0045] S203: Determine the first matching text in the candidate matching text set as the first matching text, and determine the second matching text in the candidate matching text set as the second matching text;

[0046] S204: extracting a first matching semantic feature of the target polyphone in the first matching text and a second matching semantic feature of the target polyphone in the second matching text;

[0047] S205: inputting the target semantic feature, the first matching semantic feature, and the second matching semantic feature into the trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature, a first matching hidden layer representation corresponding to the first matching semantic feature, and a second matching hidden layer representation corresponding to the second matching semantic feature;

[0048] S206: Calculate a first similarity between the target hidden layer representation and the first matching semantic feature and a second similarity between the target hidden layer representation and the first matching semantic feature;

[0049] S207: Determine the matching text corresponding to the larger one of the first similarity and the second similarity as the target matching text;

[0050] In this embodiment, the temporal neural network can only compare the matching semantic features of the target polyphone in the two matching texts to see which one is closer to the target semantic features of the target polyphone in the target text, and then determine which one of the pronunciations of the target polyphone in the two matching texts is closer to the pronunciation of the target polyphone in the target text.

[0051] S208: Determine whether the second matching text is the last matching text in the candidate matching text set; if not, proceed to S209; if yes, proceed to S210;

[0052] S209: determining the target matching text as a new first matching text, determining the next matching text of the second matching text as a new second matching text, and re-entering S204;

[0053] S210: Determine the pronunciation of the target polyphonetic character in the target matching text as the pronunciation of the target polyphonetic character in the target text.

[0054] In a specific implementation, if the target polyphone has more than two pronunciations, it is necessary to add the matching texts corresponding to the target polyphone with different pronunciations to the candidate matching text set at the same time, and repeat steps S204-S207 to determine the matching semantic features that are most similar to the semantic features of the target polyphone in the target text, and then determine the most likely pronunciation of the target polyphone in the target text.

[0055] The embodiment of the present application discloses a method for disambiguating polyphones. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically:

[0056] See also Figure 3 , a flowchart of another polyphone disambiguation method provided in an embodiment of the present application, such as Figure 3 As shown, including:

[0057] S301: Acquire a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text;

[0058] S302: Acquire matching texts corresponding to each pronunciation of the target polyphonetic character, and extract matching semantic features of the target polyphonetic character in each matching text;

[0059] S303: inputting the target semantic feature and the plurality of matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and a plurality of matching hidden layer representations corresponding to the plurality of matching semantic features;

[0060] S304: Calculate the similarity between the target hidden layer representation and the plurality of matching hidden layer representations, and determine the target matching hidden layer representation having the greatest similarity to the target hidden layer representation;

[0061] S305: Determine the pronunciation of the target polyphonetic character in the matching text corresponding to the target matching hidden layer representation as the pronunciation of the target polyphonetic character in the target text.

[0062] In this embodiment, the temporal neural network can simultaneously compare the matching semantic features of the target polyphone in two matching texts with the target semantic features of the target polyphone in the target text, that is, the target semantic features and the matching semantic features of the target polyphone in the matching text corresponding to each pronunciation are simultaneously input into the temporal neural network, and the matching semantic features that are most similar to the semantic features of the target polyphone in the target text can be obtained by inputting them in sequence, and then the most likely pronunciation of the target polyphone in the target text is determined, thereby improving the efficiency of polyphone disambiguation.

[0063] A polyphonetic character disambiguation device provided in an embodiment of the present application is introduced below. The polyphonetic character disambiguation device described below and the polyphonetic character disambiguation method described above can refer to each other, and specifically may include:

[0064] A first extraction module is used to obtain a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text;

[0065] A second extraction module is used to obtain a plurality of matching texts containing the target polyphone, and extract matching semantic features of the target polyphone in the matching texts; wherein the matching texts at least include texts corresponding to the target polyphone with different pronunciations;

[0066] An input module, used for inputting the target semantic feature and the plurality of matching semantic features into the trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and a plurality of matching hidden layer representations corresponding to the plurality of matching semantic features;

[0067] A determination module is used to determine the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and a plurality of matching hidden layer representations.

[0068] The polyphone disambiguation device provided in the embodiment of the present application extracts the target semantic features of the target polyphone in the target text, and at the same time extracts the semantic features presented by the target polyphone under different pronunciations, i.e., matching semantic features, and uses a temporal neural network to compare the target semantic features with multiple matching semantic features, and uses the degree of proximity of the semantic features as a criterion for similar pronunciations to select the most likely pronunciation of the target polyphone in the target text. The embodiment of the present application does not require a large amount of training data, but only requires matching texts containing target polyphones with different pronunciations. In the case of a shortage of polyphone annotation data, the disambiguation of polyphones can still be achieved.

[0069] Based on the above embodiment, as a preferred implementation, it also includes:

[0070] A third extraction module is used to obtain a training text containing the target polyphone, and extract the training semantic features of the target polyphone in the training text;

[0071] A fourth extraction module is used to obtain a plurality of matching texts containing the target polyphone, and extract matching semantic features of the target polyphone in the matching texts; wherein the matching texts at least include texts corresponding to the target polyphone with different pronunciations;

[0072] A training module is used to train a temporal neural network based on the standard pronunciation of the target polyphone in the training text, the training semantic features and a plurality of matching semantic features to obtain the trained temporal neural network.

[0073] Based on the above embodiment, as a preferred implementation mode, the matching text includes text corresponding to each pronunciation of the target polyphonetic character.

[0074] Based on the above embodiment, as a preferred implementation, the first extraction module includes:

[0075] An acquisition unit, used to acquire a target text and determine a target polyphone in the target text;

[0076] An encoding unit, used for encoding the target text at a word level to obtain encoding information;

[0077] An input unit, used for inputting the encoded information into a neural network model to obtain a feature vector sequence of the same length as the target text;

[0078] The first determining unit is configured to use the feature vector in the feature vector sequence corresponding to the target polyphone as the target semantic feature of the target polyphone in the target text.

[0079] Based on the above embodiment, as a preferred implementation, the determination module includes:

[0080] A calculation unit, configured to calculate the similarity between the target hidden layer representation and the plurality of matching hidden layer representations, and determine the target matching hidden layer representation having the greatest similarity to the target hidden layer representation;

[0081] The second determining unit is used to determine the pronunciation of the target polyphone in the matching text corresponding to the target matching hidden layer representation as the pronunciation of the target polyphone in the target text.

[0082] Based on the above embodiment, as a preferred implementation, the calculation unit includes:

[0083] A calculation subunit, used for calculating the similarity between the target hidden layer representation and the plurality of matching hidden layer representations;

[0084] An adjustment subunit, used to determine a weight coefficient corresponding to each of the matching texts, and adjust the similarity between the corresponding matching hidden layer representation and the target hidden layer representation based on the weight coefficient corresponding to the matching text;

[0085] A determination subunit is used to determine a target matching hidden layer representation having the greatest similarity to the adjusted target hidden layer representation.

[0086] Based on the above embodiment, as a preferred implementation manner, the calculation subunit is specifically a subunit for calculating the cosine distance between the target hidden layer representation and the plurality of matching hidden layer representations.

[0087] On the basis of the above embodiment, as a preferred implementation manner, the matching text includes an error case text, and the weight coefficient corresponding to the error case text is greater than the weight coefficients corresponding to other matching texts.

[0088] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0089] The present application also provides an electronic device, see Figure 4 , a structural diagram of an electronic device 40 provided in an embodiment of the present application, such as Figure 4 As shown, a processor 41 and a memory 42 may be included.

[0090] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 41 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0091] The memory 42 may include one or more computer-readable storage media, which may be non-transitory. The memory 42 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 42 is at least used to store the following computer program 421, wherein, after the computer program is loaded and executed by the processor 41, it can implement the relevant steps in the polyphone disambiguation method performed by the electronic device side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 42 may also include an operating system 422 and data 423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 422 may include Windows, Unix, Linux, etc.

[0092] In some embodiments, the electronic device 40 may further include a display screen 43 , an input / output interface 44 , a communication interface 45 , a sensor 46 , a power source 47 , and a communication bus 48 .

[0093] certainly, Figure 4 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 4 More or fewer components than shown, or combinations of certain components.

[0094] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the polyphonetic character disambiguation method executed by the electronic device in any of the above embodiments are implemented.

[0095] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0096] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for disambiguating polyphones, characterized in that: include: Acquire a target text, determine a target polyphone in the target text, and extract a target semantic feature of the target polyphone in the target text; Acquire multiple matching texts containing the target polyphone, and extract matching semantic features of the target polyphone in the matching texts; wherein the matching texts at least include texts corresponding to the target polyphone with different pronunciations; Inputting the target semantic feature and the plurality of matching semantic features into a trained temporal neural network to obtain a target hidden layer representation corresponding to the target semantic feature and a plurality of matching hidden layer representations corresponding to the plurality of matching semantic features; Determining the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and the plurality of matching hidden layer representations; Wherein, determining the pronunciation of the target polyphone in the target text based on the similarity between the target hidden layer representation and the plurality of matching hidden layer representations includes: Calculating the similarity between the target hidden layer representation and the plurality of matching hidden layer representations, and determining the target matching hidden layer representation having the greatest similarity to the target hidden layer representation; Determine the pronunciation of the target polyphone in the matching text corresponding to the target matching hidden layer representation as the pronunciation of the target polyphone in the target text; The calculating of the similarity between the target hidden layer representation and the plurality of matching hidden layer representations includes: The cosine distance between the target hidden layer representation and the plurality of matching hidden layer representations is calculated, and the cosine distance is used as the similarity between the target hidden layer representation and the plurality of matching hidden layer representations.

2. The polyphone disambiguation method according to claim 1, characterized in that: Also includes: Acquire a training text containing the target polyphone, and extract training semantic features of the target polyphone in the training text; Acquire multiple matching texts containing the target polyphone, and extract matching semantic features of the target polyphone in the matching texts; wherein the matching texts at least include texts corresponding to the target polyphone with different pronunciations; The temporal neural network is trained based on the standard pronunciation of the target polyphone in the training text, the training semantic features and a plurality of the matching semantic features to obtain the trained temporal neural network.

3. The polyphone disambiguation method according to claim 1, characterized in that: The matching text includes text corresponding to each pronunciation of the target polyphonetic character.

4. The polyphone disambiguation method according to claim 1, characterized in that: The step of extracting target semantic features of the target polyphone in the target text includes: Encoding the target text at a word level to obtain encoding information; Inputting the encoded information into a neural network model to obtain a feature vector sequence of the same length as the target text; The feature vector corresponding to the target polyphone in the feature vector sequence is used as the target semantic feature of the target polyphone in the target text.

5. The polyphone disambiguation method according to claim 1, characterized in that: After calculating the similarity between the target hidden layer representation and the plurality of matching hidden layer representations, the method further includes: Determine a weight coefficient corresponding to each of the matching texts, and adjust the similarity between the corresponding matching hidden layer representation and the target hidden layer representation based on the weight coefficient corresponding to the matching text; Accordingly, the determining of the target matching hidden layer representation having the greatest similarity to the target hidden layer representation includes: Determine a target matching hidden layer representation having the greatest similarity to the adjusted target hidden layer representation.

6. The polyphone disambiguation method according to claim 5, characterized in that: The matching text includes an error case text, and a weight coefficient corresponding to the error case text is greater than a weight coefficient corresponding to other matching texts.

7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the polyphone disambiguation method as claimed in any one of claims 1 to 6 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the polyphone disambiguation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Chinese word pronunciation prediction method and device

    CN106910497A

  • Method, device and system for determining pronunciation of polyphone

    CN107515850A

  • Method and device for determining pronunciation of polyphonic characters

    CN110277085A

  • Intelligent voice signature method and device based on text semantic similarity and medium

    CN110502610A

  • Semantic similarity calculation method based on combined distance

    CN111191464A