Part-of-speech tagging method, device and computer-readable storage medium

By obtaining the word segmentation standard word vectors in multilingual texts and using part-of-speech labeling model for annotation, and correcting based on the part-of-speech part-of-speech part-of-speech part-of-speech, the problem of inaccurate word segmentation in multilingual texts is solved, and the accuracy and efficiency of part-of-speech labeling is improved.

CN111832297BActive Publication Date: 2025-04-11BEIJING XIAOMI PINECONE ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010544136.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-15
Publication Date
2025-04-11
Estimated Expiration
2040-06-15

AI Technical Summary

Technical Problem

In multilingual text, it is difficult for the prior art to accurately annotate part-of-speech words to newly emerged part-of-speech words, and methods based on part-of-speech marking models are prone to inaccurate labeling due to the dependence on randomly initialized word vectors.

Method used

The standard word vectors corresponding to word segmentation in multilingual texts and obtain the part-of-speech annotation result using the part-of-speech annotation model. For participles whose confidence does not meet the requirements, the participle of speech is corrected based on the participle of the previous participle in the statement to which it belongs to, and the participle of speech is determined.

Benefits of technology

It improves the accuracy of part-of-word annotation in multilingual text, reduces the workload of maintaining the mapping table, and avoids the problem of inaccurate annotation caused by random word vectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111832297B_ABST
    Figure CN111832297B_ABST
Patent Text Reader

Abstract

This disclosure relates to a part-of-speech tagging method, apparatus, and computer-readable storage medium. The method includes: acquiring standard word vectors corresponding to each word segment in a multilingual text, wherein the standard word vectors are word vectors of the word segments in a target vector space; obtaining part-of-speech tagging results for each word segment through a part-of-speech tagging model, wherein the part-of-speech tagging results include the part-of-speech and confidence level of the word segment; and determining the part-of-speech of the target word segment corresponding to the part-of-speech tagging results whose confidence levels do not meet the confidence level requirements, based on the part-of-speech of the preceding word segment in the sentence to which the target word segment belongs. Therefore, a unified representation of each word segment in a multilingual text can be achieved, improving the accuracy of part-of-speech tagging results, reducing the workload required to train part-of-speech tagging models in multiple languages, and providing accurate data support for subsequent language processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of natural language processing, and in particular to a part-of-speech tagging method, device, and computer-readable storage medium. Background Art

[0002] In the process of Chinese natural language processing, part-of-speech tagging is a basic task, which means labeling each word in the word segmentation result with a correct part-of-speech, so as to facilitate syntactic analysis of sentences, knowledge graph construction, etc. However, when there are texts in other languages ​​in the text to be processed, it is difficult to accurately label the part-of-speech of the words in the text to be processed using a single Chinese part-of-speech tagging model.

[0003] In the related art, when performing part-of-speech tagging of multilingual texts, a "part-of-speech" mapping table is usually maintained for commonly used part-of-speech in other languages, so that when performing part-of-speech tagging of texts in other languages, the part-of-speech tagging can be performed based on the mapping table. Alternatively, based on the idea of ​​adversarial training, adversarial training is added to the part-of-speech tagging model to achieve part-of-speech tagging of part-of-speech in multilingual texts. However, in the above manner, if a new part-of-speech appears, the workload of maintaining the mapping table will be greatly increased; when tagging based on the part-of-speech tagging model, a word vector will be randomly initialized for the part-of-speech, and the part-of-speech tagging will be performed on the part-of-speech based on the word vector, and the tagging result for the new part-of-speech will be insufficiently accurate. Summary of the invention

[0004] To overcome the problems existing in the related art, the present disclosure provides a part-of-speech tagging method, device and computer-readable storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a part-of-speech tagging method is provided, comprising:

[0006] Obtaining a standard word vector corresponding to each word segmentation in a multilingual text, wherein the standard word vector is a word vector of the word segmentation in a target vector space;

[0007] Obtaining a part-of-speech tagging result for each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech;

[0008] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target participle is determined according to the part-of-speech of a preceding participle that precedes the target participle in a sentence to which the target participle belongs.

[0009] Optionally, determining the part of speech of the target participle according to the part of speech of a preceding participle located before the target participle in the sentence to which the target participle belongs includes:

[0010] Obtaining a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence;

[0011] Determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence;

[0012] The part of speech of the target word segment is determined according to the syntactic accuracy measurement information.

[0013] Optionally, the determining to use multiple parts of speech one by one as the assumed parts of speech of the target participle, and adding the assumed parts of speech of the target participle to the end of the part-of-speech sequence, the syntactic accuracy measurement information corresponding to the new part-of-speech sequence obtained includes:

[0014] The new part-of-speech sequence is input into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts-of-speech output by the sequence labeling model.

[0015] Optionally, the sequence labeling model is obtained in the following manner:

[0016] Acquire training sentences and syntactic accuracy measurement information of the training sentences;

[0017] Obtaining a part-of-speech sequence of the training sentence according to the part-of-speech of each participle in the training sentence and the order in which each participle appears in the training sentence;

[0018] The part-of-speech sequence of the training sentence is used as a model input parameter, and the syntactic accuracy measurement information of the training sentence is used as a model output parameter, and the preset model is trained to obtain the sequence labeling model.

[0019] Optionally, determining the part of speech of the target word segment according to the syntactic accuracy measurement information includes:

[0020] The assumed part of speech corresponding to the minimum syntactic accuracy measure information is determined as the part of speech of the target word segmentation.

[0021] Optionally, the step of obtaining a standard word vector corresponding to each word segment in the multilingual text includes:

[0022] For each word segment in the multilingual text, input the word segment into a word vector model corresponding to the language of the word segment to obtain an initial word vector of the word segment;

[0023] The initial word vector of each word segment is mapped to the target vector space to obtain the standard word vector corresponding to each word segment.

[0024] Optionally, for a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, determining the part-of-speech of the target participle according to the part-of-speech of a preceding participle located before the target participle in a sentence to which the target participle belongs includes:

[0025] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, when the language corresponding to the target participle is a non-Chinese language, the part-of-speech of the target participle is determined based on the part-of-speech of a preceding participle that precedes the target participle in the sentence to which the target participle belongs.

[0026] According to a second aspect of an embodiment of the present disclosure, a part-of-speech tagging device is provided, the device comprising:

[0027] An acquisition module is configured to acquire a standard word vector corresponding to each word segment in a multilingual text, wherein the standard word vector is a word vector of the word segment in a target vector space;

[0028] A tagging module is configured to obtain a part-of-speech tagging result of each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech;

[0029] The determination module is configured to determine the part of speech of the target participle corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement according to the part of speech of the previous participle located before the target participle in the sentence to which the target participle belongs.

[0030] Optionally, the determining module includes:

[0031] A processing submodule is configured to obtain a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence;

[0032] A first determination submodule is configured to determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participle one by one and adding the assumed parts-of-speech of the target participle to the end of the part-of-speech sequence;

[0033] The second determination submodule is configured to determine the part of speech of the target word segmentation according to the syntactic accuracy measurement information.

[0034] Optionally, the first determining submodule includes:

[0035] The first input submodule is configured to input the new part-of-speech sequence into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts of speech output by the sequence labeling model.

[0036] Optionally, the sequence labeling model is obtained in the following manner:

[0037] Acquire training sentences and syntactic accuracy measurement information of the training sentences;

[0038] Obtaining a part-of-speech sequence of the training sentence according to the part-of-speech of each participle in the training sentence and the order in which each participle appears in the training sentence;

[0039] The part-of-speech sequence of the training sentence is used as a model input parameter, and the syntactic accuracy measurement information of the training sentence is used as a model output parameter, and the preset model is trained to obtain the sequence labeling model.

[0040] Optionally, the second determining submodule is configured to:

[0041] The assumed part of speech corresponding to the minimum syntactic accuracy measure information is determined as the part of speech of the target word segmentation.

[0042] Optionally, the acquisition module includes:

[0043] The second input submodule is configured to input each segmentation in the multilingual text into a word vector model corresponding to the language of the segmentation to obtain an initial word vector of the segmentation;

[0044] The mapping submodule is configured to map the initial word vector of each word segment to the target vector space to obtain the standard word vector corresponding to each word segment.

[0045] Optionally, the determining module is configured to:

[0046] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, when the language corresponding to the target participle is a non-Chinese language, the part-of-speech of the target participle is determined based on the part-of-speech of a preceding participle that precedes the target participle in the sentence to which the target participle belongs.

[0047] According to a third aspect of an embodiment of the present disclosure, a part-of-speech tagging device is provided, including:

[0048] processor;

[0049] a memory for storing processor-executable instructions;

[0050] Wherein, the processor is configured to:

[0051] Obtaining a standard word vector corresponding to each word segmentation in a multilingual text, wherein the standard word vector is a word vector of the word segmentation in a target vector space;

[0052] Obtaining a part-of-speech tagging result for each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech;

[0053] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target participle is determined according to the part-of-speech of a preceding participle that precedes the target participle in a sentence to which the target participle belongs.

[0054] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of any method described in the first aspect are implemented.

[0055] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0056] In the above technical solution, the standard word vector corresponding to each word segment in the multilingual text is obtained, and the part-of-speech tagging result of each word segment is obtained through the part-of-speech tagging model, and the part-of-speech tagging result includes the part-of-speech corresponding to the word segment and the confidence under the part-of-speech, and for the target word segment corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target word segment is determined according to the part-of-speech of the previous word before the target word segment in the sentence to which the target word segment belongs. Through the above technical solution, each word segment in the multilingual text can be uniformly represented, which is convenient for tagging each word segment in the multilingual text based on a unified part-of-speech tagging model, which can not only improve the accuracy of the part-of-speech tagging results, but also effectively reduce the workload required for training part-of-speech tagging models in multiple languages. In addition, the part-of-speech tagging results of the word segmentation can be judged, and when its confidence does not meet the confidence requirement, the part-of-speech of the word segmentation can be marked based on the part-of-speech of the word segmentation in the sentence to which the word segmentation belongs, thereby avoiding the problem of inaccurate tagging that may occur when new word segmentations are directly marked based on the part-of-speech tagging model in related technologies, and can further improve the accuracy of part-of-speech tagging of word segmentations, providing accurate data support for subsequent language processing processes.

[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0059] Figure 1 The figure is a flowchart of a part-of-speech tagging method according to an exemplary embodiment.

[0060] Figure 2 The present invention is a flowchart of an exemplary implementation method for determining the part of speech of a target participle according to the part of speech of a preceding participle located before the target participle in a sentence to which the target participle belongs according to an exemplary embodiment.

[0061] Figure 3 The figure is a block diagram of a part-of-speech tagging device according to an exemplary embodiment.

[0062] Figure 4 The figure is a block diagram of a part-of-speech tagging device according to an exemplary embodiment.

[0063] Figure 5 The figure is a block diagram of a part-of-speech tagging device according to an exemplary embodiment. DETAILED DESCRIPTION

[0064] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0065] As described in the background technology, when performing part-of-speech tagging on the segmented words of multilingual texts, for newly appearing segmented words, the new segmented words and their corresponding part-of-speech need to be added to the mapping table for maintenance, which greatly increases the workload required to maintain the mapping table, and when a segmented word has multiple parts-of-speech, it is more difficult to perform part-of-speech tagging on such segmented words based on the mapping table. When performing part-of-speech tagging on segmented words based on the part-of-speech tagging model, since the newly appearing segmented words use a random initial word vector method, the same processing method is used for each segmented word, which will lead to the problem of over-reliance on the word vector, and it is difficult to ensure the accuracy of the segmented word part-of-speech tagging. Based on this, the present disclosure provides the following embodiments to solve the above problems.

[0066] Figure 1 is a flowchart of a method for part-of-speech tagging according to an exemplary embodiment. Figure 1 As shown, the following steps are included.

[0067] In step 11, a standard word vector corresponding to each word segment in the multilingual text is obtained, where the standard word vector is the word vector of the word segment in the target vector space.

[0068] The multilingual text is a text containing characters in multiple languages, for example, a text in multiple languages ​​in one sentence. In the technical solution disclosed herein, the standard word vector is the word vector of the word segmentation in the target vector space. Therefore, by determining the standard word vector corresponding to each word segmentation in the multilingual text, the word vectors of the text in multiple languages ​​can be uniformly represented using the same standard, providing a basis for the subsequent unified processing of each word segmentation in the multilingual text.

[0069] In step 12, a part-of-speech tagging result of each word segment is obtained through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the word segment and the confidence under the part-of-speech.

[0070] As an example, the part-of-speech tagging model can be a model trained based on BiLSTM and CRF (conditional random field), wherein BiLSTM (Bi-directional Long Short-Term Memory) is composed of a forward LSTM and a backward LSTM, and LSTM (Long Short-Term Memory) is a time-recurrent neural network. Wherein, the method of obtaining the part-of-speech tagging model by BiLSTM and CRF is a common technology in the art and is not repeated here. Wherein, the word vectors of the word segments of the multilingual text in the present disclosure are all word vectors in the target vector space. Therefore, when training the part-of-speech tagging model, it can be directly trained based on the Chinese training text, that is, the standard word vector corresponding to each word segment in the Chinese training text is obtained, so as to train the part-of-speech tagging model based on the standard word vector corresponding to each word segment in the Chinese training text and the part of speech corresponding to the word segment, which can reduce the requirements for the training text and broaden the scope of use of the part-of-speech tagging model.

[0071] Among them, the confidence corresponding to each word segment under multiple parts of speech in the part-of-speech library can be determined by the part-of-speech tagging model, and then the part-of-speech corresponding to the maximum confidence and the confidence can be output as the part-of-speech tagging result. The part-of-speech corresponding to the word segment in the part-of-speech tagging result output by the above part-of-speech tagging model is the part-of-speech corresponding to the maximum confidence.

[0072] In step 13, for the target participle corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target participle is determined according to the part-of-speech of the preceding participle that precedes the target participle in the sentence to which the target participle belongs.

[0073] In the related art, when a word segment that has not appeared before is annotated through a part-of-speech tagging model, a word vector can be randomly initialized for the word segment, so that the word segment is tagged with the part-of-speech based on the word vector, and the part-of-speech in the part-of-speech tagging result is determined as the part-of-speech of the word segment. At this time, the accuracy of the part-of-speech tagging result for the word segment will be overly dependent on the accuracy of the word vector, and the accuracy of the part-of-speech tagging of the word segment is difficult to guarantee.

[0074] In the embodiment of the present disclosure, after obtaining the part-of-speech tagging result, the confidence in the part-of-speech tagging result can be judged. For example, the confidence requirement can be set according to the actual usage scenario. For example, the confidence requirement can be set to a confidence greater than 0.8. If the part-of-speech in the part-of-speech tagging result of the determined word segment A is a noun and the confidence is 0.85, it can be determined that the confidence in the part-of-speech tagging result of the word segment A meets the confidence requirement. At this time, the part-of-speech in the part-of-speech tagging result can be determined as the part-of-speech of the word segment A, that is, the part-of-speech corresponding to the word segment A is a noun.

[0075] If the part of speech in the part-of-speech tagging result of word segmentation B is determined to be a verb and the confidence is 0.4, then the confidence in the part-of-speech tagging result of word segmentation B does not meet the confidence requirement, indicating that it is inaccurate to tag word segmentation B as a verb. The applicant has found through research that the part of speech of a participle is not only related to the participle itself, but also to the position of the participle in the sentence. Therefore, in this case, the part of speech of participle B can be determined based on the part of speech of the previous participle that precedes participle B in the sentence to which participle B belongs, that is, the part of speech of participle B is corrected by the part of speech of other participles in the sentence to which participle B belongs, rather than determining the part of speech of the participle based solely on the word vector of participle B itself.

[0076] In the above technical solution, the standard word vector corresponding to each word segment in the multilingual text is obtained, and the part-of-speech tagging result of each word segment is obtained through the part-of-speech tagging model, and the part-of-speech tagging result includes the part-of-speech corresponding to the word segment and the confidence under the part-of-speech, and for the target word segment corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target word segment is determined according to the part-of-speech of the previous word before the target word segment in the sentence to which the target word segment belongs. Through the above technical solution, each word segment in the multilingual text can be uniformly represented, which is convenient for tagging each word segment in the multilingual text based on a unified part-of-speech tagging model, which can not only improve the accuracy of the part-of-speech tagging results, but also effectively reduce the workload required for training part-of-speech tagging models in multiple languages. In addition, the part-of-speech tagging results of the word segmentation can be judged, and when its confidence does not meet the confidence requirement, the part-of-speech of the word segmentation can be marked based on the part-of-speech of the word segmentation in the sentence to which the word segmentation belongs, thereby avoiding the problem of inaccurate tagging that may occur when new word segmentations are directly marked based on the part-of-speech tagging model in related technologies, and can further improve the accuracy of part-of-speech tagging of word segmentations, providing accurate data support for subsequent language processing processes.

[0077] In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the above steps are described in detail below.

[0078] Optionally, the exemplary implementation of obtaining the standard word vector corresponding to each word segment in the multilingual text is as follows, and this step may include:

[0079] For each word segment in the multilingual text, the word segment is input into a word vector model corresponding to the language of the word segment to obtain an initial word vector of the word segment.

[0080] Among them, the word vector model corresponding to each language can be trained separately based on the word vector training method Word2vec, so as to obtain the vector (Embedding) representation of the word segmentation. For example, the word vector model corresponding to Chinese can be obtained based on a large amount of Chinese corpus training, and the word vector model corresponding to English can be obtained based on a large amount of English corpus training. Taking "You learn my method" as an example, the word segments corresponding to the multilingual text are {you, study, down, my, method}, then the word segmentation "study" can be input into the word vector model corresponding to Chinese to obtain the initial word vector V1 of the word segmentation "study", and the word segmentation "method" can be input into the word vector model corresponding to English to obtain the initial word vector V2 of the word segmentation "method". The method of obtaining the initial word vectors of other word segmentations is similar to that described above, and will not be repeated here.

[0081] Afterwards, the initial word vector of each word segmentation can be mapped to the target vector space to obtain the standard word vector corresponding to each word segmentation.

[0082] For example, based on an unsupervised self-learning method, the initial word vector of each word segment obtained above can be mapped to the target vector space so that it obeys the same distribution in the target vector space, and the vector representation of each word segment in the target vector space is used as its corresponding standard word vector to achieve a unified representation of word vectors of word segments in different languages. It should be noted that in actual usage scenarios, multiple languages ​​may be mixed in a sentence, such as Chinese, English, Korean, etc., which can all be obtained in the above way. The standard word vector corresponding to the word segmentation can be accurately labeled based on the subsequent steps.

[0083] Through the above technical solution, the word vectors of word segments in different languages ​​can be uniformly represented to effectively avoid the problem of inconsistent distribution of vector representations of word segments corresponding to different languages, facilitate unified processing of each word segment in multilingual texts, effectively simplify the process of word segmentation part-of-speech tagging, and improve the accuracy and efficiency of part-of-speech tagging.

[0084] Optionally, the exemplary implementation of determining the part of speech of the target participle according to the part of speech of the preceding participle located before the target participle in the sentence to which the target participle belongs is as follows: Figure 2 As shown, this step may include:

[0085] In step 21, a part-of-speech sequence is obtained according to the part-of-speech of each preceding participle before the target participle in the sentence and the order of appearance of each preceding participle in the sentence.

[0086] Among them, when obtaining the part-of-speech tagging result of each participle, the confidence judgment of the part-of-speech tagging result can be performed according to the order of appearance of the participle in the sentence. Therefore, when it is determined that the confidence of the target participle does not meet the confidence requirement, the part-of-speech of the participle before the target participle has been accurately determined. Below, taking "You learn my method" as an example, for example, if the confidence in the part-of-speech tagging result of the participle method does not meet the confidence requirement, that is, the participle "method" is the target participle, then the corresponding part-of-speech of the previous participle and the order of appearance of the online participle are:

[0087] you: pronoun, r;

[0088] learn: verb, v;

[0089] Next: adverb, d;

[0090] I: pronoun, r; de: auxiliary word, u.

[0091] Therefore, the parts of speech of each preceding participle can be merged according to the order in which they appear in the sentence to obtain a part-of-speech sequence. The part-of-speech sequence corresponding to the preceding participle is (r, v, d, r, u).

[0092] In step 22, it is determined that the syntactic accuracy measurement information corresponding to the new part-of-speech sequence is obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence.

[0093] For example, each part of speech in the part of speech library can be used as the assumed part of speech of the target participle one by one, so as to obtain the syntactic accuracy measurement information corresponding to the new part of speech sequence of each part of speech. For example, a part of speech in the part of speech library can be randomly used as the assumed part of speech of the target participle, such as taking noun n as the assumed part of speech of the target participle, then the new part of speech sequence obtained after adding the target noun is (r, v, d, r, u, n), and then the syntactic accuracy measurement information corresponding to the new part of speech sequence (r, v, d, r, u, n) can be determined. Afterwards, the assumed part of speech of the target participle is re-determined, such as adjective a, and the new part of speech sequence obtained at this time is (r, v, d, r, u, a), and similarly, the syntactic accuracy measurement information corresponding to the new part of speech sequence (r, v, d, r, u, a) can be determined. Therefore, through the above process, the new part of speech sequence generated by the target participle under each assumed part of speech can be determined, and then the syntactic accuracy measurement information corresponding to the new part of speech sequence can be determined.

[0094] Optionally, the step of determining to use multiple parts of speech as the assumed parts of speech of the target word one by one and adding the assumed parts of speech of the target word to the end of the part of speech sequence, and obtaining the syntactic accuracy measurement information corresponding to the new part of speech sequence is implemented as follows, and the step may include:

[0095] The new part-of-speech sequence is input into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts-of-speech output by the sequence labeling model.

[0096] The sequence labeling model may be a bi-gram language model, and the sequence labeling model may be obtained in the following manner:

[0097] Obtain training sentences and syntactic accuracy measurement information of the training sentences. In order to facilitate the acquisition of training corpus and reduce the amount of training data, the training sentences can be obtained only based on Chinese corpus. The part of speech of each word segment in the training sentence is accurately marked, and the syntactic accuracy measurement information is manually marked. The syntactic accuracy measurement information can be a PPL (Perplexity) perplexity parameter, which can be used to evaluate a language model. The smaller the PPL parameter is, the higher the accuracy of the language model is, and the greater the probability that the part-of-speech sequence forms a sentence, that is, the syntactic accuracy of the sentence formed by the part-of-speech sequence is higher. The calculation method of the PPL parameter is a prior art and will not be repeated here.

[0098] Afterwards, the part-of-speech sequence of the training sentence is obtained according to the part-of-speech of each participle in the training sentence and the order of appearance of each participle in the training sentence. For example, the marked part-of-speech of each participle in the training sentence can be extracted, and based on the order of appearance of the participle in the training sentence, the extracted part-of-speech of each participle is merged to obtain the part-of-speech sequence of the training sentence, wherein the specific merging method has been described in detail above.

[0099] The part-of-speech sequence of the training sentence is used as a model input parameter, and the syntactic accuracy measurement information of the training sentence is used as a model output parameter, and the preset model is trained to obtain the sequence labeling model. The preset model can be a bi-gram language model, and the bi-gram model can be trained based on the existing language model training method to obtain the sequence labeling model.

[0100] In the embodiments of the present disclosure, the sequence annotation model is trained by the part-of-speech sequence of the training sentence, so that the sequence annotation model can judge the syntactic accuracy of the formed sentence based on the part-of-speech features of the segmented words, without regard to the word content of the segmented words themselves. Therefore, through the above technical solution, the syntactic accuracy of the sentence formed by the input segmented word sequence can be effectively judged by the sequence annotation model, so that the part-of-speech of the segmented words in the sentence can be determined based on the syntax of the sentence, further improving the accuracy of the part-of-speech tagging.

[0101] Transfer back Figure 2 ,In step 23, the part of speech of the target word segmentation is determined according to the syntactic accuracy measurement information.

[0102] For example, from the above description, it can be seen that the smaller the parameter value of the syntactic accuracy measurement information, the more accurate the syntax of the new part-of-speech sequence forming a sentence is. Therefore, the assumed part-of-speech corresponding to the minimum syntactic accuracy measurement information can be determined as the part-of-speech of the target word segmentation.

[0103] Continuing with the above example, if the syntactic accuracy measurement information determined according to the new part-of-speech sequence (r, v, d, r, u, n) is PPL1, and the syntactic accuracy measurement determined according to the new part-of-speech sequence (r, v, d, r, u, a) is PPL2, where PPL1 is less than PPL2, and PPL1 is the minimum value of multiple syntactic accuracy measurement information corresponding to the target participle under multiple assumed parts of speech, then the part of speech of the target participle can be determined by the assumed part of speech corresponding to PPL1, that is, the noun n is determined as the part of speech of the target participle method.

[0104] Through the above technical scheme, the part of speech of the target participle can be marked based on the part of speech of the previous participle in the sentence to which the target participle belongs, and the fluency and syntactic accuracy of the sentence can be determined through the sequence labeling model, so that the part of speech of the target participle can be corrected based on the syntactic features of the sentence formed by the participle, thereby improving the accuracy of the participle labeling results, and ensuring the syntactic accuracy of the sentence after part of speech labeling, providing accurate data support for the downstream natural language processing process.

[0105] Optionally, for a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, determining the part-of-speech of the target participle according to the part-of-speech of a preceding participle located before the target participle in a sentence to which the target participle belongs includes:

[0106] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, when the language corresponding to the target participle is a non-Chinese language, the part-of-speech of the target participle is determined based on the part-of-speech of a preceding participle that precedes the target participle in the sentence to which the target participle belongs.

[0107] Among them, as mentioned above, the part-of-speech tagging model can be trained directly based on Chinese corpus, so the part-of-speech tagging results output for word segmentations corresponding to the Chinese language are relatively accurate. Based on this, in the present disclosure, there is no need to correct the part-of-speech tagging results of word segmentations corresponding to the Chinese language, that is, when the language corresponding to the word segmentation is Chinese, the part of speech in the part-of-speech tagging result corresponding to the word segmentation can be directly determined as the part of speech of the word segmentation, thereby improving the efficiency of word segmentation tagging.

[0108] When the language corresponding to the word segmentation is not Chinese (such as English or Korean), it is necessary to verify the confidence in the part-of-speech tagging result of the word segmentation to determine whether the confidence meets the confidence requirement. When the confidence of the word segmentation meets the confidence requirement, it means that the part-of-speech tagging result of the word segmentation is credible, that is, the part-of-speech tagging result is accurate. At this time, the part-of-speech in the part-of-speech tagging result can be determined as the part-of-speech of the word segmentation; when the confidence of the word segmentation does not meet the confidence requirement, it means that the part-of-speech tagging result output by the part-of-speech tagging model is unreliable, that is, the part-of-speech tagging result is not necessarily accurate. At this time, the word segmentation can be processed in the next step, that is, the part-of-speech of the target word segmentation is determined according to the part-of-speech of the previous word before the target word segmentation in the sentence to which the target word segmentation belongs, so as to ensure the accuracy of the part-of-speech tagging of each word segmentation. Therefore, through the above technical solution, it is only necessary to verify the part-of-speech tagging results output by the part-of-speech tagging model for word segmentation in non-Chinese languages, which can reduce the workload of part-of-speech tagging to a certain extent and improve the efficiency of word segmentation tagging. At the same time, it can also effectively ensure the accuracy of the part-of-speech tagging results and improve the user experience.

[0109] Figure 3 FIG. 1 is a block diagram of a part-of-speech tagging device according to an exemplary embodiment. Figure 3 The device 100 includes an acquisition module 101, a labeling module 102 and a determination module 103.

[0110] An acquisition module 101 is configured to acquire a standard word vector corresponding to each word segment in a multilingual text, wherein the standard word vector is a word vector of the word segment in a target vector space;

[0111] The tagging module 102 is configured to obtain a part-of-speech tagging result of each of the segmented words through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the segmented word and the confidence under the part-of-speech;

[0112] The determination module 103 is configured to determine the part of speech of the target participle corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement according to the part of speech of the preceding participle located before the target participle in the sentence to which the target participle belongs.

[0113] Optionally, the determining module 103 includes:

[0114] A processing submodule is configured to obtain a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence;

[0115] A first determination submodule is configured to determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participle one by one and adding the assumed parts-of-speech of the target participle to the end of the part-of-speech sequence;

[0116] The second determination submodule is configured to determine the part of speech of the target word segmentation according to the syntactic accuracy measurement information.

[0117] Optionally, the first determining submodule includes:

[0118] The first input submodule is configured to input the new part-of-speech sequence into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts of speech output by the sequence labeling model.

[0119] Optionally, the sequence labeling model is obtained in the following manner:

[0120] Acquire training sentences and syntactic accuracy measurement information of the training sentences;

[0121] Obtaining a part-of-speech sequence of the training sentence according to the part-of-speech of each participle in the training sentence and the order in which each participle appears in the training sentence;

[0122] The part-of-speech sequence of the training sentence is used as a model input parameter, and the syntactic accuracy measurement information of the training sentence is used as a model output parameter, and the preset model is trained to obtain the sequence labeling model.

[0123] Optionally, the second determining submodule is configured to:

[0124] The assumed part of speech corresponding to the minimum syntactic accuracy measure information is determined as the part of speech of the target word segmentation.

[0125] Optionally, the acquisition module 101 includes:

[0126] The second input submodule is configured to input each segmentation in the multilingual text into a word vector model corresponding to the language of the segmentation to obtain an initial word vector of the segmentation;

[0127] The mapping submodule is configured to map the initial word vector of each word segment to the target vector space to obtain the standard word vector corresponding to each word segment.

[0128] Optionally, the determining module 103 is configured to:

[0129] For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, when the language corresponding to the target participle is a non-Chinese language, the part-of-speech of the target participle is determined based on the part-of-speech of a preceding participle that precedes the target participle in the sentence to which the target participle belongs.

[0130] 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.

[0131] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the part-of-speech tagging method provided by the present disclosure.

[0132] Figure 4 4 is a block diagram of a part-of-speech tagging device 400 according to an exemplary embodiment. For example, the device 400 may be a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0133] Reference Figure 4 , the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0134] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned part-of-speech tagging method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.

[0135] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0136] The power component 406 provides power to the various components of the device 400. The power component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 400.

[0137] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0138] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0139] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0140] The sensor assembly 414 includes one or more sensors for providing various aspects of the status assessment of the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400, and the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0141] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0142] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned part-of-speech tagging method.

[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the apparatus 400 to complete the above-mentioned part-of-speech tagging method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0144] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned part-of-speech tagging method when executed by the programmable device.

[0145] Figure 5 is a block diagram of a part-of-speech tagging apparatus 500 according to an exemplary embodiment. For example, the apparatus 500 may be provided as a server. Figure 5 The apparatus 500 includes a processing component 522, which further includes one or more processors, and a memory resource represented by a memory 532 for storing instructions executable by the processing component 522, such as an application. The application stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 522 is configured to execute instructions to perform the above-mentioned part-of-speech tagging method.

[0146] The device 500 may also include a power supply component 526 configured to perform power management of the device 500, a wired or wireless network interface 550 configured to connect the device 500 to a network, and an input / output (I / O) interface 558. The device 500 may operate based on an operating system stored in the memory 532, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0147] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0148] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A part-of-speech tagging method, characterized in that: include: Obtaining a standard word vector corresponding to each word segmentation in a multilingual text, wherein the standard word vector is a word vector of the word segmentation in a target vector space; Obtaining a part-of-speech tagging result of each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech; For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, determine the part-of-speech of the target participle according to the part-of-speech of a preceding participle located before the target participle in the sentence to which the target participle belongs; The step of determining the part of speech of the target participle according to the part of speech of a preceding participle located before the target participle in the sentence to which the target participle belongs includes: Obtaining a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence; Determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence; Determining the part of speech of the target word segmentation according to the syntactic accuracy measurement information; The syntactic accuracy measurement information corresponding to the new part-of-speech sequence obtained by determining to use multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence includes: The new part-of-speech sequence is input into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts-of-speech output by the sequence labeling model.

2. The method according to claim 1, characterized in that The sequence labeling model is obtained in the following way: Obtaining training sentences and syntactic accuracy measurement information of the training sentences; Obtaining a part-of-speech sequence of the training sentence according to the part-of-speech of each participle in the training sentence and the order in which each participle appears in the training sentence; The part-of-speech sequence of the training sentence is used as a model input parameter, and the syntactic accuracy measurement information of the training sentence is used as a model output parameter, and the preset model is trained to obtain the sequence labeling model.

3. The method according to claim 1, characterized in that The determining the part of speech of the target word segment according to the syntactic accuracy measurement information includes: The assumed part of speech corresponding to the minimum syntactic accuracy measure information is determined as the part of speech of the target word segmentation.

4. The method according to claim 1, characterized in that: The step of obtaining the standard word vector corresponding to each word segment in the multilingual text includes: For each word segment in the multilingual text, input the word segment into a word vector model corresponding to the language of the word segment to obtain an initial word vector of the word segment; The initial word vector of each word segment is mapped to the target vector space to obtain the standard word vector corresponding to each word segment.

5. The method according to claim 1, characterized in that The determining, for a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target participle according to the part-of-speech of a preceding participle located before the target participle in a sentence to which the target participle belongs, includes: In the case where the language corresponding to the target participle is a non-Chinese language, for the target participle corresponding to the part-of-speech tagging result whose confidence does not meet the confidence requirement, the part-of-speech of the target participle is determined according to the part-of-speech of the preceding participle that precedes the target participle in the sentence to which the target participle belongs.

6. A part-of-speech tagging device, characterized in that: The device comprises: An acquisition module is configured to acquire a standard word vector corresponding to each word segment in a multilingual text, wherein the standard word vector is a word vector of the word segment in a target vector space; A tagging module is configured to obtain a part-of-speech tagging result of each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech; A determination module configured to determine the part of speech of a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, according to the part of speech of a preceding participle located before the target participle in the sentence to which the target participle belongs; Wherein, the determination module includes: A processing submodule is configured to obtain a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence; A first determination submodule is configured to determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participle one by one and adding the assumed parts-of-speech of the target participle to the end of the part-of-speech sequence; A second determination submodule is configured to determine the part of speech of the target word segmentation according to the syntactic accuracy measurement information; The first determining submodule includes: The first input submodule is configured to input the new part-of-speech sequence into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts of speech output by the sequence labeling model.

7. A part-of-speech tagging device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Obtaining a standard word vector corresponding to each word segmentation in a multilingual text, wherein the standard word vector is a word vector of the word segmentation in a target vector space; Obtaining a part-of-speech tagging result of each of the participles through a part-of-speech tagging model, wherein the part-of-speech tagging result includes the part-of-speech corresponding to the participle and the confidence under the part-of-speech; For a target participle corresponding to a part-of-speech tagging result whose confidence does not meet the confidence requirement, determine the part-of-speech of the target participle according to the part-of-speech of a preceding participle located before the target participle in the sentence to which the target participle belongs; The step of determining the part of speech of the target participle according to the part of speech of a preceding participle located before the target participle in the sentence to which the target participle belongs includes: Obtaining a part-of-speech sequence according to the part-of-speech of each preceding participle located before the target participle in the sentence and the order of appearance of each preceding participle in the sentence; Determine syntactic accuracy measurement information corresponding to a new part-of-speech sequence obtained by taking multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence; Determining the part of speech of the target word segmentation according to the syntactic accuracy measurement information; The syntactic accuracy measurement information corresponding to the new part-of-speech sequence obtained by determining to use multiple parts-of-speech as the assumed parts-of-speech of the target participial one by one and adding the assumed parts-of-speech of the target participial to the end of the part-of-speech sequence includes: The new part-of-speech sequence is input into a sequence labeling model to obtain the syntactic accuracy measurement information under each of the multiple parts-of-speech output by the sequence labeling model.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Corpus search systems and methods

    US20190005049A1

  • Method and apparatus for ontology construction

    WO2020001373A1