A method and related device for identifying English fixed collocations
By determining the word nature of the first word behind the target word in the English word sequence, the problem of low English fixed matching and identification accuracy in the existing technology has been solved, and the matching accuracy and grammatical rules are achieved.
Patent Information
- Application Number
- CN202411173918.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-08-26
AI Technical Summary
When identifying fixed English matching, the prior art has low recognition accuracy due to the diversity of English language, context complexity and cultural differences.
By obtaining the word sequence of the word English words, and determining whether the word nature of the first word behind the target word is the target word, if it matches, it is determined that the word sequence is ranked as a fixed English match.
The accuracy of the recognition of English fixed matching can be improved, which can more effectively match grammar and semantic rules, and adapt to changes in English fixed matching forms.
Smart Images

Figure CN118690748B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular to an English fixed collocation recognition method and related devices. Background Art
[0002] English is a widely used language. The training data of models in various fields often involve English text training samples. The quality of English text training samples cannot be ignored. English fixed collocations are a common language phenomenon in English. Their meanings cannot usually be directly inferred from a single word. If there are incorrect English fixed collocations in English text training samples, the model will not be able to correctly understand and learn the meaning and usage of English fixed collocations. Therefore, it is necessary to identify incorrect English fixed collocations and delete them from English text training samples.
[0003] At present, there are two main ways to identify English fixed collocations:
[0004] Method 1 is to use predefined rules (specifically, a dictionary or database containing common English collocations and their variants) to identify English collocations. Specifically, for a word sequence, it is determined whether it matches the rule. If it matches, it is determined to be an English collocation, otherwise, it is determined not to be an English collocation.
[0005] Method 2 is to use a pre-trained English collocation recognition model (such as an n-gram model or a more advanced statistical model) to predict whether a word sequence is an English collocation.
[0006] However, considering factors such as the linguistic diversity, contextual complexity and cultural differences of English, the form of English fixed collocations may change. The pre-defined rules and pre-trained English fixed collocation recognition models may not be able to cover these changes, resulting in low accuracy in English fixed collocation recognition.
[0007] Therefore, how to provide a method for recognizing English fixed collocations to improve the recognition accuracy of English fixed collocations has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0008] In view of the above problems, the present application provides a method and a related device for recognizing English fixed collocations to achieve the purpose of improving the recognition accuracy of English fixed collocations. The specific scheme is as follows:
[0009] The first aspect of the present application provides an English fixed collocation recognition method, comprising:
[0010] Acquire a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and includes a first word after the target English word;
[0011] Determining whether the part of speech of the first word is a target part of speech;
[0012] If the part of speech of the first word is the target part of speech, it is determined that the target English word sequence is an English fixed collocation.
[0013] In a possible implementation, determining whether the part of speech of the first word is a target part of speech includes:
[0014] Determine whether the part of speech of the first word is the infinitive part of speech;
[0015] Alternatively, determining whether the part of speech of the first word is a verb infinitive or a noun;
[0016] Alternatively, it is determined whether the part of speech of the first word is a noun or a gerund.
[0017] In a possible implementation, determining whether the part of speech of the first word is the original form of a verb includes:
[0018] Obtain a preset verb inflection vocabulary;
[0019] If the first word is not in the verb form transformation vocabulary, obtaining a preset verb infinitive vocabulary;
[0020] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0021] If the first word is not in the verb inflection word list and is not in the verb infinitive word list, then respectively appending a first suffix, a second suffix and a third suffix to the first word to obtain a new word;
[0022] If two or more of the new words are in the preset dictionary, the part of speech of the first word is determined to be the original verb part of speech and the first word is added to the original verb word list.
[0023] In a possible implementation, determining whether the part of speech of the first word is a verb infinitive or a noun includes:
[0024] Obtain a preset verb inflection vocabulary;
[0025] If the first word is not in the verb inflection word list, obtaining a preset verb infinitive word list and a preset noun word list;
[0026] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0027] If the first word is in the noun vocabulary, the part of speech of the first word is determined to be a noun part of speech.
[0028] In a possible implementation, determining whether the part of speech of the first word is a verb infinitive or a noun further includes:
[0029] If the first word is not in the verb inflection word list, not in the noun word list, and not in the verb infinitive word list, then respectively appending a first suffix, a second suffix, and a third suffix to the first word to obtain a new word;
[0030] If two or more of the new words are in the preset dictionary, determining that the part of speech of the first word is the original verb part of speech and adding the first word to the original verb word list;
[0031] If there are less than two words in the preset dictionary among the new words, then obtain the suffix of the first word and a preset noun and verb suffix list;
[0032] If the suffix of the first word is in the noun-verb suffix list, the part of speech of the first word is determined to be a noun, and the first word is added to the noun word list.
[0033] In a possible implementation, determining whether the part of speech of the first word is a verb infinitive or a noun further includes:
[0034] If the suffix of the first word is not in the noun-verb suffix list, prompting a user to manually confirm whether the part of speech of the first word is a noun;
[0035] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0036] In a possible implementation, determining whether the part of speech of the first word is a noun or a gerund includes:
[0037] Obtain a preset noun vocabulary and a preset gerund vocabulary;
[0038] If the first word is in the noun vocabulary, determining the part of speech of the first word is a noun;
[0039] If the first word is in the gerund word list, it is determined that the part of speech of the first word is a gerund part of speech.
[0040] In a possible implementation, determining whether the part of speech of the first word is a noun or a gerund further includes:
[0041] If the first word is not in the noun vocabulary, and the first word is not in the gerund vocabulary, appending a second suffix to the first word to obtain a new word;
[0042] If the new word is not in the gerund word list, the part of speech of the first word is determined to be a noun.
[0043] In a possible implementation, determining whether the part of speech of the first word is a noun or a gerund further includes:
[0044] If the first word is not in the noun word list, and the first word is not in the gerund word list, then obtaining a preset verb infinitive word list, a preset verb past tense word list, and a preset verb three-word list;
[0045] If the first word is not in the verb infinitive word list, the verb past tense word list, and the verb three-word list, then the first word is respectively added with a first suffix, a second suffix, and a third suffix to obtain a new word;
[0046] If there are less than two words in the preset dictionary among the new words, a prompt is given to manually confirm whether the part of speech of the first word is a noun;
[0047] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0048] A second aspect of the present application provides an English fixed collocation recognition device, comprising:
[0049] An acquisition unit, configured to acquire a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and includes a first word after the target English word;
[0050] A part-of-speech determination unit, used to determine whether the part-of-speech of the first word is a target part-of-speech;
[0051] The English fixed collocation determining unit is used to determine that the target English word sequence is an English fixed collocation if the part of speech of the first word is a target part of speech.
[0052] In a possible implementation, the part-of-speech determination unit includes:
[0053] A first part-of-speech determination unit, used to determine whether the part-of-speech of the first word is the original form of a verb;
[0054] Alternatively, a second part-of-speech determination unit is used to determine whether the part-of-speech of the first word is a verbal part-of-speech or a noun part-of-speech;
[0055] Alternatively, the third part-of-speech determination unit is used to determine whether the part-of-speech of the first word is a noun or a gerund.
[0056] In a possible implementation, the first part-of-speech determination unit is specifically used to:
[0057] Obtain a preset verb inflection vocabulary;
[0058] If the first word is not in the verb form transformation vocabulary, obtaining a preset verb infinitive vocabulary;
[0059] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0060] If the first word is not in the verb inflection word list and is not in the verb infinitive word list, then respectively appending a first suffix, a second suffix and a third suffix to the first word to obtain a new word;
[0061] If two or more of the new words are in the preset dictionary, the part of speech of the first word is determined to be the original verb part of speech and the first word is added to the original verb word list.
[0062] In a possible implementation, the second part-of-speech determination unit is specifically used to:
[0063] Obtain a preset verb inflection vocabulary;
[0064] If the first word is not in the verb inflection word list, obtaining a preset verb infinitive word list and a preset noun word list;
[0065] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0066] If the first word is in the noun vocabulary, the part of speech of the first word is determined to be a noun part of speech.
[0067] In a possible implementation, the second part-of-speech determination unit is further specifically used to:
[0068] If the first word is not in the verb inflection word list, not in the noun word list, and not in the verb infinitive word list, then respectively appending a first suffix, a second suffix, and a third suffix to the first word to obtain a new word;
[0069] If two or more of the new words are in the preset dictionary, determining that the part of speech of the first word is the original verb part of speech and adding the first word to the original verb word list;
[0070] If there are less than two words in the preset dictionary among the new words, then obtain the suffix of the first word and a preset noun and verb suffix list;
[0071] If the suffix of the first word is in the noun-verb suffix list, the part of speech of the first word is determined to be a noun, and the first word is added to the noun word list.
[0072] In a possible implementation, the second part-of-speech determination unit is further specifically used to:
[0073] If the suffix of the first word is not in the noun-verb suffix list, prompting a user to manually confirm whether the part of speech of the first word is a noun;
[0074] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0075] In a possible implementation, the third part-of-speech determination unit is specifically used to:
[0076] Obtain a preset noun vocabulary and a preset gerund vocabulary;
[0077] If the first word is in the noun vocabulary, determining the part of speech of the first word is a noun;
[0078] If the first word is in the gerund word list, it is determined that the part of speech of the first word is a gerund part of speech.
[0079] In a possible implementation, the third part-of-speech determination unit is further specifically used to:
[0080] If the first word is not in the noun vocabulary, and the first word is not in the gerund vocabulary, appending a second suffix to the first word to obtain a new word;
[0081] If the new word is not in the gerund word list, the part of speech of the first word is determined to be a noun.
[0082] In a possible implementation, the third part-of-speech determination unit is further specifically used to:
[0083] If the first word is not in the noun word list, and the first word is not in the gerund word list, then obtaining a preset verb infinitive word list, a preset verb past tense word list, and a preset verb three-word list;
[0084] If the first word is not in the verb infinitive word list, the verb past tense word list, and the verb three-word list, then the first word is respectively added with a first suffix, a second suffix, and a third suffix to obtain a new word;
[0085] If there are less than two words in the preset dictionary among the new words, a prompt is given to manually confirm whether the part of speech of the first word is a noun;
[0086] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0087] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the English fixed collocation recognition method of the first aspect or any implementation of the first aspect.
[0088] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0089] The memory is used to store computer programs;
[0090] The processor is used to execute the computer program so that the electronic device can implement the English fixed collocation recognition method of the first aspect or any implementation manner of the first aspect.
[0091] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the English fixed collocation recognition method of the above-mentioned first aspect or any implementation of the first aspect.
[0092] By means of the above technical scheme, the English fixed collocation recognition method and related device provided by the present application first obtain a target English word sequence that starts with a target English word and contains a first word after the target English word, and then determines whether the part of speech of the first word is the target part of speech; if the part of speech of the first word is the target part of speech, then the target English word sequence is determined to be an English fixed collocation. In this scheme, although factors such as the linguistic diversity, contextual complexity, and cultural differences of English may cause the form of English fixed collocations to change, no matter how they change, English fixed collocations must comply with specific grammatical and semantic rules, and for English fixed collocations that start with a target word, the part of speech of the word after the target word needs to meet conditions in order to match specific grammatical and semantic rules. Therefore, in this scheme, whether the target English word sequence is an English fixed collocation is determined based on whether the part of speech of the first word after the target word is the target part of speech, and the accuracy rate is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0094] Figure 1 A flowchart of a method for identifying English fixed collocations provided in an embodiment of the present application;
[0095] Figure 2 A schematic diagram of a process for determining whether the part of speech of the first word is the original form of a verb provided in an embodiment of the present application;
[0096] Figure 3 A schematic diagram of a process for determining whether the part of speech of the first word is a verb infinitive or a noun provided in an embodiment of the present application;
[0097] Figure 4 A schematic diagram of a process for determining whether the part of speech of the first word is a noun or a gerund provided in an embodiment of the present application;
[0098] Figure 5 A schematic diagram of the structure of an English fixed collocation recognition device provided in an embodiment of the present application;
[0099] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0101] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0102] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0103] The present application can be applied in the field of natural language processing. First, the application scenario of the present application is introduced.
[0104] In today's era dominated by big data and big models, as the scale of models continues to expand, the number of model parameters may reach hundreds of millions or even billions, and the demand for training sets is also growing. However, this growth is not only reflected in the increase in data volume, but more importantly, the improvement in data quality. In supervised learning scenarios, the quantity and quality of supervised training data directly affect the performance and generalization ability of the model. High-quality supervised training data can provide rich information to help the model learn more sophisticated and robust feature representations, thereby improving the model's prediction accuracy on new data. At the same time, in unsupervised learning scenarios, the quality of unsupervised training data is directly related to the quality of the language structure that the model can capture. Therefore, it is particularly necessary to preprocess the training data to improve the quality of the training data.
[0105] English is a widely used language. The training data of models in various fields often involve English text training samples. The quality of English text training samples cannot be ignored. English fixed collocations are a common language phenomenon in English. Their meanings cannot usually be directly inferred from a single word. If there are incorrect English fixed collocations in English text training samples, the model will not be able to correctly understand and learn the meaning and usage of English fixed collocations. Therefore, it is necessary to identify incorrect English fixed collocations and delete them from English text training samples.
[0106] At present, there are two main ways to identify English fixed collocations:
[0107] Method 1 is to use predefined rules (specifically, a dictionary or database containing common English collocations and their variants) to identify English collocations. Specifically, for a word sequence, it is determined whether it matches the rule. If it matches, it is determined to be an English collocation, otherwise, it is determined not to be an English collocation.
[0108] Method 2 is to use a pre-trained English collocation recognition model (such as an n-gram model or a more advanced statistical model) to predict whether a word sequence is an English collocation.
[0109] However, considering factors such as the linguistic diversity, contextual complexity and cultural differences of English, the form of English fixed collocations may change. The pre-defined rules and pre-trained English fixed collocation recognition models may not be able to cover these changes, resulting in low accuracy in English fixed collocation recognition.
[0110] In order to solve the above problems, the embodiment of the present application provides a method for identifying English fixed collocations. The following is a detailed introduction to the method for identifying English fixed collocations in the embodiment of the present application in conjunction with the accompanying drawings.
[0111] Reference Figure 1 , Figure 1 A flowchart of a method for identifying English fixed collocations provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, an English fixed collocation recognition method provided in an embodiment of the present application may include the following steps, which are described in detail below.
[0112] S101, obtaining a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and contains a first word after the target English word;
[0113] In the present application, the target English word sequence can be a word sequence starting with the target word in any English text. For example, the target English word sequence can be a word sequence starting with the target word in an English text training sample to be processed. It should be noted that the target English word sequence contains two English words, one of which is the target English word, and the other is a word located after the target English word (referred to as the "first word" in this application).
[0114] In the present application, the target English word is a specific English word. As an implementable embodiment, the target English word may be “to”.
[0115] S102, determining whether the part of speech of the first word is a target part of speech;
[0116] Taking into account that English fixed collocations must conform to specific grammatical and semantic rules, among the English fixed collocations that begin with a target word, the part of speech of the word following the target word needs to meet conditions (that is, it needs to be a specific part of speech) in order to match the specific grammatical and semantic rules. Therefore, in the present application, it is necessary to determine whether the part of speech of the first word is the target part of speech.
[0117] As an implementable method, if the target English word is "to", the target part of speech can be a verb infinitive, a noun or a gerund. In this case, determining whether the part of speech of the first word is the target part of speech includes three situations, namely, determining whether the part of speech of the first word is a verb infinitive, determining whether the part of speech of the first word is a verb infinitive or a noun, and determining whether the part of speech of the first word is a noun or a gerund.
[0118] S103: If the part of speech of the first word is the target part of speech, determining that the target English word sequence is an English fixed collocation.
[0119] It should be noted that if the part of speech of the first word is not the target part of speech, it is determined that the target English word sequence is not an English fixed collocation.
[0120] In the present application, if the target English word sequence is a word sequence starting with the target word in the English text training sample to be processed, then after determining that the target English word sequence is an English fixed collocation, it can be retained in the English text training sample, and after determining that the target English word sequence is not an English fixed collocation, it can be deleted from the English text training sample.
[0121] In the present application, although factors such as the linguistic diversity, contextual complexity and cultural differences of English may cause the form of English fixed collocations to change, no matter how they change, English fixed collocations must conform to specific grammatical and semantic rules. For English fixed collocations that begin with a target word, the part of speech of the word following the target word needs to meet conditions in order to match the specific grammatical and semantic rules. Therefore, in the present application, whether the target English word sequence is an English fixed collocation is determined based on whether the part of speech of the first word after the target word is the target part of speech, which has a higher accuracy rate.
[0122] Next, the three situations of determining whether the part of speech of the first word is the target part of speech in the above step S102 are described in detail respectively.
[0123] In another embodiment of the present application, a specific implementation method for determining whether the part of speech of the first word is the original form of a verb is described, and the method may include the following steps:
[0124] S201: Obtain a preset verb form transformation vocabulary;
[0125] In the present application, the verb inflection vocabulary is a list of common English verb inflections. Common English verb inflections usually include suffixes such as -ed, -es, -ing and past tense transformations of verbs, such as was, were, became, broke, brought, etc. The verb inflection vocabulary can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0126] S202: If the first word is not in the verb form conversion vocabulary, obtaining a preset verb infinitive vocabulary;
[0127] In the present application, the verb original form vocabulary is a list of common English verb original forms, such as abandon, abound, absent, absorb, etc. The verb original form vocabulary can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0128] In the present application, it can be determined whether the first word is in the verb form conversion vocabulary by searching in the verb part-of-speech conversion vocabulary.
[0129] S203: If the first word is in the verb original form word list, determine that the part of speech of the first word is the verb original form part of speech;
[0130] In the present application, it is possible to determine whether the first word is in the verb original form word list by searching in the verb original form word list.
[0131] S204: if the first word is not in the verb form transformation word list and is not in the verb original form word list, then respectively add a first suffix, a second suffix and a third suffix to the first word to obtain a new word;
[0132] In the present application, the first suffix is "ed", the second suffix is "ing", and the third suffix is "s". The first word is respectively appended with the first suffix, the second suffix and the third suffix to obtain new words. Specifically, it means appending the first suffix to the first word to obtain the first new word, appending the second suffix to the first word to obtain the second new word, and appending the third suffix to the first word to obtain the third new word.
[0133] S205: If two or more of the new words are in the preset dictionary, determine that the part of speech of the first word is the original verb part of speech and add the first word to the original verb word list.
[0134] In the present application, the preset dictionary can be a reference book that collects English words and arranges them in a certain order and explains them for people to check and refer to. In the present application, it can be determined whether the first word is in the preset dictionary by searching in the preset dictionary.
[0135] It should be noted that if the first word is in the verb form conversion vocabulary, it is determined that the word form of the first word is not the original form of the verb.
[0136] For ease of understanding, refer to Figure 2 , Figure 2 A schematic diagram of a process for determining whether the part of speech of the first word is the infinitive part of speech provided in an embodiment of the present application.
[0137] In another embodiment of the present application, a specific implementation method for determining whether the part of speech of the first word is a verb infinitive or a noun is described, and the method may include the following steps:
[0138] S301: Obtain a preset verb form transformation vocabulary;
[0139] In the present application, the verb inflection vocabulary is a list of common English verb inflections. Common English verb inflections usually include suffixes such as -ed, -es, -ing and past tense transformations of verbs, such as was, were, became, broke, brought, etc. The verb inflection vocabulary can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0140] S302: If the first word is not in the verb form conversion vocabulary, obtaining a preset verb infinitive vocabulary and a preset noun vocabulary;
[0141] In the present application, the verb original form vocabulary is a list of common English verb original forms, such as abandon, abound, absent, absorb, etc. The verb original form vocabulary can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0142] In this application, the noun vocabulary is a list of common English nouns, such as abandon, abandons, abeyance, ablution, ablutions, etc. The noun vocabulary can be obtained through historical accumulation, can be obtained through expert knowledge collection, or can be obtained through historical accumulation combined with expert knowledge collection, and this application does not impose any limitation on this.
[0143] S303: If the first word is in the verb original form word list, determine that the part of speech of the first word is the verb original form part of speech;
[0144] In the present application, it is possible to determine whether the first word is in the verb original form word list by searching in the verb original form word list.
[0145] S304: If the first word is in the noun vocabulary, determine that the part of speech of the first word is a noun.
[0146] In the present application, it can be determined whether the first word is in the noun word list by searching in the noun word list.
[0147] In a possible implementation, determining whether the part of speech of the first word is a verb infinitive or a noun further includes:
[0148] S305: if the first word is not in the verb inflection word list, not in the noun word list, and not in the verb infinitive word list, then respectively add a first suffix, a second suffix, and a third suffix to the first word to obtain a new word;
[0149] In the present application, the first suffix is "ed", the second suffix is "ing", and the third suffix is "s". The first word is respectively appended with the first suffix, the second suffix and the third suffix to obtain new words. Specifically, it means appending the first suffix to the first word to obtain the first new word, appending the second suffix to the first word to obtain the second new word, and appending the third suffix to the first word to obtain the third new word.
[0150] S306: If two or more of the new words are in the preset dictionary, determine that the part of speech of the first word is the original verb part of speech and add the first word to the original verb word list;
[0151] In the present application, the preset dictionary can be a reference book that collects English words and arranges them in a certain order and explains them for people to check and refer to. In the present application, it can be determined whether the first word is in the preset dictionary by searching in the preset dictionary.
[0152] It should be noted that if the first word is in the verb form conversion vocabulary, it is determined that the word form of the first word is not the original form of the verb.
[0153] S307: If there are less than two words in the preset dictionary among the new words, then obtain the suffix of the first word and a preset noun and verb suffix list;
[0154] In the present application, the noun verb suffix list is a list of common English noun verb suffixes, such as -ship, -ion, -ness, -ment, -age, etc. The noun verb suffix list can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0155] S308: If the suffix of the first word is in the noun-verb suffix list, determine that the part of speech of the first word is a noun, and add the first word to the noun vocabulary.
[0156] In the present application, whether the first word is in the noun verb suffix list can be determined by searching in the noun verb suffix list.
[0157] In a possible implementation, determining whether the part of speech of the first word is a verb infinitive or a noun further includes:
[0158] If the suffix of the first word is not in the noun-verb suffix list, prompting a user to manually confirm whether the part of speech of the first word is a noun;
[0159] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0160] For ease of understanding, refer to Figure 3 , Figure 3 A schematic diagram of a process for determining whether the part of speech of the first word is a verb infinitive or a noun is provided in an embodiment of the present application.
[0161] In another embodiment of the present application, a specific implementation method of determining whether the part of speech of the first word is a noun or a gerund is described, and the method may include the following steps:
[0162] S401: Obtain a preset noun vocabulary and a preset gerund vocabulary;
[0163] In this application, the noun vocabulary is a list of common English nouns, such as abandon, abandons, abeyance, ablution, ablutions, etc. The noun vocabulary can be obtained through historical accumulation, can be obtained through expert knowledge collection, or can be obtained through historical accumulation combined with expert knowledge collection, and this application does not impose any limitation on this.
[0164] S402: If the first word is in the noun vocabulary, determine that the part of speech of the first word is a noun;
[0165] In the present application, it can be determined whether the first word is in the noun word list by searching in the noun word list.
[0166] S403: If the first word is in the gerund word list, determine that the part of speech of the first word is a gerund part of speech.
[0167] In the present application, the gerund vocabulary is a list of common English gerunds, and the gerund vocabulary can be obtained through historical accumulation, or can be obtained by collecting expert knowledge, or can be obtained by combining historical accumulation with expert knowledge collection. In this regard, the present application does not impose any limitation. In the present application, the first word can be determined by searching in the gerund vocabulary to determine whether it is in the gerund vocabulary.
[0168] In a possible implementation, determining whether the part of speech of the first word is a noun or a gerund further includes:
[0169] If the first word is not in the noun vocabulary, and the first word is not in the gerund vocabulary, a second suffix is added to the first word to obtain a new word; if the new word is not in the gerund vocabulary, the part of speech of the first word is determined to be a noun.
[0170] In the present application, the second suffix may be "ing".
[0171] In the present application, it is possible to determine whether the new word is in the gerund word list by searching in the gerund word list.
[0172] In a possible implementation, determining whether the part of speech of the first word is a noun or a gerund further includes:
[0173] If the first word is not in the noun word list, and the first word is not in the gerund word list, then obtain a preset infinitive word list, a preset past tense word list, and a preset three-word verb list; if the first word is not in the infinitive word list, the past tense word list, and the three-word verb list, then add a first suffix, a second suffix, and a third suffix to the first word respectively to obtain a new word; if less than two of the new words are in the preset dictionary, then prompt to manually confirm whether the part of speech of the first word is a noun; if the first word is manually confirmed to be a noun, then add the first word to the noun word list.
[0174] In the present application, the verb original form vocabulary is a list of common English verb original forms, such as abandon, abound, absent, absorb, etc. The verb original form vocabulary can be obtained through historical accumulation, or collected from expert knowledge, or obtained through historical accumulation combined with expert knowledge collection. This application does not impose any limitations on this.
[0175] In the present application, the verb past tense vocabulary is a list of common English verb past tenses, such as abandoned, abounded, absented, absorbed, etc. The verb past tense vocabulary can be obtained through historical accumulation, can be obtained through expert knowledge collection, or can be obtained through historical accumulation combined with expert knowledge collection, and the present application does not impose any limitation on this.
[0176] In the present application, the three-word verb list is a list of common third-person singular English verbs, such as abandons, abounds, absents, absorbs, etc. The three-word verb list can be obtained through historical accumulation, or collected from expert knowledge, or through historical accumulation combined with expert knowledge collection, and the present application does not impose any limitation on this.
[0177] In the present application, the first suffix is "ed", the second suffix is "ing", and the third suffix is "s". The first word is respectively appended with the first suffix, the second suffix and the third suffix to obtain new words. Specifically, it means appending the first suffix to the first word to obtain the first new word, appending the second suffix to the first word to obtain the second new word, and appending the third suffix to the first word to obtain the third new word.
[0178] It should be noted that, considering that some words in the original form of the verb are compound nouns, in this application, it is necessary to first determine whether the first word is in the noun word list or the gerund word list. If it is determined that the first word is not in the noun word list or the gerund word list, then determine whether the first word is in the original form word list, the past tense word list and the three-word list of the verb.
[0179] For ease of understanding, refer to Figure 4 , Figure 4 A schematic diagram of a process for determining whether the part of speech of the first word is a noun or a gerund is provided in an embodiment of the present application.
[0180] A method for identifying English fixed collocations provided in an embodiment of the present application is described above. A device for executing the method for identifying English fixed collocations is described below.
[0181] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of an English fixed collocation recognition device provided in an embodiment of the present application. Figure 5 As shown, the English fixed collocation recognition device comprises:
[0182] An acquisition unit 11 is used to acquire a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and contains a first word after the target English word;
[0183] A part-of-speech determination unit 12, used to determine whether the part-of-speech of the first word is a target part-of-speech;
[0184] The English fixed collocation determining unit 13 is configured to determine that the target English word sequence is an English fixed collocation if the part of speech of the first word is a target part of speech.
[0185] In a possible implementation, the part-of-speech determination unit includes:
[0186] A first part-of-speech determination unit, used to determine whether the part-of-speech of the first word is the original form of a verb;
[0187] Alternatively, a second part-of-speech determination unit is used to determine whether the part-of-speech of the first word is a verbal part-of-speech or a noun part-of-speech;
[0188] Alternatively, the third part-of-speech determination unit is used to determine whether the part-of-speech of the first word is a noun or a gerund.
[0189] In a possible implementation, the first part-of-speech determination unit is specifically used to:
[0190] Obtain a preset verb inflection vocabulary;
[0191] If the first word is not in the verb form transformation vocabulary, obtaining a preset verb infinitive vocabulary;
[0192] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0193] If the first word is not in the verb inflection word list and is not in the verb infinitive word list, then respectively appending a first suffix, a second suffix and a third suffix to the first word to obtain a new word;
[0194] If two or more of the new words are in the preset dictionary, the part of speech of the first word is determined to be the original verb part of speech and the first word is added to the original verb word list.
[0195] In a possible implementation, the second part-of-speech determination unit is specifically used to:
[0196] Obtain a preset verb inflection vocabulary;
[0197] If the first word is not in the verb inflection word list, obtaining a preset verb infinitive word list and a preset noun word list;
[0198] If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech;
[0199] If the first word is in the noun vocabulary, the part of speech of the first word is determined to be a noun part of speech.
[0200] In a possible implementation, the second part-of-speech determination unit is further specifically used to:
[0201] If the first word is not in the verb inflection word list, not in the noun word list, and not in the verb infinitive word list, then respectively appending a first suffix, a second suffix, and a third suffix to the first word to obtain a new word;
[0202] If two or more of the new words are in the preset dictionary, determining that the part of speech of the first word is the original verb part of speech and adding the first word to the original verb word list;
[0203] If there are less than two words in the preset dictionary among the new words, then obtain the suffix of the first word and a preset noun and verb suffix list;
[0204] If the suffix of the first word is in the noun-verb suffix list, the part of speech of the first word is determined to be a noun, and the first word is added to the noun word list.
[0205] In a possible implementation, the second part-of-speech determination unit is further specifically used to:
[0206] If the suffix of the first word is not in the noun-verb suffix list, prompting a user to manually confirm whether the part of speech of the first word is a noun;
[0207] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0208] In a possible implementation, the third part-of-speech determination unit is specifically used to:
[0209] Obtain a preset noun vocabulary and a preset gerund vocabulary;
[0210] If the first word is in the noun vocabulary, determining the part of speech of the first word is a noun;
[0211] If the first word is in the gerund word list, it is determined that the part of speech of the first word is a gerund part of speech.
[0212] In a possible implementation, the third part-of-speech determination unit is further specifically used to:
[0213] If the first word is not in the noun vocabulary, and the first word is not in the gerund vocabulary, appending a second suffix to the first word to obtain a new word;
[0214] If the new word is not in the gerund word list, the part of speech of the first word is determined to be a noun.
[0215] In a possible implementation, the third part-of-speech determination unit is further specifically used to:
[0216] If the first word is not in the noun word list, and the first word is not in the gerund word list, then obtaining a preset verb infinitive word list, a preset verb past tense word list, and a preset verb three-word list;
[0217] If the first word is not in the verb infinitive word list, the verb past tense word list, and the verb three-word list, then the first word is respectively added with a first suffix, a second suffix, and a third suffix to obtain a new word;
[0218] If there are less than two words in the preset dictionary among the new words, a prompt is given to manually confirm whether the part of speech of the first word is a noun;
[0219] If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
[0220] The present application also provides an electronic device in an embodiment. Figure 6 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0221] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0222] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0223] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the English fixed collocation recognition methods provided in the embodiments of the present application.
[0224] A computer-readable storage medium is also provided in an embodiment of the present application. The computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any one of the English fixed collocation recognition methods provided in the embodiments of the present application.
[0225] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0226] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0227] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for identifying English fixed collocations, characterized in that: The method is applied to the field of natural language processing, and the method comprises: Acquire a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and includes a first word after the target English word; Determining whether the part of speech of the first word is a target part of speech; If the part of speech of the first word is the target part of speech, determining that the target English word sequence is an English fixed collocation; The determining whether the part of speech of the first word is a target part of speech includes: Determine whether the part of speech of the first word is the infinitive part of speech; Alternatively, determining whether the part of speech of the first word is a verb infinitive or a noun; Alternatively, determining whether the part of speech of the first word is a noun or a gerund; The step of determining whether the part of speech of the first word is a verb infinitive part of speech comprises: Obtain a preset verb inflection vocabulary; If the first word is not in the verb form transformation vocabulary, obtaining a preset verb infinitive vocabulary; If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech; If the first word is not in the verb inflection word list and is not in the verb infinitive word list, then respectively appending a first suffix, a second suffix and a third suffix to the first word to obtain a new word; If two or more of the new words are in the preset dictionary, the part of speech of the first word is determined to be the original verb part of speech and the first word is added to the original verb word list.
2. The method according to claim 1, characterized in that The step of determining whether the part of speech of the first word is a verb infinitive or a noun includes: Obtain a preset verb inflection vocabulary; If the first word is not in the verb inflection word list, obtaining a preset verb infinitive word list and a preset noun word list; If the first word is in the verb infinitive word list, determining the part of speech of the first word to be the verb infinitive part of speech; If the first word is in the noun vocabulary, the part of speech of the first word is determined to be a noun part of speech.
3. The method according to claim 2, characterized in that The determining whether the part of speech of the first word is a verb infinitive or a noun also includes: If the first word is not in the verb inflection word list, not in the noun word list, and not in the verb infinitive word list, then respectively appending a first suffix, a second suffix, and a third suffix to the first word to obtain a new word; If two or more of the new words are in the preset dictionary, determining that the part of speech of the first word is the original verb part of speech and adding the first word to the original verb word list; If there are less than two words in the preset dictionary among the new words, then obtain the suffix of the first word and a preset noun and verb suffix list; If the suffix of the first word is in the noun-verb suffix list, the part of speech of the first word is determined to be a noun, and the first word is added to the noun word list.
4. The method according to claim 3, characterized in that The determining whether the part of speech of the first word is a verb infinitive or a noun also includes: If the suffix of the first word is not in the noun-verb suffix list, prompting a user to manually confirm whether the part of speech of the first word is a noun; If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
5. The method according to claim 1, characterized in that: The step of determining whether the part of speech of the first word is a noun or a gerund comprises: Obtain a preset noun vocabulary and a preset gerund vocabulary; If the first word is in the noun vocabulary, determining the part of speech of the first word is a noun; If the first word is in the gerund word list, it is determined that the part of speech of the first word is a gerund part of speech.
6. The method according to claim 5, characterized in that The determining whether the part of speech of the first word is a noun or a gerund also includes: If the first word is not in the noun vocabulary, and the first word is not in the gerund vocabulary, appending a second suffix to the first word to obtain a new word; If the new word is not in the gerund word list, the part of speech of the first word is determined to be a noun.
7. The method according to claim 5, characterized in that The determining whether the part of speech of the first word is a noun or a gerund also includes: If the first word is not in the noun word list, and the first word is not in the gerund word list, then obtaining a preset verb infinitive word list, a preset verb past tense word list, and a preset verb three-word list; If the first word is not in the verb infinitive word list, the verb past tense word list, and the verb three-word list, then the first word is respectively added with a first suffix, a second suffix, and a third suffix to obtain a new word; If there are less than two words in the preset dictionary among the new words, a prompt is given to manually confirm whether the part of speech of the first word is a noun; If it is manually confirmed that the part of speech of the first word is a noun, the first word is added to the noun word list.
8. An English fixed collocation recognition device, characterized in that: The device is applied to the field of natural language processing, and comprises: An acquisition unit, configured to acquire a target English word sequence, wherein the target English word sequence is a word sequence that begins with a target English word and includes a first word after the target English word; A part-of-speech determination unit, used to determine whether the part-of-speech of the first word is a target part-of-speech; an English fixed collocation determining unit, configured to determine that the target English word sequence is an English fixed collocation if the part of speech of the first word is a target part of speech; The part-of-speech determination unit is specifically used for: Determine whether the part of speech of the first word is the infinitive part of speech; Alternatively, determining whether the part of speech of the first word is a verb infinitive or a noun; Alternatively, determining whether the part of speech of the first word is a noun or a gerund; The part-of-speech determination unit determines whether the part-of-speech of the first word is the original verb part-of-speech, including: The part-of-speech determination unit obtains a preset verb form conversion word list; if the first word is not in the verb form conversion word list, a preset verb original form word list is obtained; if the first word is in the verb original form word list, the part-of-speech of the first word is determined to be the verb original form part-of-speech; if the first word is not in the verb form conversion word list and is not in the verb original form word list, a first suffix, a second suffix and a third suffix are respectively added to the first word to obtain a new word; if two or more of the new words are in a preset dictionary, the part-of-speech of the first word is determined to be the verb original form part-of-speech and the first word is added to the verb original form word list.
9. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the English fixed collocation recognition method as claimed in any one of claims 1 to 7.
10. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the English fixed collocation recognition method according to any one of claims 1 to 7.
11. A computer storage medium, characterized in that: The computer storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the English fixed collocation recognition method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for extracting phrases in corpus text, storage medium and electronic equipment
CN111783450A
Morphological parsing algorithm for English-Chinese translation system
CN1134567A