Arabic vowel recovery method, device, equipment and storage medium
The Arabic text is annotated with vowels through a pre-trained language model and a vowel recovery model, which solves the problem of missing vowels in Arabic text in speech synthesis and improves the accuracy and semantic integrity of speech synthesis.
Patent Information
- Application Number
- CN202110234392.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-03-03
AI Technical Summary
The lack of vowel information during speech synthesis of Arabic text results in poor synthesis results, and the rules for adding vowels are unclear, affecting word meaning and semantic integrity.
Using the pre-trained language model and vowel recovery model, the Arabic text to be processed is used for vowel annotation, and the training text without vowel annotation is used to train the language model, combining character and word features for vowel prediction, and referring to the vowel annotation. Rules are corrected.
It improves the speech synthesis accuracy and semantic integrity of Arabic text, ensuring the correct pronunciation and word meaning expression of Arabic text.
Smart Images

Figure CN113011135B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and more specifically, to an Arabic vowel recovery method, device, equipment and storage medium. Background Art
[0002] Arabic can also be referred to as Arabic. Arabic has 28 consonant characters and 8 vowel characters. In its regular writing, except for special circumstances, the vowel character information in the text is generally omitted, and only the consonant word information is retained. However, the pronunciation of Arabic needs to reflect the vowel information, and the combination of consonants and different vowels will affect the semantic information of the word. Therefore, readers often need to add the corresponding vowel information after the consonant characters according to their own judgment when reading, and read the consonant together with the vowel pronunciation.
[0003] Due to the particularity of Arabic, there are no clear and detailed rules for adding vowels. The same consonant word may change its meaning after adding different vowel characters, or the same word may change its final vowel according to its case change in the sentence. Therefore, the same consonant word may have multiple vowel recovery forms in different sentences, such as the word Possible vowel-marked forms include And many more.
[0004] Since conventional Arabic text does not contain vowel characters, the synthesis effect will be affected when performing speech synthesis on Arabic text. Therefore, it is necessary to perform front-end processing on Arabic text before speech synthesis, that is, to restore the vowel information of Arabic text, so as to ensure that there is complete and accurate input information when synthesizing Arabic text. Therefore, it is necessary to provide an Arabic vowel recovery solution to ensure the semantic correctness and integrity of Arabic text. Summary of the invention
[0005] In view of the above problems, this application is proposed to provide an Arabic vowel recovery method, device, equipment and storage medium to ensure the semantic correctness and integrity of Arabic text. The specific scheme is as follows:
[0006] An Arabic vowel restoration method, comprising:
[0007] Get the Arabic text to be processed;
[0008] Determining the feature representation of each word in the to-be-processed Arabic text using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations;
[0009] Obtaining text features of each character in the Arabic text to be processed;
[0010] Based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs, the vowel marking results corresponding to each character in the Arabic text to be processed are determined.
[0011] Preferably, the training process of the language model includes:
[0012] Get Arabic training text without vowel markings;
[0013] Randomly masking characters in the Arabic training text and inputting the characters into a language model;
[0014] The language model is trained with the goal of predicting occluded characters in the Arabic training text.
[0015] Preferably, the language model is a masked language model based on the BERT structure.
[0016] Preferably, the Arabic training text comprises a modern Arabic training text and / or a classical Arabic training text.
[0017] Preferably, the determining the feature representation of each word in the Arabic text to be processed by using a pre-trained language model includes:
[0018] The Arabic text to be processed is input into the language model to obtain the word vector feature of each word in the Arabic text to be processed output by the language model.
[0019] Preferably, the step of determining the vowel marking result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs comprises:
[0020] Fusion of the text features of each character in the Arabic text to be processed with the feature representation of the word to which the character belongs, to obtain a fused feature representation of the Arabic text to be processed;
[0021] Based on the fused feature representation of the Arabic text to be processed, a vowel marking result corresponding to each character in the Arabic text to be processed is determined.
[0022] Preferably, the process of obtaining text features of each character in the Arabic text to be processed, and determining vowel marking results corresponding to each character in the Arabic text to be processed based on the text features and feature representations of the words to which each character belongs, includes:
[0023] Processing the to-be-processed Arabic text and the feature representation of each word therein by using the pre-trained vowel restoration model to obtain vowel annotation results corresponding to each character in the to-be-processed Arabic text output by the vowel restoration model;
[0024] The vowel restoration model is obtained by training using an Arabic training text with vowel annotation results and a feature representation of each word in the Arabic training text as training data.
[0025] Preferably, the process of processing the Arabic text to be processed and the feature representation of each word therein by using the pre-trained vowel restoration model comprises:
[0026] Using the feature extraction layer of the vowel restoration model, obtaining text features of each character in the Arabic text to be processed;
[0027] Using the feature fusion layer of the vowel restoration model, the text feature of each character in the Arabic text to be processed is fused with the feature representation of the word to which the character belongs, so as to obtain a fused feature representation of the Arabic text to be processed;
[0028] The classification layer of the vowel restoration model is used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the fusion feature representation of the Arabic text to be processed.
[0029] Preferably, the step of using the feature extraction layer of the vowel restoration model to obtain the text feature of each character in the Arabic text to be processed includes:
[0030] Using the first feature extraction layer of the vowel recovery model, obtaining the encoding feature of each character in the Arabic text to be processed;
[0031] The second feature extraction layer of the vowel recovery model is used to obtain the character features of each character in the Arabic text to be processed within a set length window, and the coding features and the character features are combined into text features of the characters.
[0032] Preferably, before determining the feature representation of each word in the Arabic text to be processed by using the pre-trained language model, the method further comprises:
[0033] If it is detected that the Arabic text to be processed contains numeric symbols, the numeric symbols are converted into Arabic pronounced words, and vowels are marked on the characters other than the last character in the converted Arabic pronounced words.
[0034] Preferably, the training process of the vowel restoration model includes:
[0035] Using the classical Arabic training text with vowel annotation results and the feature representation of each word in the classical Arabic training text as training data, training an initial vowel recovery model;
[0036] The modern Arabic training text with vowel annotation results and the feature representation of each word in the modern Arabic training text are used as training data to fine-tune the initial vowel restoration model to obtain a final vowel restoration model.
[0037] Preferably, the process of acquiring the modern Arabic training text with vowel marking results includes:
[0038] Acquire a modern Arabic training text, wherein characters other than the last character in the modern Arabic training text are marked with vowels;
[0039] The digital symbols contained in the modern Arabic training text are converted into Arabic pronunciation words, and vowels are marked on the characters other than the last character in the converted Arabic pronunciation words.
[0040] Preferably, it also includes:
[0041] The vowel marking results corresponding to the determined characters in the Arabic text to be processed are corrected with reference to the set vowel marking rules.
[0042] Preferably, the vowel marking rules include vowel marking rules for a first type of words, and / or vowel marking rules for a second type of words, and / or vowel marking rules for a third type of words, the first type of words are words with fixed vowel marking forms, the second type of words are words whose final characters determine the word position and only the case position changes, and the third type of words are words composed of articles and nouns;
[0043] The step of correcting the vowel marking results corresponding to the respective characters in the Arabic text to be processed by referring to the set vowel marking rules comprises:
[0044] Detecting whether the to-be-processed Arabic text contains a first type of word, and if so, replacing the vowel marking results of each character of the first type of word in the vowel marking results of the to-be-processed Arabic text with the configured vowel marking results corresponding to each character of the first type of word;
[0045] and / or,
[0046] Detecting whether the Arabic text to be processed contains a second type of word, and if so, replacing the vowel marking results of the corresponding characters in the second type of word in the vowel marking results of the Arabic text to be processed with the configured vowel marking results of each character other than the last character in the second type of word;
[0047] and / or,
[0048] Detecting whether the Arabic text to be processed contains a compound word composed of an article and a noun, and if so, processing the noun with reference to the vowel marking rules for the first type of words and the second type of words, and determining whether the compound word containing the article is in the middle or the beginning of the sentence for the article;
[0049] If it is in the middle of the sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the first article;
[0050] If it is at the beginning of a sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the second article.
[0051] An Arabic vowel restoration device, comprising:
[0052] A text acquisition unit, used for acquiring the Arabic text to be processed;
[0053] A word feature representation determination unit, used to determine the feature representation of each word in the Arabic text to be processed by using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations;
[0054] A character text feature acquisition unit, used to acquire the text feature of each character in the Arabic text to be processed;
[0055] The vowel marking result determining unit is used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs.
[0056] An Arabic vowel restoration device, comprising: a memory and a processor;
[0057] The memory is used to store programs;
[0058] The processor is used to execute the program to implement the various steps of the Arabic vowel recovery method as described above.
[0059] A storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the Arabic vowel recovery method as described above.
[0060] By means of the above technical scheme, the Arabic vowel recovery scheme of the present application can train a language model using a large number of easily accessible Arabic training texts without vowel annotations. Since Arabic training texts without vowel annotations can be easily obtained in large quantities, the language model can be trained based on a large number of Arabic training texts, so that the trained language model has a good generalization representation ability for Arabic words, and then for the Arabic text to be processed, the language model is used to determine the feature representation of each word in the Arabic text to be processed, and the text feature of each character in the Arabic text to be processed is obtained. Based on the text feature of each character and the feature representation of the word to which each character belongs, the vowel annotation result corresponding to each character in the Arabic text to be processed is determined. When restoring vowels in the Arabic text to be processed, the present application refers to the text feature of each character and the feature representation of the word to which it belongs, that is, the reference information is richer, and at the same time, with the help of the language model's good generalization representation ability for Arabic words, the accuracy of the vowels predicted by each character can be improved, and finally an Arabic text marked with vowels is obtained, which ensures the semantic correctness and integrity of the Arabic text. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0062] Figure 1 A schematic diagram of a process of restoring Arabic vowels provided in an embodiment of the present application;
[0063] Figure 2 A schematic diagram of the processing of a vowel response model is shown as an example;
[0064] Figure 3 Another schematic diagram of the vowel recovery model processing process is shown as an example;
[0065] Figure 4 A schematic diagram of the structure of an Arabic vowel restoration device disclosed in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the structure of an Arabic vowel restoration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] 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.
[0068] The present application provides an Arabic vowel recovery scheme, which can be applied to restore vowels in Arabic composed of consonant characters, that is, marking the vowel character corresponding to each consonant character. In order to simplify the expression, Arabic is referred to as Arabic in the following text.
[0069] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a mobile phone, computer, server, cloud, etc.
[0070] In order to restore the Arabic vowels, the first thing the applicant in this case thought of was to use a large amount of Arabic training texts with vowel annotation results to train a vowel restoration model, and then use the trained vowel restoration model to restore the vowels of the Arabic texts to be processed.
[0071] However, in reality, Arabic training text data with vowel annotation results is very scarce. If Arabic training text with vowel annotation results is obtained through manual expert annotation, it will take up a lot of human resources. Therefore, this case is committed to providing an Arabic vowel recovery solution in a low-resource scenario, where the low resources refer to the small number of Arabic training text data resources with vowel annotation results.
[0072] Next, combine Figure 1 The Arabic vowel recovery method of the present application may include the following steps:
[0073] Step S100: Obtain the Arabic text to be processed.
[0074] Specifically, the Arabic text to be processed is an Arabic text that needs to be restored in vowels. The Arabic text to be processed is composed of consonant characters, or consonant characters and spaces, punctuation marks, non-Arabic characters, and the like.
[0075] Step S110: Determine the feature representation of each word in the Arabic text to be processed by using the pre-trained language model.
[0076] Wherein, the language model is obtained by training based on Arabic training texts without vowel annotations. In the embodiment of the present application, a language model can be pre-trained using a large number of Arabic training texts without vowel annotations, because Arabic training texts without vowel annotations can be easily obtained, such as by crawling the Internet or obtaining through other open source data sets. Therefore, a language model can be trained based on a large number of Arabic training texts, so that the trained language model has a good generalization representation ability for Arabic words, and then for the Arabic text to be processed, the language model is used to determine the feature representation of each word in the Arabic text to be processed.
[0077] Step S120: Obtain text features of each character in the Arabic text to be processed.
[0078] Specifically, for the Arabic text to be processed, the text feature of each character therein can be obtained. The text feature represents the semantic information of the character in the Arabic text to be processed.
[0079] The text feature of each character may include the encoding result of a single character, or may include the result of encoding the character in combination with context information of the character.
[0080] The process of obtaining the text features of characters can be implemented by using a character embedding layer in a neural network structure, or by other means.
[0081] It should be noted that the Arabic text to be processed is composed of consonant characters and other characters, such as spaces, punctuation marks, etc. Therefore, in this step, corresponding text features can be determined for various characters in the Arabic text to be processed.
[0082] Step S130: Determine vowel marking results corresponding to each character in the Arabic text to be processed based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs.
[0083] Specifically, when performing vowel restoration on each character in the Arabic text to be processed, the text features of each character are referred to, and the feature representation of the word to which each character belongs is used as an auxiliary reference feature to predict the vowel annotation result corresponding to each character in the Arabic text to be processed.
[0084] The feature representation of the word to which each character belongs can be obtained through the above step S110, that is, the feature representation of each word in the Arabic text to be processed is determined by the language model. It can be understood that for multiple different characters belonging to the same word, the feature representation of the word to which they belong is the same.
[0085] The Arabic vowel recovery method provided in the embodiment of the present application can train a language model using a large number of easily accessible Arabic training texts without vowel annotations. Since Arabic training texts without vowel annotations can be easily obtained in large quantities, the language model can be trained based on a large number of Arabic training texts, so that the trained language model has a good generalization representation ability for Arabic words, and then for the Arabic text to be processed, the language model is used to determine the feature representation of each word in the Arabic text to be processed, and the text feature of each character in the Arabic text to be processed is obtained. Based on the text feature of each character and the feature representation of the word to which each character belongs, the vowel annotation result corresponding to each character in the Arabic text to be processed is determined. When restoring vowels in the Arabic text to be processed, the present application refers to the text feature of each character and the feature representation of the word to which it belongs, that is, the reference information is richer, and at the same time, with the help of the language model's good generalization representation ability for Arabic words, the accuracy of the vowels predicted by each character can be improved, and finally an Arabic text marked with vowels is obtained, ensuring the semantic correctness and integrity of the Arabic text.
[0086] In some embodiments of the present application, the above-mentioned language model is introduced.
[0087] In order to train the language model, firstly, training data can be collected, that is, obtaining Arabic training text without vowel annotations. This part of data can be crawled from the Internet or obtained through existing open source data sets. After obtaining the Arabic training text, the characters in the Arabic training text can be randomly masked and input into the language model to train the language model with the goal of predicting the masked characters in the Arabic training text, that is, training a masked language model.
[0088] Considering that the BERT model has excellent performance in natural language processing tasks and can maintain good generalization performance for downstream tasks, the BERT model can be selected as the language model in this embodiment. The BERT model mainly includes an embedding layer and a multi-layer bidirectional transformer structure.
[0089] For the input Arabic training text, after passing through the language model, each word in the Arabic training text will generate a word vector feature word embedding as the feature representation of the word. Optionally, the word vector feature word embedding of the word can be 768-dimensional or other dimensional data, and the specific dimension can be adjusted according to the network structure of the language model.
[0090] It should be further explained that the above-obtained Arabic training text without vowel markings may be one or both of a modern Arabic training text and a classical Arabic training text.
[0091] Classical Arabic refers to the Arabic used for writing from the Umayyad Dynasty to the Abbasid Dynasty (7th to 9th century AD). Modern Arabic is its direct descendant and is the Arabic used for writing and formal speech in the world today. Modern Arabic and Classical Arabic are different, but they also have certain similarities. The vocabulary and style of Modern Arabic are different from Classical Arabic, but the morphology and syntax have basically remained unchanged. The classic representative of Classical Arabic is the Quran.
[0092] In this embodiment, considering the similarities and differences between modern Arabic and classical Arabic, and the fact that the vowel restoration task is mainly performed on modern Arabic, modern Arabic training text and classical Arabic training text can be used as Arabic training text at the same time to train the language model, so that the trained language model can simultaneously learn the similarities and differences between modern Arabic and classical Arabic, and has a better generalization representation ability for Arabic words.
[0093] Furthermore, for step S130 in the above embodiment, the process of determining the vowel annotation results corresponding to each character in the Arabic text to be processed based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs is introduced.
[0094] In this embodiment, when determining the vowel labeling results corresponding to each character in the Arabic text to be processed, the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs are referred to. Specifically, the text features of each character in the Arabic text to be processed and the feature representation of the word to which the character belongs can be fused to obtain the fused feature representation of the Arabic text to be processed. Further, based on the fused feature representation of the Arabic text to be processed, the vowel labeling results corresponding to each character in the Arabic text to be processed are determined.
[0095] By fusing the text features of the characters with the feature representations of the words they belong to, the fused feature representation contains both the text features of the characters and the generalized representation of the characters in the Arabic environment, that is, the fused feature representation contains richer information, and based on this, the vowel annotation results corresponding to each character in the Arabic text to be processed will also be more accurate.
[0096] In some embodiments of the present application, the processes of step S120 and step S130 described above may be implemented with the aid of a neural network model.
[0097] Specifically, the present application can pre-train the vowel restoration model. In the training process, the Arabic training text with vowel annotation results and the feature representation of each word in the Arabic training text can be used as training data to train the vowel restoration model.
[0098] Among them, the Arabic training text with vowel marking results can include modern Arabic training text and classical Arabic training text. The feature representation of each word in the Arabic training text can be obtained through the language model trained above. Specifically, the Arabic training text can be input into the trained language model, and then the feature representation of each word in the Arabic training text output by the language model is obtained. In this embodiment, the Arabic training text carrying the vowel marking results and the feature representation of each word therein are used as training data to train the vowel recovery model. Among them, the vowel marking results carried by the Arabic training text are the vowel labels corresponding to each character in the Arabic training text.
[0099] Specifically, taking Unicode encoding as an example, all possible vowel labels in Arabic may include: "\u064B", "\u064C", "\u064D", "\u064E", "\u064F", "\u0650", "\u0651", "\u0652", "\u0651\u064B", "\u0651\u064C", "\u0651\u064D", "\u0651\u064E", "\u0651\u064F", "\u0651\u0650", and empty, a total of 15 cases. For non-Arabic characters in the Arabic training text, their vowel labels can be uniformly set to empty. Therefore, the output of the above vowel recovery model has a total of 15 categories, and the process of vowel recovery is also the process of predicting the vowel label category corresponding to the character.
[0100] Furthermore, considering the scarcity of vowel annotation data for modern Arabic in actual situations and the similarities and differences between classical Arabic and modern Arabic, this embodiment provides an optional training process for a vowel restoration model.
[0101] Specifically, since there are a large number of open-source classical Arabic training texts with vowel annotation results, and the vowel annotation results are relatively accurate, such as the Quran, this embodiment can first use a large number of classical Arabic training texts with vowel annotation results and the feature representation of each word in the classical Arabic training text as training data to train the initial vowel recovery model. The feature representation of each word in the classical Arabic training text can be obtained through the language model trained above.
[0102] For the initial vowel restoration model trained on the classical Arabic training text, this embodiment further uses a small amount of modern Arabic training text with vowel annotation results and the feature representation of each word in the modern Arabic training text as training data to fine-tune the initial vowel restoration model and obtain the final vowel restoration model.
[0103] Among them, the modern Arabic training text with vowel annotation results can be obtained from an open source dataset or manually annotated.
[0104] The training method of the vowel restoration model provided in this embodiment first uses the easily accessible classical Arabic training texts with vowel annotation results to train the initial vowel restoration model, and then uses a small amount of modern Arabic training texts with vowel annotation results to fine-tune the initial vowel restoration model, which solves the problem of the shortage of modern Arabic training texts with vowel annotation results, and at the same time enhances the generalization ability of the model on small sample data, ensuring that the final vowel restoration model has a good effect on modern Arabic.
[0105] Furthermore, vowel recovery of Arabic text can be used for speech synthesis of Arabic text. In the speech synthesis process, the digital symbols need to be converted into Arabic pronunciation words. The digital symbols have case changes. Usually, the case is reflected in the vowel of the character at the end of the word. That is, the case of the word may be different depending on the vowel form of the character at the end of the word. There are 6 cases in total or in the form of a static symbol. The case change of the digital symbol needs to be predicted in combination with the result of vowel recovery.
[0106] In order to solve the problem of case conversion of digital symbols, during the training process of the vowel restoration model, the embodiment of the present application can pre-process the acquired modern Arabic training text.
[0107] Specifically, the process of obtaining the modern Arabic training text with vowel annotation results may include:
[0108] S1. Obtain modern Arabic training text.
[0109] Wherein, characters other than numeric symbols in the modern Arabic training text are marked with vowels.
[0110] S2. Convert the digital symbols contained in the modern Arabic training text into Arabic pronounced words, and mark vowels on the characters other than the last character in the converted Arabic pronounced words.
[0111] Specifically, since the case of a word is generally determined by the vowel form of the last character, in order to enable the vowel recovery model to accurately predict the case change of the digital symbol, in this step the digital symbol is first converted into an Arabic-pronounced word, and vowels are marked on the characters other than the last character in the word, that is, the vowel recovery model is focused on recovering the vowel of the last character.
[0112] It can be understood that after obtaining the trained vowel restoration model, the vowel restoration model can be used to process the Arabic text to be processed and the feature representation of each word therein to obtain the vowel annotation results corresponding to each character in the Arabic text to be processed output by the vowel restoration model.
[0113] The vowel restoration model obtains text features of each character in the Arabic text to be processed, and determines the vowel annotation results corresponding to each character in the Arabic text to be processed based on the text features and the feature representation of the word to which each character belongs.
[0114] Next, combine Figure 2 The structure of the vowel restoration model is shown in the example, and the processing of the vowel restoration model is introduced.
[0115] Figure 2 An optional vowel restoration model structure is illustrated, which may include a feature extraction layer, a feature fusion layer, and a classification layer.
[0116] in:
[0117] The text feature of each character in the Arabic text to be processed is obtained by the feature extraction layer.
[0118] The feature fusion layer fuses the text feature of each character in the Arabic text to be processed with the feature representation of the word to which the character belongs, so as to obtain a fused feature representation of the Arabic text to be processed.
[0119] Among them, the feature representation of the word to which each character belongs can be obtained through a pre-trained language model.
[0120] The classification layer determines the vowel marking result corresponding to each character in the Arabic text to be processed based on the fusion feature representation of the Arabic text to be processed.
[0121] Further, see Figure 3 As shown, the feature extraction layer may include a first feature extraction layer and a second feature extraction layer.
[0122] Wherein, the first feature extraction layer is used to obtain the encoding features of each character in the Arabic text to be processed.
[0123] The first feature extraction layer may adopt a character embedding layer to extract the encoding features of each character in the Arabic text to be processed.
[0124] The second feature extraction layer is used to obtain the character features of each character in the Arabic text to be processed within a set length window.
[0125] The second feature extraction layer can adopt a CNN network structure. For example, it can be a one-dimensional convolutional neural network with one or more layers, which is used to extract information of a character string of a set length. For example, it can slide on the character string corresponding to the Arabic text to be processed according to a set length window. For each character string in the sliding window, the second feature extraction layer is used to extract the character string information features in the window, that is, to extract the character features in the window of the set length.
[0126] Furthermore, the coding feature and the character feature are combined into a text feature of the character and input into a feature fusion layer.
[0127] For the feature fusion layer, a variety of different network architectures can be used, such as a bidirectional LSTM network, a GRU network, etc. Figure 3 Taking the example as an example, the feature fusion layer may include two bidirectional LSTM networks, which are defined as a first bidirectional LSTM network and a second bidirectional LSTM network respectively.
[0128] The text features of the characters extracted by the feature extraction layer are input to the first bidirectional LSTM network, and the features of the entire sentence text can be extracted by the first bidirectional LSTM network. The output of the first bidirectional LSTM network is connected to the second bidirectional LSTM network.
[0129] The feature representation of the word to which the character output by the pre-trained language model belongs is input into the second bidirectional LSTM network.
[0130] In an optional manner, considering that the dimension of the feature representation of the words to which the characters output by the language model may be different from the dimension of the feature representation output by the first bidirectional LSTM network, in order to facilitate the second bidirectional LSTM network to fuse the two features, a fully connected network can be further added between the language model and the second bidirectional LSTM network to adjust the dimension of the feature representation of the words to which the characters output by the language model belong so that it matches the dimension of the feature representation output by the first bidirectional LSTM network. Generally, the dimension of the feature representation of the words to which the characters output by the language model is higher, and the feature representation of the words to which the characters belong can be reduced in dimension through the fully connected network.
[0131] Furthermore, by adding a fully connected network, the network learning ability of the vowel restoration model can be further increased.
[0132] The second bidirectional LSTM network fuses the feature representation of each character output by the first bidirectional LSTM network with the feature representation of the word to which the character belongs output by the language model, for example, by fusing the feature representation in the form of feature concatenation. The second bidirectional LSTM network finally outputs the fused feature representation of the Arabic text to be processed.
[0133] Optionally, in order to prevent the problem of overfitting in model training, a dropout layer may be added after the feature fusion layer. Specifically, a dropout layer may be added after each of the first and second bidirectional LSTM networks.
[0134] The classification layer may be composed of a fully connected layer and a softmax classifier. The classification layer predicts the vowel marking result corresponding to each character in the Arabic text to be processed based on the fused feature representation of the Arabic text to be processed.
[0135] In some embodiments of the present application, another optional implementation of the Arabic vowel recovery method is introduced. Figure 1 In the embodiment of the present application, in order to solve the problem of the conversion of the number symbol position in the Arabic text to be processed, before the aforementioned step S110, using the pre-trained language model to determine the feature representation of each word in the Arabic text to be processed, the following processing steps can be further added:
[0136] If it is detected that the Arabic text to be processed contains numeric symbols, the numeric symbols are converted into Arabic pronounced words, and vowels are marked on the characters other than the last character in the converted Arabic pronounced words.
[0137] Specifically, since the case of a word is generally determined by the vowel form of the last character, in order to accurately predict the case changes of digital symbols, in this embodiment, the digital symbols in the Arabic text to be processed are first converted into Arabic-pronounced words, and the other characters in the word except the last character are marked with vowels. In this way, you only need to focus on restoring the vowel of the last character, and then you can more accurately obtain the case of the digital symbol corresponding to the Arabic-pronounced word, which provides a basis for subsequent speech synthesis of the Arabic text.
[0138] In some embodiments of the present application, another Arabic vowel restoration method is further provided.
[0139] On the basis of the above-mentioned embodiments, the present embodiment may further include a process of correcting the vowel marking results corresponding to each character in the Arabic text to be processed by using the set vowel marking rules.
[0140] In order to avoid errors in the vowel annotation results restored by the above scheme for processing the Arabic text, the embodiment of the present application can summarize the vowel annotation rules of some specific words in advance, and then correct the vowel annotation results according to the rules.
[0141] This embodiment illustrates the vowel marking rules of three types of words, which are introduced as follows:
[0142] Type 1 words: words with fixed vowel marking patterns.
[0143] The second type of words: words whose final character determines the word's case and only the case changes.
[0144] The third type of words: words composed of articles and nouns.
[0145] Based on this, the process of correcting the determined vowel marking results corresponding to each character in the Arabic text to be processed with reference to the set vowel marking rules may include any one or more of the following three methods:
[0146] 1) Detect whether the Arabic text to be processed contains a first type of word. If so, use the configured vowel annotation results corresponding to each character in the first type of word to replace the vowel annotation results of each character of the first type of word in the vowel annotation results of the Arabic text to be processed.
[0147] Specifically, for the first type of words with fixed vowel recovery forms, the vowel annotation results corresponding to the configured first type of words can be directly used to replace the vowel annotation results of each character of the first type of words in the vowel annotation results of the Arabic text to be processed obtained in the above steps.
[0148] 2) Detect whether the Arabic text to be processed contains a second type of word. If so, use the configured vowel annotation results of each character other than the last character in the second type of word to replace the vowel annotation results of the corresponding characters in the second type of word in the vowel annotation results of the Arabic text to be processed.
[0149] Specifically, for the second type of words whose final character determines the word case and only the case will change, the vowel recovery form of the other characters except the final character is also fixed. Therefore, for the second type of words, the vowel annotation results of the other characters except the final character can be pre-configured, and then for the second type of words in the Arabic text to be processed, the configured vowel annotation results of the other characters except the final character in the second type of words are used to replace the vowel annotation results of the corresponding characters in the second type of words in the vowel annotation results of the Arabic text to be processed.
[0150] 3) Detect whether the Arabic text to be processed contains a compound word composed of an article and a noun. If so, process the article and the noun in the compound word in the following manners:
[0151] The nouns are processed with reference to the vowel marking rules for the first type of words and the second type of words.
[0152] For the article, determining whether the compound word in which the article is located is in the middle or the beginning of the sentence;
[0153] If it is in the middle of a sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the first article.
[0154] If it is at the beginning of a sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the second article.
[0155] Specifically, the only article in Arabic is The article compound word has different vowel marking forms when it is in the middle of a sentence and at the end of a sentence. When it is in the middle of a sentence, there is a first vowel marking form: When at the beginning of a sentence, there is a second vowel notation: and
[0156] Of course, in addition to the three cases in the above examples, some other vowel marking rules can be set according to the rules of Arabic pronunciation, and then the vowel marking results of the Arabic text to be processed can be corrected according to the set vowel marking rules. For example, words composed of articles and connected characters, words containing two static characters, etc., can all be set according to the summarized vowel marking rules. This can further improve the accuracy of vowel recovery.
[0157] Furthermore, considering that the vowel recovery results can be used in speech synthesis, and Arabs generally have the habit of swallowing sounds when speaking, this can be used to further process the final sounds. For example, the vowel at the end of the word can be directly marked as a silent symbol. Although this processing method cannot reflect the case problem of the word, the actual pronunciation will not affect understanding.
[0158] The Arabic vowel restoration device provided in the embodiment of the present application is described below. The Arabic vowel restoration device described below and the Arabic vowel restoration method described above can be referred to each other.
[0159] See also Figure 4 , Figure 4 The present invention is a schematic diagram of the structure of an Arabic vowel restoration device disclosed in an embodiment of the present application.
[0160] like Figure 4 As shown, the device may include:
[0161] A text acquisition unit 11, used to acquire the Arabic text to be processed;
[0162] A word feature representation determination unit 12, used to determine the feature representation of each word in the Arabic text to be processed by using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations;
[0163] A character text feature acquisition unit 13, used to acquire the text feature of each character in the Arabic text to be processed;
[0164] The vowel marking result determining unit 14 is used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs.
[0165] Optionally, the apparatus of the present application may further include: a language model training unit, which is used to train the above-mentioned language model. The process of training the language model by the language model training unit may include:
[0166] Get Arabic training text without vowel markings;
[0167] Randomly masking characters in the Arabic training text and inputting the characters into a language model;
[0168] The language model is trained with the goal of predicting occluded characters in the Arabic training text.
[0169] Optionally, the above language model may be a masked language model based on the BERT structure.
[0170] Optionally, the above-mentioned Arabic training text may include modern Arabic training text and / or classical Arabic training text.
[0171] Optionally, the process of the word feature representation determination unit determining the feature representation of each word in the Arabic text to be processed by using the pre-trained language model may include:
[0172] The Arabic text to be processed is input into the language model to obtain a word vector of each word in the Arabic text to be processed output by the language model.
[0173] Optionally, the process of the vowel marking result determining unit determining the vowel marking result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs may include:
[0174] Fusion of the text features of each character in the Arabic text to be processed with the feature representation of the word to which the character belongs, to obtain a fused feature representation of the Arabic text to be processed;
[0175] Based on the fused feature representation of the Arabic text to be processed, a vowel marking result corresponding to each character in the Arabic text to be processed is determined.
[0176] Optionally, the implementation process of the character text feature acquisition unit and the vowel annotation result determination unit may be specifically implemented by a model processing unit, and the model processing unit is used to:
[0177] Processing the to-be-processed Arabic text and the feature representation of each word therein by using the pre-trained vowel restoration model to obtain vowel annotation results corresponding to each character in the to-be-processed Arabic text output by the vowel restoration model;
[0178] The vowel restoration model is obtained by training using an Arabic training text with vowel annotation results and a feature representation of each word in the Arabic training text as training data.
[0179] Optionally, the process in which the model processing unit processes the Arabic text to be processed and the feature representation of each word therein using the pre-trained vowel restoration model may include:
[0180] Using the feature extraction layer of the vowel restoration model, obtaining text features of each character in the Arabic text to be processed;
[0181] Using the feature fusion layer of the vowel restoration model, the text feature of each character in the Arabic text to be processed is fused with the feature representation of the word to which the character belongs, so as to obtain a fused feature representation of the Arabic text to be processed;
[0182] The classification layer of the vowel restoration model is used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the fusion feature representation of the Arabic text to be processed.
[0183] Optionally, the process of the model processing unit acquiring the text feature of each character in the Arabic text to be processed by using the feature extraction layer of the vowel restoration model may include:
[0184] Using the first feature extraction layer of the vowel recovery model, obtaining the encoding feature of each character in the Arabic text to be processed;
[0185] The second feature extraction layer of the vowel recovery model is used to obtain the character features of each character in the Arabic text to be processed within a set length window, and the coding features and the character features are combined into text features of the characters.
[0186] Optionally, the device of the present application may further include:
[0187] The digital symbol processing unit is used to perform the following steps before the word feature representation determination unit processes: if it is detected that the Arabic text to be processed contains digital symbols, the digital symbols are converted into Arabic pronounced words, and vowels are marked on the other characters in the converted Arabic pronounced words except the last character.
[0188] Optionally, the apparatus of the present application may further include: a vowel restoration model training unit, which is used to train and obtain the above-mentioned vowel restoration model. The process of the vowel restoration model training unit training and obtaining the above-mentioned vowel restoration model may include:
[0189] Using the classical Arabic training text with vowel annotation results and the feature representation of each word in the classical Arabic training text as training data, training an initial vowel recovery model;
[0190] The modern Arabic training text with vowel annotation results and the feature representation of each word in the modern Arabic training text are used as training data to fine-tune the initial vowel restoration model to obtain a final vowel restoration model.
[0191] Optionally, the process of the vowel restoration model training unit obtaining a modern Arabic training text with vowel annotation results may include:
[0192] Acquire a modern Arabic training text, wherein characters other than the last character in the modern Arabic training text are marked with vowels;
[0193] The digital symbols contained in the modern Arabic training text are converted into Arabic pronunciation words, and the characters except the case position in the converted Arabic pronunciation words are marked with vowels.
[0194] Optionally, the apparatus of the present application may further include: a rule correction unit, configured to correct the determined vowel annotation results corresponding to each character in the Arabic text to be processed with reference to the set vowel annotation rules.
[0195] Optionally, the vowel marking rules may include vowel marking rules for a first type of words, and / or vowel marking rules for a second type of words, and / or vowel marking rules for a third type of words, wherein the first type of words are words with fixed vowel marking forms, the second type of words are words whose final characters determine the word case and only the case changes, and the third type of words are words composed of articles and nouns. Based on this, the process of the rule correction unit correcting the determined vowel marking results corresponding to each character in the Arabic text to be processed with reference to the set vowel marking rules may include:
[0196] Detecting whether the to-be-processed Arabic text contains a first type of word, and if so, replacing the vowel marking results of each character of the first type of word in the vowel marking results of the to-be-processed Arabic text with the configured vowel marking results corresponding to each character of the first type of word;
[0197] and / or,
[0198] Detecting whether the Arabic text to be processed contains a second type of word, and if so, replacing the vowel marking results of the corresponding characters in the second type of word in the vowel marking results of the Arabic text to be processed with the configured vowel marking results of each character other than the last character in the second type of word;
[0199] and / or,
[0200] Detecting whether the Arabic text to be processed contains a compound word composed of an article and a noun, and if so, processing the noun with reference to the vowel marking rules for the first type of words and the second type of words, and determining whether the compound word containing the article is in the middle or the beginning of the sentence for the article;
[0201] If it is in the middle of the sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the first article;
[0202] If it is at the beginning of a sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the second article.
[0203] The Arabic vowel recovery device provided in the embodiment of the present application can be applied to Arabic vowel recovery devices, such as terminals: mobile phones, computers, etc. Optionally, Figure 5 The hardware structure diagram of the Arabic vowel restoration device is shown in FIG. Figure 5 ,The hardware structure of the Arabic vowel restoration device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0204] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0205] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0206] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0207] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to:
[0208] Get the Arabic text to be processed;
[0209] Determining the feature representation of each word in the to-be-processed Arabic text using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations;
[0210] Obtaining text features of each character in the Arabic text to be processed;
[0211] Based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs, the vowel marking results corresponding to each character in the Arabic text to be processed are determined.
[0212] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0213] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0214] Get the Arabic text to be processed;
[0215] Determining the feature representation of each word in the to-be-processed Arabic text using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations;
[0216] Obtaining text features of each character in the Arabic text to be processed;
[0217] Based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs, the vowel marking results corresponding to each character in the Arabic text to be processed are determined.
[0218] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0219] Furthermore, an embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes any one of the implementations of the above-mentioned Arabic vowel recovery method.
[0220] Finally, it should be noted that, in this article, 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 "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0221] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0222] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An Arabic vowel restoration method, characterized in that: include: Get the Arabic text to be processed; Determining the feature representation of each word in the to-be-processed Arabic text using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations; Obtaining text features of each character in the Arabic text to be processed; Determining vowel marking results corresponding to each character in the Arabic text to be processed based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs; Wherein, in the process of determining the vowel labeling result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs, the text feature of each character in the Arabic text to be processed and the feature representation of the word to which the character belongs are fused to determine the vowel labeling result corresponding to each character in the Arabic text to be processed based on the fused features; The process of obtaining text features of each character in the Arabic text to be processed, and determining vowel marking results corresponding to each character in the Arabic text to be processed based on the text features and feature representations of the words to which each character belongs, includes: Processing the to-be-processed Arabic text and the feature representation of each word therein by using the pre-trained vowel restoration model to obtain vowel annotation results corresponding to each character in the to-be-processed Arabic text output by the vowel restoration model; The vowel restoration model is obtained by training using an Arabic training text with vowel annotation results and a feature representation of each word in the Arabic training text as training data.
2. The method according to claim 1, characterized in that The training process of the language model includes: Get Arabic training text without vowel markings; Randomly masking characters in the Arabic training text and inputting the characters into a language model; The language model is trained with the goal of predicting occluded characters in the Arabic training text.
3. The method according to claim 1, characterized in that The step of determining vowel marking results corresponding to each character in the Arabic text to be processed based on the text features of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs includes: Fusion of the text features of each character in the Arabic text to be processed with the feature representation of the word to which the character belongs, to obtain a fused feature representation of the Arabic text to be processed; Based on the fused feature representation of the Arabic text to be processed, a vowel marking result corresponding to each character in the Arabic text to be processed is determined.
4. The method according to claim 1, characterized in that: The process of processing the Arabic text to be processed and the feature representation of each word therein by using the pre-trained vowel restoration model comprises: Using the feature extraction layer of the vowel restoration model, obtaining text features of each character in the Arabic text to be processed; Using the feature fusion layer of the vowel restoration model, the text feature of each character in the Arabic text to be processed is fused with the feature representation of the word to which the character belongs, so as to obtain a fused feature representation of the Arabic text to be processed; The classification layer of the vowel restoration model is used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the fusion feature representation of the Arabic text to be processed.
5. The method according to claim 4, characterized in that The step of using the feature extraction layer of the vowel recovery model to obtain the text feature of each character in the Arabic text to be processed includes: Using the first feature extraction layer of the vowel recovery model, obtaining the encoding feature of each character in the Arabic text to be processed; The second feature extraction layer of the vowel recovery model is used to obtain the character features of each character in the Arabic text to be processed within a set length window, and the coding features and the character features are combined into text features of the characters.
6. The method according to claim 1, characterized in that Before determining the feature representation of each word in the Arabic text to be processed by using the pre-trained language model, the method further includes: If it is detected that the Arabic text to be processed contains numeric symbols, the numeric symbols are converted into Arabic pronounced words, and vowels are marked on the characters other than the last character in the converted Arabic pronounced words.
7. The method according to claim 1, characterized in that The training process of the vowel restoration model includes: Using the classical Arabic training text with vowel annotation results and the feature representation of each word in the classical Arabic training text as training data, training an initial vowel recovery model; The modern Arabic training text with vowel annotation results and the feature representation of each word in the modern Arabic training text are used as training data to fine-tune the initial vowel restoration model to obtain a final vowel restoration model.
8. The method according to claim 7, characterized in that The process of obtaining the modern Arabic training text with vowel marking results includes: Acquire a modern Arabic training text, wherein characters other than the last character in the modern Arabic training text are marked with vowels; The digital symbols contained in the modern Arabic training text are converted into Arabic pronunciation words, and vowels are marked on the characters other than the last character in the converted Arabic pronunciation words.
9. The method according to any one of claims 1 to 8, characterized in that: Also includes: The vowel marking results corresponding to the determined characters in the Arabic text to be processed are corrected with reference to the set vowel marking rules.
10. The method according to claim 9, characterized in that The vowel marking rules include vowel marking rules for a first type of words, and / or vowel marking rules for a second type of words, and / or vowel marking rules for a third type of words, the first type of words are words with fixed vowel marking forms, the second type of words are words whose final characters determine the word position and only the case position changes, and the third type of words are words composed of articles and nouns; The step of correcting the vowel marking results corresponding to the respective characters in the Arabic text to be processed by referring to the set vowel marking rules comprises: Detecting whether the to-be-processed Arabic text contains a first type of word, and if so, replacing the vowel marking results of each character of the first type of word in the vowel marking results of the to-be-processed Arabic text with the configured vowel marking results corresponding to each character of the first type of word; and / or, Detecting whether the Arabic text to be processed contains a second type of word, and if so, replacing the vowel marking results of the corresponding characters in the second type of word in the vowel marking results of the Arabic text to be processed with the configured vowel marking results of each character other than the last character in the second type of word; and / or, Detecting whether the Arabic text to be processed contains a compound word composed of an article and a noun, and if so, processing the noun with reference to the vowel marking rules for the first type of words and the second type of words, and determining whether the compound word containing the article is in the middle or the beginning of the sentence for the article; If it is in the middle of the sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the first article; If it is at the beginning of a sentence, the vowel marking result of the character corresponding to the article in the Arabic text to be processed is replaced by the configured vowel marking form of the second article.
11. An Arabic vowel restoration device, characterized in that: include: A text acquisition unit, used for acquiring the Arabic text to be processed; A word feature representation determination unit, used to determine the feature representation of each word in the Arabic text to be processed by using a pre-trained language model, wherein the language model is trained based on an Arabic training text without vowel annotations; A character text feature acquisition unit, used to acquire the text feature of each character in the Arabic text to be processed; A vowel marking result determining unit, used to determine the vowel marking result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs; Wherein, in the process of determining the vowel labeling result corresponding to each character in the Arabic text to be processed based on the text feature of each character in the Arabic text to be processed and the feature representation of the word to which each character belongs, the text feature of each character in the Arabic text to be processed and the feature representation of the word to which the character belongs are fused to determine the vowel labeling result corresponding to each character in the Arabic text to be processed based on the fused features; The process of the vowel marking result determination unit acquiring text features of each character in the Arabic text to be processed, and determining the vowel marking results corresponding to each character in the Arabic text to be processed based on the text features and the feature representation of the word to which each character belongs, includes: Processing the to-be-processed Arabic text and the feature representation of each word therein by using the pre-trained vowel restoration model to obtain vowel annotation results corresponding to each character in the to-be-processed Arabic text output by the vowel restoration model; The vowel restoration model is obtained by training using an Arabic training text with vowel annotation results and a feature representation of each word in the Arabic training text as training data.
12. An Arabic vowel restoration device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the steps of the Arabic vowel restoration method according to any one of claims 1 to 10.
13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the Arabic vowel restoration method according to any one of claims 1 to 10 is implemented.
