Semantic unit prediction method and device, electronic equipment and storage medium

CN116258146BActive Publication Date: 2026-10-27MASHANG CONSUMER FINANCE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211369623.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2026-10-27
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

然而,目前尚没有一种方式能够提前预测可能出现的新的语义单元

Benefits of technology

[0020]本公开所提供的实施例,能够通过义素拆解得到每个现存语义单元中的多个义素,进而按照义素组合策略将多个义素组合为多个初始义素组,从而根据多个初始义素组与多个现存语义单元之间的匹配结果筛选候选义素组,以便根据候选义素组预测得到未知语义单元。由此可见,该方式能够通过义素组合策略将多个义素灵活组合为各种形式的初始义素组,进而根据初始义素组与现存语义单元之间的匹配结果预测未知语义单元,从而能够提前预测可能出现的新的语义单元。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116258146B_ABST
    Figure CN116258146B_ABST
Patent Text Reader

Abstract

The present disclosure provides a semantic unit prediction method and device, electronic equipment and storage medium. The method comprises: obtaining a plurality of existing semantic units contained in original corpus data; performing a morpheme disassembly process on each existing semantic unit to obtain a plurality of morphemes contained in each existing semantic unit; combining the plurality of morphemes contained in the plurality of existing semantic units according to a morpheme combination strategy to obtain a plurality of initial morpheme groups; matching the plurality of initial morpheme groups with the plurality of existing semantic units, and screening initial morpheme groups that fail to match as candidate morpheme groups; and predicting unknown semantic units according to the candidate morpheme groups. This method can flexibly combine a plurality of morphemes into various forms of initial morpheme groups according to a morpheme combination strategy, and then predict unknown semantic units according to the matching results between the initial morpheme groups and the existing semantic units, so that new semantic units that may appear can be predicted in advance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of language processing technology, and in particular to a method, apparatus, electronic device, and storage medium for predicting semantic units. Background Technology

[0002] Semantic units refer to words, phrases, and other linguistic entities used to represent specific meanings. A language contains a large number of semantic units, which combine to flexibly express various types of semantic information. For example, the combination of words and phrases can form sentences, paragraphs, and other textual content.

[0003] With the development of human activities and the advancement of science and technology, some new semantic units that have never appeared before may emerge. For example, with the widespread use of the Internet, a large number of new Internet-related words have become popular.

[0004] In related technologies, the common approach is to mine new semantic units contained within information transmitted over the internet. For example, analyzing news articles and online forums on the internet and extracting new semantic units based on the analysis results. However, there is currently no way to predict in advance what new semantic units might emerge. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for predicting semantic units in advance.

[0006] In a first aspect, this disclosure provides a method for predicting semantic units, comprising the following steps:

[0007] Obtain multiple existing semantic units contained in the original corpus data;

[0008] Perform semantic decomposition on each existing semantic unit to obtain the multiple semantic elements contained in each existing semantic unit;

[0009] According to the semantic element combination strategy, multiple semantic elements contained in multiple existing semantic units are combined to obtain multiple initial semantic element groups;

[0010] The plurality of initial semantic element groups are matched with the plurality of existing semantic units, and the initial semantic element groups that fail to match are selected as candidate semantic element groups.

[0011] Unknown semantic units are predicted based on the candidate semantic element groups.

[0012] Secondly, this disclosure provides a semantic unit prediction apparatus, comprising:

[0013] The acquisition module is suitable for acquiring multiple existing semantic units contained in the original corpus data;

[0014] The decomposition module is suitable for performing semantic decomposition processing on each existing semantic unit to obtain multiple semantic elements contained in each existing semantic unit;

[0015] The combination module is suitable for combining multiple semantic elements contained in multiple existing semantic units according to the semantic element combination strategy to obtain multiple initial semantic element groups.

[0016] The matching module is adapted to match the plurality of initial semantic element groups with the plurality of existing semantic units, and to filter the initial semantic element groups that fail to match as candidate semantic element groups.

[0017] The prediction module is adapted to predict unknown semantic units based on the candidate semantic element group.

[0018] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described method.

[0019] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-described method when executed by a processor / processor core.

[0020] The embodiments provided in this disclosure can obtain multiple semantic elements in each existing semantic unit through semantic element decomposition, and then combine these multiple semantic elements into multiple initial semantic element groups according to a semantic element combination strategy. Candidate semantic element groups are then selected based on the matching results between the multiple initial semantic element groups and the multiple existing semantic units, so as to predict unknown semantic units based on the candidate semantic element groups. Therefore, this method can flexibly combine multiple semantic elements into various forms of initial semantic element groups through a semantic element combination strategy, and then predict unknown semantic units based on the matching results between the initial semantic element groups and existing semantic units, thereby enabling the early prediction of potentially emerging new semantic units.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0022] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0023] Figure 1 A flowchart illustrating a method for predicting semantic units according to an embodiment of this disclosure;

[0024] Figure 2 A flowchart illustrating a method for predicting semantic units, provided as another embodiment of this disclosure;

[0025] Figure 3 A flowchart of a semantic unit prediction method provided in a specific example is given;

[0026] Figure 4 A schematic diagram illustrating the generation of semantic vectors is shown;

[0027] Figure 5 A block diagram of a semantic unit prediction device provided in an embodiment of this disclosure;

[0028] Figure 6 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0031] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0032] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0033] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0034] The semantic unit prediction method according to embodiments of this disclosure can be executed by electronic devices such as terminal devices or servers. Terminal devices can be in-vehicle devices, user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Specifically, the method can be implemented by a processor calling a computer program stored in memory.

[0035] In related technologies, new semantic units are typically extracted from information transmitted over the internet. For example, news and online forums are analyzed to extract new semantic units. However, there is currently no way to predict potential new semantic units in advance. To address this issue, this application proposes a method for predicting semantic units. This method decomposes each existing semantic unit into multiple semantic elements, then combines these elements into initial semantic element groups according to a semantic element combination strategy. Candidate semantic element groups are then selected based on the matching results between these initial groups and existing semantic units. These candidate groups are used to predict unknown semantic units, thereby enabling the prediction of potential new semantic units in advance.

[0036] Figure 1A flowchart illustrating a method for predicting semantic units, provided as an embodiment of this disclosure. (Refer to...) Figure 1 The method includes:

[0037] Step S110: Obtain multiple existing semantic units contained in the original corpus data.

[0038] In this context, raw corpus data refers to the written data contained in a particular language. For example, to improve the comprehensiveness of predictions, raw corpus data includes all available text data in a particular language. Existing semantic units refer to linguistic units that already exist in the language and can be used to represent certain semantics. For example, existing semantic units include existing phrases, words, constructions, and other forms. Specifically, multiple existing semantic units contained in the raw corpus data can be obtained through word segmentation or construction decomposition. In Chinese, constructions include traditional morphemes, words, phrases, and sentence patterns, used to define the way sentences are structured. Morphemes, words, compound words, and fully fixed phrases or sentence patterns are called entity constructions. These constructions are lexically fixed, meaning their components are irreplaceable, while constructions below the level of semi-fixed idioms can be called schema constructions. In short, constructions are used to represent sentence features from the perspective of sentence structure.

[0039] Step S120: Perform semantic decomposition processing on each existing semantic unit to obtain multiple semantic elements contained in each existing semantic unit.

[0040] Semantic features, a term in modern semantics, refer to units of meaning (content units) in language, also known as semantic components, semantic features, or semantic distinguishing features; they are the constituent factors of words. Correspondingly, performing semantic feature decomposition on each existing semantic unit yields multiple semantic features contained within that unit. Specifically, using semantic feature analysis to explore word meaning at a micro-level allows for further decomposition of what is initially considered the smallest unit of meaning—semantic positions—to discover deeper semantic components and structures. A semantic feature is the smallest unit of meaning constituting a semantic position, i.e., the distinguishing feature of a semantic position. A semantic feature is a semantic unit one level lower than a semantic position, obtained by decomposing semantic positions. Semantic features cannot be directly observed within a semantic system; they belong to the micro-level of semantics. Therefore, it is necessary to first determine the individual semantic positions contained within each existing semantic unit, and then decompose each semantic position separately. For example, decomposing the semantic position "sister" yields the following semantic features: [relatives][siblings][older][female]; decomposing the semantic position "victory" yields the following semantic features: [competition][defeat the opponent].

[0041] Step S130: According to the semantic element combination strategy, combine multiple semantic elements contained in multiple existing semantic units to obtain multiple initial semantic element groups.

[0042] The semantic feature combination strategy defines how at least two semantic features can be combined. Specifically, it determines the number of semantic features involved in a combination, the part-of-speech attribute of each feature, and the order of these features. Thus, the strategy determines whether and how multiple semantic features can be combined. For example, it can determine whether features can be combined based on their similarity or part-of-speech attribute. Furthermore, it can set predefined combinations of semantic features. Through flexible combinations, multiple initial semantic feature groups can be obtained. Therefore, an initial semantic feature group refers to a combination of at least two semantic features.

[0043] Step S140: Match multiple initial semantic feature groups with multiple existing semantic units, and filter out the initial semantic feature groups that fail to match as candidate semantic feature groups.

[0044] Specifically, the process of matching multiple initial semantic feature groups with multiple existing semantic units mainly involves searching for semantic units in the existing semantic units that have the same or similar meaning as the initial semantic feature groups to be matched. If a semantic unit with the same or similar meaning as the initial semantic feature group to be matched is found in the existing semantic units, the match is considered successful; if no semantic unit with the same or similar meaning as the initial semantic feature group to be matched is found in the existing semantic units, the match is considered unsuccessful.

[0045] Therefore, for an initial semantic feature group that fails to match, if there are no existing semantic units with the same or similar meaning, it indicates that the initial semantic feature group may be a new word. Thus, this initial semantic feature group is more important for predicting unknown semantic units. Accordingly, the initial semantic feature group that fails to match is identified as a candidate semantic feature group, so that unknown semantic units can be predicted based on the candidate semantic feature group in subsequent steps.

[0046] Step S150: Predict unknown semantic units based on candidate semantic element groups.

[0047] Specifically, since candidate semantic units are semantic units that are different from existing semantic units, unknown semantic units can be predicted using candidate semantic units. Here, unknown semantic units refer to new semantic units that have not yet appeared or become popular.

[0048] In practice, prediction can be performed in various ways. For example, candidate semantic feature groups can be clustered according to word meaning, grouping candidate semantic feature groups with similar meanings into one category. Correspondingly, if the number of candidate semantic feature groups in a certain cluster exceeds a preset threshold, it indicates that the candidate semantic feature groups in that cluster have a high probability of appearing or becoming popular in the future. At least one candidate semantic feature group can then be selected from that cluster as an unknown semantic unit. Alternatively, prediction can be performed using a pre-trained semantic prediction model. Accordingly, candidate semantic feature groups are input into the semantic prediction model, and the unknown semantic unit is predicted based on the output of the semantic prediction model.

[0049] The embodiments provided in this disclosure can obtain multiple semantic elements in each existing semantic unit through semantic element decomposition, and then combine these multiple semantic elements into multiple initial semantic element groups according to a semantic element combination strategy. Candidate semantic element groups are then selected based on the matching results between the multiple initial semantic element groups and the multiple existing semantic units, so as to predict unknown semantic units based on the candidate semantic element groups. Therefore, this method can flexibly combine multiple semantic elements into various forms of initial semantic element groups through a semantic element combination strategy, and then predict unknown semantic units based on the matching results between the initial semantic element groups and existing semantic units, thereby enabling the early prediction of potentially emerging new semantic units.

[0050] Figure 2 A flowchart illustrating a method for predicting semantic units, provided as another embodiment of this disclosure. (Refer to...) Figure 2 The method includes:

[0051] Step S210: Obtain multiple existing semantic units contained in the original corpus data.

[0052] Here, raw corpus data refers to the documented corpus contained in a particular language. For example, to improve the comprehensiveness of predictions, the raw corpus consists of all available text corpora in a particular language. Existing semantic units refer to linguistic units that already exist in the language and can be used to represent certain semantics.

[0053] In this embodiment, existing semantic units include: word segmentation and / or constructions. Accordingly, when acquiring multiple existing semantic units contained in the original corpus data, this is specifically achieved through the following methods:

[0054] On the one hand, multiple word segments are obtained from the original corpus data, and the word vector corresponding to each segment is determined. For example, text segmentation is performed on the text corpus; the word vectors of all words after segmentation are obtained.

[0055] On the other hand, multiple constructions are obtained from the original corpus data, and the construction vector corresponding to each construction is determined. For example, in one optional implementation, the construction vector can be obtained as follows: First, a construction recognition model (e.g., by fine-tuning a pre-trained language model, such as Robert, for classification prediction) can be used to obtain the construction label corresponding to the construction. Then, based on the construction label, the construction vector corresponding to that construction label is queried from a pre-determined construction vector table. The construction vector table stores the mapping relationship between construction vectors and construction labels.

[0056] Step S220: Perform semantic decomposition processing on each existing semantic unit to obtain multiple semantic elements contained in each existing semantic unit.

[0057] A semantic feature is the smallest semantic unit that constitutes a semantic unit, i.e., the distinctive feature of a semantic unit. A semantic feature is a semantic unit one level lower than a semantic unit, obtained by decomposing semantic units. In a semantic system, semantic features cannot be directly observed and belong to the micro-level of semantics. Accordingly, it is necessary to first determine the various semantic units contained in each existing semantic unit, and then decompose each semantic unit separately. For example, decomposing the semantic unit "sister" yields the following semantic features: [relatives][siblings][older][female]; decomposing the semantic unit "victory" yields the following semantic features: [competition][defeat the opponent]. To facilitate subsequent processing, after obtaining the multiple semantic features contained in each existing semantic unit, each semantic feature can be further converted into a corresponding semantic feature vector. For example, based on the word segmentation results, the semantic feature combination of each word is queried in the word-semantic feature mapping table to complete the semantic feature decomposition of each word. The word-semantic feature mapping table is used to store the mapping relationship between word segments and corresponding semantic features.

[0058] Step S230: According to the semantic element combination strategy, combine multiple semantic elements contained in multiple existing semantic units to obtain multiple initial semantic element groups.

[0059] The semantic feature combination strategy defines how at least two semantic features can be combined. Specifically, it determines the number of semantic features involved in a combination, the part-of-speech attribute of each feature, and the order of these features. Thus, the strategy determines whether and how multiple semantic features can be combined. For example, it can determine whether features can be combined based on their similarity or part-of-speech attribute. Furthermore, it can set predefined combinations of semantic features. Through flexible combinations, multiple initial semantic feature groups can be obtained. Therefore, an initial semantic feature group refers to a combination of at least two semantic features.

[0060] In one optional implementation, combining multiple semantic features contained in multiple existing semantic units to obtain multiple initial semantic feature groups includes: determining the semantic feature vector corresponding to each semantic feature, and combining the semantic feature vectors of multiple semantic features to obtain initial semantic feature groups in vector form. The semantic feature vector corresponding to a semantic feature can be determined according to a semantic feature vector table, which stores the mapping relationship between each semantic feature and its corresponding semantic feature vector.

[0061] In this embodiment, the semantic element combination strategy can be flexibly set according to the actual situation:

[0062] In one optional implementation, when combining multiple semantic features contained in multiple existing semantic units according to a semantic feature combination strategy, the following steps are taken: determining the semantic feature vector of each semantic feature; calculating the cosine distance between the semantic feature vectors of any two semantic features; clustering the semantic features corresponding to at least two semantic feature vectors according to the cosine distance; and performing permutation and combination processing on the at least two semantic features clustered into one group. Since the cosine distance between vectors reflects the similarity between two vectors, semantic feature combination can be performed based on the similarity between semantic features. For example, the semantic features corresponding to at least two semantic feature vectors whose cosine distance is less than a first threshold and / or whose cosine distance is greater than a second threshold are clustered into one group; and the first threshold is greater than the second threshold. Specifically, if the cosine distance is greater than the first threshold, it indicates that the difference between the two semantic feature vectors is too large, and there is no correlation whatsoever; therefore, they cannot be combined. If the cosine distance is less than the second threshold, it indicates that the difference between the two semantic feature vectors is too small, and they may be synonyms; combining them would result in content duplication, therefore, they cannot be combined. Therefore, by reasonably setting the first and second thresholds, on the one hand, we can avoid combining two semantic features that are far apart in meaning and belong to completely different fields; on the other hand, we can avoid combining two semantic features that are almost the same in meaning and belong to almost synonyms.

[0063] In another alternative implementation, when combining multiple semantic features contained in multiple existing semantic units according to the semantic feature combination strategy, the combination can be further combined by considering the relationship between parts of speech. For example, a first type of part of speech combination and a second type of part of speech combination can be pre-defined. The first type of part of speech combination includes multiple parts of speech that can be combined with each other and do not have a mutual exclusion relationship; the second type of part of speech combination includes multiple parts of speech that cannot be combined with each other and have a mutual exclusion relationship. Accordingly, semantic feature combination can be based on whether the parts of speech of multiple semantic features can be combined with each other.

[0064] For example, semantic element 1 is "looks like ice", and the corresponding semantic element vector is [0,0,0,1]; semantic element 2 is "sugar", and the corresponding semantic element vector is [1,0,0,0]. Accordingly, the initial semantic element set composed of semantic elements 1 and 2 is "sugar that looks like ice", that is, the initial semantic element set in vector form is [0,0,0,1,1,0,0,0].

[0065] Step S240: Match multiple initial semantic element groups with multiple existing semantic units.

[0066] Specifically, the process of matching multiple initial semantic feature groups with multiple existing semantic units mainly involves searching for semantic units in the existing semantic units that have the same or similar meaning as the initial semantic feature groups to be matched. If a semantic unit with the same or similar meaning as the initial semantic feature group to be matched is found in the existing semantic units, the match is considered successful; if no semantic unit with the same or similar meaning as the initial semantic feature group to be matched is found in the existing semantic units, the match is considered unsuccessful.

[0067] Step S250: Select the initial semantic feature groups that failed to match as candidate semantic feature groups.

[0068] For initial semantic feature groups that fail to match, if there are no existing semantic units with the same or similar meaning, it indicates that the initial semantic feature group may be a new word. Therefore, this initial semantic feature group is more important for predicting unknown semantic units. Accordingly, the initial semantic feature group that fails to match is identified as a candidate semantic feature group so that unknown semantic units can be predicted based on the candidate semantic feature group in subsequent steps.

[0069] In one alternative implementation, when matching multiple initial semantic element groups with multiple existing semantic units, the following method is used: for each vector-form initial semantic element group, the similarity between the initial semantic element group and each word vector and / or construction vector is calculated; if the similarity between the initial semantic element group and any word vector and / or construction vector is less than a preset similarity threshold, it is determined that the initial semantic element group has failed to match the existing semantic unit.

[0070] Therefore, in this step, by matching the initial semantic feature set with multiple existing semantic units, existing semantic feature sets contained in the initial semantic feature set can be filtered out, and only the remaining unmatched semantic feature sets can be retained as candidate semantic feature sets. These candidate semantic feature sets are typically emerging semantic units that may appear.

[0071] Step S260: Predict unknown semantic units based on candidate semantic element groups.

[0072] Specifically, since candidate semantic units are semantic units that are different from existing semantic units, unknown semantic units can be predicted using candidate semantic units. Here, unknown semantic units refer to new semantic units that have not yet appeared or become popular.

[0073] In this embodiment, candidate semantic element groups are input into a semantic prediction model, and unknown semantic units are predicted based on the output of the semantic prediction model. Specifically, the candidate semantic element groups include a first candidate semantic element group and a second candidate semantic element group; correspondingly, when an unknown semantic unit is predicted based on the candidate semantic element groups, the second candidate semantic element group is input into the semantic prediction model, and the unknown semantic unit is predicted based on the output of the semantic prediction model. Furthermore, the semantic prediction model is trained as follows: the annotation results of the first candidate semantic element group are obtained, and the first candidate semantic element group and its annotation results are used as training samples; wherein, the annotation results of the first candidate semantic element group are used to characterize the unknown semantic units contained in the first candidate semantic element group; the text pre-training model is trained using the training samples, and the semantic prediction model is obtained based on the training results.

[0074] Therefore, in this embodiment, the candidate semantic element group is divided into two parts. One part is designated as the first candidate semantic element group. By labeling the unknown semantic units contained in the first candidate semantic element group, the semantic prediction model can learn the association between the candidate semantic element group and the unknown semantic units. The labeling method can be manual labeling, machine labeling according to preset labeling rules, or initial machine labeling followed by manual correction. Machine labeling can be performed by clustering multiple candidate semantic element groups. In this embodiment, unknown semantic units refer to new semantic units that have not yet appeared or become popular. Therefore, during the labeling process, unknown semantic units mainly include newly emerging semantic units that previous models could not recognize. Accordingly, when labeling the unknown semantic units contained in the first candidate semantic element group, the focus is on labeling recently emerging semantic units. The semantic prediction model is trained based on the labeled training samples of recently emerging semantic units, so that the trained semantic prediction model can predict new semantic units that may appear in the future.

[0075] In one optional implementation, if the semantic prediction model predicts multiple unknown semantic units, the following method is used to facilitate determining the order of these unknown semantic units when predicting them based on the model's output:

[0076] First, for each semantic feature contained in each existing semantic unit, the semantic feature space density is calculated. This density characterizes the number of existing semantic units containing that semantic feature; the larger the number of existing semantic units containing that semantic feature, the greater the semantic feature space density. Specifically, if the number of existing semantic units containing that semantic feature is large, it indicates that many existing semantic units related to that semantic feature have already appeared. Therefore, the semantic gap between that semantic feature and other semantic features is small, and the probability of it combining with other semantic features to form another existing semantic unit is low.

[0077] Then, based on the semantic space density of each semantic feature, a semantic feature weight is assigned to each semantic feature. It can be seen that the semantic feature weight is directly proportional to the semantic space density.

[0078] Finally, the order of multiple unknown semantic units is determined according to the descending order of the semantic feature weights contained in the unknown semantic units, and the multiple unknown semantic units are output according to this order. The larger the semantic feature weight, the more important the semantic feature is for the prediction of the unknown semantic unit. Therefore, predicting the unknown semantic units related to the semantic feature first can improve the accuracy of the prediction.

[0079] In practice, during the initial stage, the semantic prediction model randomly assigns a set of initial values ​​as initial weights to each semantic element. Then, the semantic element spatial density of each semantic element is calculated, and the semantic element weights are adjusted according to the order of spatial density from high to low. In one implementation, the semantic element weight is inversely proportional to the semantic element spatial density. Accordingly, if a semantic element has a lower spatial density, its semantic element weight is higher. This approach mainly considers that semantic elements with higher spatial densities have already been sufficiently combined with other semantic elements, thus having a lower potential word-formation probability; while semantic elements with lower spatial densities have not yet been sufficiently combined with other semantic elements, thus having a higher potential word-formation probability. In another implementation, the semantic element weight is directly proportional to the semantic element spatial density. Accordingly, if a semantic element has a higher spatial density, its semantic element weight is higher. This approach mainly considers that if a semantic element has a higher spatial density, it is considered to have a higher frequency of use in word formation and construction, that is, the semantic element is more important in the semantic expression of this language, and therefore has a higher semantic element weight. Both of the above methods can be used in practice. More preferably, a threshold for semantic space density can be pre-set: for semantic elements with a spatial density less than this threshold, the semantic weight is inversely (or directly) proportional to the spatial density; for semantic elements with a spatial density greater than this threshold, the semantic weight is directly (or inversely) proportional to the spatial density. In short, setting different semantic weights for different semantic elements based on their spatial density helps improve the accuracy of the semantic prediction model. For example, the threshold can be 0.5. For each semantic element with a spatial density less than 0.5, the semantic element weight is proportional to the spatial density. That is, when the spatial density is not too high, semantic elements with higher spatial densities are considered to be used more frequently in word formation and construction, and therefore more important. For each semantic element with a spatial density greater than 0.5, the semantic element weight is inversely proportional to the spatial density. That is, when the spatial density is high, semantic elements with higher spatial densities are considered to have a lower probability of combining with other semantic elements again, and therefore have a lower weight. In addition, the relationship between semantic element weight and spatial density can also be set according to the characteristics of the specific prediction scenario, and this invention does not limit this.

[0080] In summary, the semantic prediction model can flexibly adjust the semantic weights of each semantic element by combining the semantic space density of the semantic elements, thereby determining the order of multiple unknown semantic units to be output based on the semantic weights. In specific implementation, the semantic prediction model includes an input layer, a hidden layer, and an output layer. The input layer is used to acquire each semantic element, the hidden layer is used to calculate the semantic space density of each semantic element, and the semantic weights of each semantic element are set according to the calculation results, so as to combine the semantic weights to predict unknown semantic units. The output layer is used to output at least one unknown semantic unit obtained from the prediction.

[0081] In some scenarios, users can set the number of results output by the semantic prediction model. For example, they can set the top N unknown semantic units to be output. Correspondingly, the prediction process for the unknown semantic units corresponding to each semantic element is performed according to the weight of the semantic element, which can ensure that the important and most probable unknown semantic units are reliably output.

[0082] In one optional implementation, when calculating the semantic space density of a semantic element for each semantic element contained in each existing semantic unit, it can be achieved as follows: any semantic element contained in the existing semantic unit is defined as a first semantic element, and the semantic elements other than the first semantic elements contained in multiple existing semantic units are defined as second semantic elements; the total number of second semantic elements is multiple; it is determined whether each second semantic element can form an existing semantic unit with the first semantic element; the ratio between the number of semantic elements that can form an existing semantic unit with the first semantic element and the total number of second semantic elements is used as the semantic space density of the first semantic element. Thus, the semantic space density of a semantic element is used to characterize the number of existing semantic units formed by that semantic element and other semantic elements. Since the total number of second semantic elements is fixed, the more existing semantic units a semantic element forms with other semantic elements, the more fully that semantic element has been combined with other semantic elements (i.e., the higher the semantic space density), and the lower the probability of combining to form a new semantic unit. Therefore, the semantic weight of that semantic element is lower. Conversely, the fewer existing semantic units a semantic feature can form with other semantic features, the less likely it is to have fully combined with other semantic features (i.e., the lower the semantic feature space density). The probability of combining with other semantic features to form new semantic units is higher, therefore, the semantic feature weight of that feature is greater. In one specific implementation, firstly, each semantic feature contained in each existing semantic unit is arranged in a first arrangement order on a first coordinate axis, and then arranged in a second arrangement order on a second coordinate axis. Next, any semantic feature on the first coordinate axis is designated as the first semantic feature, and it is determined whether each semantic feature on the second coordinate axis forms an existing semantic unit with the first semantic feature. Then, the number of semantic features on the second coordinate axis that form existing semantic units with the first semantic feature is counted. Finally, the ratio between the number of semantic features on the second coordinate axis that form existing semantic units with the first semantic feature and the total number of semantic features on the second coordinate axis is taken as the semantic feature space density of the first semantic feature.

[0083] For example, all semantic features are sorted according to their semantic similarity and arranged sequentially on the vertical coordinate axis (e.g., the S1 axis). Simultaneously, all semantic features are also sorted according to their semantic similarity and arranged sequentially on the horizontal coordinate axis (e.g., the S2 axis), thus forming a two-dimensional space. Then, it is determined whether the semantic features on the vertical and horizontal coordinate axes can be combined. If they can be combined, a 1 is entered at the intersection point of the two semantic features; otherwise, a 0 is entered at the intersection point. For each semantic feature on the vertical coordinate axis, the number of intersection points (0 or 1) between that semantic feature and each semantic feature on the horizontal coordinate axis is determined. Correspondingly, the semantic feature space density (also called the semantic feature vector space density) of that semantic feature = the number of intersection points (1) between that semantic feature and each semantic feature on the horizontal coordinate axis / the total number of semantic features on the horizontal coordinate axis. If the intersection point of the semantic element and a corresponding semantic element on the horizontal coordinate axis is 0, it means that the position is a semantic space gap that affects the semantic space distribution. For example, semantic element 1: female teacher's; semantic element 2: husband. This combination is marked as 0 in the semantic element space. Therefore, this semantic element combination is regarded as a semantic space gap that affects the semantic space distribution.

[0084] In one optional implementation, candidate semantic feature groups are used to predict new words and new constructions according to existing morphological and construction methods. For example, the semantic prediction model is input with candidate semantic feature groups, existing morphological and construction methods, and the model outputs new words and new constructions accordingly. The semantic prediction model can be a t5 generation model. The training process of the t5 generation model is as follows: First, the t5 pre-trained model is loaded, and labeled data (X: semantic feature groups, all existing morphological and construction methods, y: new words and new constructions) is added. The t5 pre-trained model is then trained to obtain a model that can generate new grammaticalization units based on semantic feature groups and existing grammaticalization methods; this is the semantic prediction model. When predicting, this semantic prediction model can predict new words and new constructions by inputting candidate semantic feature groups, existing morphological and construction methods.

[0085] In summary, current NLP research and model exploration are largely based on existing linguistic phenomena, classifying them across different scenarios, perspectives, dimensions, and levels, without attempting to predict undeveloped linguistic phenomena based on existing linguistic realities and patterns. Currently, there are lexical gaps in language (e.g., the term "shi mu" for a male teacher's wife, but no equivalent for a female teacher's husband) and antonyms that are asymmetrical. In the real world, with increasing material abundance and more complex human language expression needs, coupled with a stronger desire for completeness and novelty, the semantic space of human language will inevitably become denser. This will necessitate the generation of numerous new words and constructions to fill these semantic gaps. Based on this, this embodiment proposes a method that calculates semantic space density, identifies semantic gaps, and combines this with various existing word formation and construction methods to create a prediction scheme for new words and constructions. This method identifies existing semantic space gaps by calculating the density of semantic features to determine the most influential gaps in semantic space distribution, and then predicts unknown semantic units based on these gaps. Among them, existing word formation methods and construction methods can be all known word formation methods and construction methods, or they can include only a few high-frequency word formation methods and construction methods.

[0086] For ease of understanding, Figure 3 A flowchart of a semantic unit prediction method is provided as a specific example, such as... Figure 3 As shown, the prediction method includes the following steps:

[0087] Step S31: Input all available text in a certain language.

[0088] Step S32: Summarize the existing word formation methods (i.e., word formation patterns) and morphological methods (i.e., morphological patterns).

[0089] Step S33: Configuration recognition.

[0090] Step S34: Obtain the construction vectors for all constructions.

[0091] Step S35: Text segmentation.

[0092] Step S36: Obtain the word vectors for all words.

[0093] Step S37: Semantic element disassembly.

[0094] Step S38: Obtain all semantic vectors.

[0095] The semantic vector can be obtained through embedding. For example, first, the input semantic features are represented as vectors using Word / character embedding (i.e., word2vec). Then, the SEMEEMBEDDING operation is performed on the vectors. Finally, the EMBEDDING operation is performed on the result of the SEME EMBEDDING operation to obtain the semantic vector.

[0096] In one alternative implementation, through Figure 4 Generate semantic vectors in the manner shown, such as Figure 4 As shown, semantic vectors are generated in the following way:

[0097] First, extract basic semantic categories: extract basic semantic categories from authoritative dictionaries to form a list of basic semantic categories (i.e., dominant semantic categories).

[0098] Then, a task is constructed to compare synonyms and antonyms, and the sequence of distinguishing semantic features is labeled. Semantic features that do not belong to the basic semantic feature list are formed into a special semantic feature list.

[0099] Next, a sentence comparison task is constructed (the first sentence is a legal sentence, and the second sentence is an illegal sentence, with only one word different between them). The unique semantic feature sequence of the distinguishing word meaning is labeled, and the semantic feature classes that do not belong to the basic semantic feature list are formed into a special semantic feature list, thereby mining hidden semantic features.

[0100] Then, all semantic features in the semantic feature list are distributed in the grammatical semantic feature space, the categorical semantic feature space, and the connotative semantic feature space according to human understanding.

[0101] The grammatical semantic feature space includes: parts of speech, legal syntactic collocation slots, and illegal syntactic collocation slots; the categorical semantic feature space includes: biological and non-biological; and the connotative semantic feature space includes: time dimension, spatial dimension, and color dimension. High-dimensional semantic planets are drawn in multiple spaces, ensuring that the semantic distance between semantic feature vectors is truly reflected in the semantic planet.

[0102] Next, the previously labeled sentences will be compared with the data to train the model.

[0103] Specifically, fine-tuning of a multi-classification task based on a pre-trained language model. X is a pair of sentences, the first of which is a valid sentence and the second of which is an invalid sentence, differing from each other by only one word. Y is the part-of-speech distinguishing sequence of the two words that are the only difference.

[0104] Finally, all semantic feature class names and semantic feature vectors generated during model training are placed into a two-dimensional table, forming a semantic feature two-dimensional table. This ensures that one semantic feature corresponds to one semantic feature vector, thus constructing a semantic feature mapping table. Using this semantic feature mapping table, semantic feature vectors can be generated quickly.

[0105] Step S39: Combine all semantic vectors to form semantic groups.

[0106] Step S40: Remove existing words and existing constructions from the semantic feature groups, and use the remaining ones as candidate semantic feature groups for new grammaticalization.

[0107] Step S41: Calculate the spatial density distribution of semantic element vectors composed of established words and established constructions, and determine the semantic space gaps that have the greatest impact on the semantic space distribution.

[0108] Step S42: Based on the principle of semantic space gaps, the candidate semantic element groups are used to predict new words according to existing word formation and construction methods.

[0109] Specifically, the model takes candidate semantic elements, existing word formation methods, and construction methods as input, and outputs new words and / or new constructions.

[0110] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0111] In addition, this disclosure also provides a semantic unit prediction device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the semantic unit prediction methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding records in the method section and will not be repeated here.

[0112] Figure 5 A block diagram of a semantic unit prediction device provided in an embodiment of this disclosure.

[0113] Reference Figure 5 This disclosure provides a semantic unit prediction device 50, which includes:

[0114] The acquisition module 51 is adapted to acquire multiple existing semantic units contained in the original corpus data;

[0115] The decomposition module 52 is adapted to perform semantic decomposition processing on each existing semantic unit to obtain multiple semantic elements contained in each existing semantic unit;

[0116] Combination module 53 is adapted to combine multiple semantic elements contained in multiple existing semantic units according to the semantic element combination strategy to obtain multiple initial semantic element groups.

[0117] The matching module 54 is adapted to match the plurality of initial semantic element groups with the plurality of existing semantic units, and to filter the initial semantic element groups that fail to match as candidate semantic element groups.

[0118] The prediction module 55 is adapted to predict unknown semantic units based on the candidate semantic element group.

[0119] Optionally, the existing semantic units include: word segmentation, and / or constructions;

[0120] The acquisition module is specifically adapted to: acquire multiple word segments from the original corpus data and determine the word vector corresponding to each word segment; acquire multiple constructions from the original corpus data and determine the construction vector corresponding to each construction;

[0121] The combination module is specifically adapted to: determine the semantic vector corresponding to each semantic element, and combine the semantic vectors of multiple semantic elements to obtain an initial semantic element group in vector form;

[0122] Furthermore, the matching module is specifically adapted to: calculate the similarity between the initial semantic element group and each word vector and / or construction vector for each initial semantic element group in vector form; if the similarity between the initial semantic element group and any word vector and / or construction vector is less than a preset similarity threshold, then determine that the initial semantic element group fails to match the existing semantic unit.

[0123] Optionally, the candidate semantic element group includes: a first candidate semantic element group and a second candidate semantic element group; then the prediction module is specifically adapted to:

[0124] The second candidate semantic element group is input into the semantic prediction model, and the unknown semantic unit is predicted based on the output of the semantic prediction model.

[0125] Optionally, the semantic prediction model is trained in the following manner:

[0126] Label the unknown semantic units contained in the first candidate semantic element group, and use the labeled first candidate semantic element group as training samples;

[0127] The text pre-training model is trained using the training samples, and the semantic prediction model is obtained based on the training results.

[0128] Optionally, if the number of unknown semantic units predicted by the semantic prediction model is multiple, then predicting the unknown semantic units based on the output of the semantic prediction model includes:

[0129] For each semantic element contained in each existing semantic unit, the semantic element space density is calculated; wherein, the semantic element space density is used to characterize the number of existing semantic units containing the semantic element; wherein, the larger the number of existing semantic units containing the semantic element, the larger the semantic element space density of the semantic element.

[0130] Based on the semantic space density of each semantic element, a semantic weight is assigned to each semantic element; where the smaller the semantic space density, the larger the semantic weight.

[0131] The order of multiple unknown semantic units is determined by ranking the semantic weights of the semantic features contained in the unknown semantic units from largest to smallest, and the multiple unknown semantic units are output according to the order of arrangement.

[0132] Optionally, calculating the semantic space density of each semantic feature contained in each existing semantic unit includes:

[0133] Arrange each semantic element contained in each existing semantic unit on the first coordinate axis in a first arrangement order, and arrange each semantic element contained in each existing semantic unit on the second coordinate axis in a second arrangement order.

[0134] Any semantic element on the first coordinate axis is defined as the first semantic element, and each semantic element on the second coordinate axis is determined to form an existing semantic unit with the first semantic element.

[0135] Count the number of semantic elements on the second coordinate axis that together with the first semantic element constitute existing semantic units;

[0136] The ratio between the number of semantic features on the second coordinate axis that constitute existing semantic units with the first semantic feature and the total number of semantic features on the second coordinate axis is taken as the semantic feature spatial density of the first semantic feature.

[0137] Optionally, the step of combining multiple semantic elements contained in multiple existing semantic units according to the semantic element combination strategy includes:

[0138] Determine the semantic vector for each semantic element;

[0139] Calculate the cosine distance between the semantic vectors of any two semantic features;

[0140] Cluster the semantic elements corresponding to at least two semantic vectors according to the cosine distance;

[0141] For at least two semantic elements that cluster into one class, perform permutation and combination processing.

[0142] Optionally, the clustering of semantic features corresponding to at least two semantic feature vectors according to cosine distance includes:

[0143] The semantic features corresponding to at least two semantic feature vectors whose cosine distance is less than a first threshold and / or whose cosine distance is greater than a second threshold are clustered into one class; and the first threshold is greater than the second threshold.

[0144] Figure 6 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0145] Reference Figure 6 This disclosure provides an electronic device comprising: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs executable by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 to perform the prediction method of the aforementioned semantic unit.

[0146] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor / processor core, implements the data migration method described above. The computer-readable storage medium may be volatile or non-volatile.

[0147] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described data migration method.

[0148] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0149] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0150] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0151] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions to implement various aspects of this disclosure.

[0152] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0153] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0154] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0155] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0157] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for predicting semantic units, characterized in that, include: Obtain multiple existing semantic units contained in the original corpus data; Perform semantic decomposition on each existing semantic unit to obtain the multiple semantic elements contained in each existing semantic unit; According to the semantic element combination strategy, multiple semantic elements contained in the multiple existing semantic units are combined to obtain multiple initial semantic element groups; The plurality of initial semantic element groups are matched with the plurality of existing semantic units, and the initial semantic element groups that fail to match are selected as candidate semantic element groups. The candidate semantic element group includes: a first candidate semantic element group and a second candidate semantic element group; The second candidate semantic element group is input into the semantic prediction model, and the unknown semantic unit is predicted based on the output of the semantic prediction model. The second candidate semantic element group is used to predict the unknown semantic unit, and the first candidate semantic element group is used to train the semantic prediction model.

2. The method according to claim 1, characterized in that, The existing semantic units include: word segmentation and / or constructions; The acquisition of multiple existing semantic units contained in the original corpus data includes: Obtain multiple word segments from the original corpus data and determine the word vector corresponding to each word segment; obtain multiple constructions from the original corpus data and determine the construction vector corresponding to each construction. The step of combining multiple semantic elements contained in the multiple existing semantic units to obtain multiple initial semantic element groups includes: Determine the semantic vector corresponding to each semantic element, and combine the semantic vectors of multiple semantic elements to obtain an initial semantic element group in vector form; The step of matching the plurality of initial semantic element groups with the plurality of existing semantic units includes: For each initial semantic element group in vector form, calculate the similarity between the initial semantic element group and each word vector and / or construction vector; if the similarity between the initial semantic element group and any word vector and / or construction vector is less than a preset similarity threshold, then determine that the initial semantic element group fails to match the existing semantic unit.

3. The method according to claim 1, characterized in that, The semantic prediction model is trained in the following way: Obtain the annotation results of the first candidate semantic element group, and use the first candidate semantic element group and the annotation results of the first candidate semantic element group as training samples; wherein, the annotation results of the first candidate semantic element group are used to characterize the unknown semantic units contained in the first candidate semantic element group. The text pre-training model is trained using the training samples, and the semantic prediction model is obtained based on the training results.

4. The method according to claim 3, characterized in that, If the number of unknown semantic units predicted by the semantic prediction model is multiple, then predicting the unknown semantic units based on the output of the semantic prediction model includes: For each semantic element contained in each existing semantic unit, the semantic element space density is calculated; wherein, the semantic element space density is used to characterize the number of existing semantic units containing the semantic element; wherein, the larger the number of existing semantic units containing the semantic element, the larger the semantic element space density of the semantic element. Based on the semantic space density of each semantic element, a semantic weight is set for each semantic element; The order of multiple unknown semantic units is determined according to the semantic weights of the semantic features contained in the unknown semantic units, and the multiple unknown semantic units are output according to the order of arrangement.

5. The method according to claim 4, characterized in that, The step of calculating the semantic space density of each semantic feature contained in each existing semantic unit includes: Any semantic element contained in an existing semantic unit is identified as a first semantic element, and all semantic elements contained in the plurality of existing semantic units other than the first semantic element are identified as second semantic elements; the total number of second semantic elements is plurality. Determine whether each second semantic element can form an existing semantic unit with the first semantic element; The ratio between the number of semantic elements that can form existing semantic units with the first semantic element and the total number of the second semantic elements is taken as the semantic element space density of the first semantic element.

6. The method according to any one of claims 1-5, characterized in that, The method of combining multiple semantic elements contained in multiple existing semantic units according to the semantic element combination strategy includes: Determine the semantic vector for each semantic element; Calculate the cosine distance between the semantic vectors of any two semantic features; Cluster the semantic elements corresponding to at least two semantic vectors according to the cosine distance; For at least two semantic elements that cluster into one class, perform permutation and combination processing.

7. A semantic unit prediction device, characterized in that, include: The acquisition module is suitable for acquiring multiple existing semantic units contained in the original corpus data; The decomposition module is suitable for performing semantic decomposition processing on each existing semantic unit to obtain multiple semantic elements contained in each existing semantic unit; The combination module is suitable for combining multiple semantic elements contained in multiple existing semantic units according to the semantic element combination strategy to obtain multiple initial semantic element groups. The matching module is adapted to match the plurality of initial semantic element groups with the plurality of existing semantic units, and to filter the initial semantic element groups that fail to match as candidate semantic element groups. The candidate semantic element group includes: a first candidate semantic element group and a second candidate semantic element group; The prediction module is adapted to input the second candidate semantic element group into the semantic prediction model and predict the unknown semantic unit based on the output of the semantic prediction model; wherein the second candidate semantic element group is used to predict the unknown semantic unit, and the first candidate semantic element group is used to train the semantic prediction model.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • New word discovery method and device

    CN105955950A

  • New word mining method and device and electronic equipment

    CN111680492A

  • Sememe-based prediction method of word semantics and computer equipment

    CN113486142A

  • Sememe prediction method, computer device, and storage medium background

    CN114026556A