Chinese intentional metaphor identification method, system, terminal device and storage medium
By establishing a database of deliberate metaphors using recurrent neural network algorithms, the problem of identifying deliberate metaphors in Chinese has been solved, enabling efficient identification and research of Chinese texts and promoting in-depth research on deliberate metaphors in Chinese.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing translation software cannot effectively identify and process deliberate metaphors in Chinese, which hinders the in-depth development of research on deliberate metaphors in Chinese. Furthermore, existing Chinese corpora cannot meet the needs of directly extracting deliberate metaphors in Chinese.
A deliberate metaphor database is established using a recurrent neural network algorithm. By acquiring different types of text for analysis and processing, keywords are extracted and compared with the definition of deliberate metaphor. The feature quantity D=P(Ai)*P(Bj)*P(Ck) is used for recognition processing, and finally the recognition result is output and the database is updated.
This has improved the ease and accuracy of identifying deliberate metaphors in Chinese texts and promoted the in-depth development of research on deliberate metaphors in Chinese.
Smart Images

Figure CN114722193B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing, and in particular to a method, system, terminal device and storage medium for identifying Chinese deliberate metaphors. Background Technology
[0002] With the continuous expansion and deepening of international exchanges and cooperation, language has become a significant barrier between speakers of different languages. However, as one of the languages with a wide user base and a long history, Chinese is difficult for people from different cultural backgrounds to understand due to its frequent use of deliberate metaphors. Deliberate metaphors are highly dependent on context and the speaker's intention. While translation search software can process language data quickly and accurately, it can currently only present text blocks detached from context. To date, there is no comprehensive and reliable automated computer software for identifying deliberate metaphors; researchers must supplement this with manual identification. Existing Chinese corpora with semantic annotations meet the needs of translation research, but they still fall short of directly extracting Chinese deliberate metaphors and exploring the cognitive, social, cultural, and psychological mechanisms behind them, thus hindering the in-depth development of research on Chinese deliberate metaphors. Summary of the Invention
[0003] The purpose of this invention is to solve the problems in the prior art and provide a method, system, terminal device and storage medium for identifying Chinese intentional metaphors.
[0004] To achieve the above objectives, the present invention employs the following technical solution:
[0005] A method for identifying deliberate metaphors in Chinese includes the following steps:
[0006] Get different types of text;
[0007] The acquired text is analyzed and processed;
[0008] A database of deliberate metaphors is established based on the analyzed and processed text, and the database of deliberate metaphors is trained.
[0009] Collect the text to be processed;
[0010] The text to be processed is identified based on a database of deliberate metaphors.
[0011] Obtain the recognition results and output them.
[0012] A further improvement of the present invention is that:
[0013] The text analysis and processing specifically includes:
[0014] Extract keywords from different types of text;
[0015] Based on the extracted keywords, they are compared with the definition of intentional metaphor. If they are completely identical, the corresponding intentional metaphor label is applied.
[0016] The training of the deliberate metaphor database employs a recurrent neural network algorithm, and the specific process is as follows:
[0017] Get the initial text sequence A i The initial text sequence must include at least words, parts of speech, meanings, and definitions;
[0018] Obtain the sequence of mutual relations B j The sequence of interrelationships includes at least valence, subject, and object;
[0019] Obtain the structure sequence C k The structural sequence must include at least the event;
[0020] The three sequences are semantically encoded and concatenated to form a feature quantity D, and the feature quantity D is analyzed and predicted by an algorithm.
[0021] The characteristic quantity D=P(A) i )* P(B j )* P(C k ), where P(A i P(B) represents the comparison result between the initial text sequence and the database of deliberate metaphors. j P(C) represents the comparison result between the sequence of mutual relationships and the database of deliberate metaphors. k () indicates the comparison result between the structural sequence and the intentional metaphor database.
[0022] When outputting the recognition result, the corresponding deliberate metaphor result is input into the deliberate metaphor database to update the deliberate metaphor database.
[0023] A Chinese deliberate metaphor recognition system includes:
[0024] A text acquisition unit, wherein the text acquisition unit is used to acquire text of different types;
[0025] An analysis and processing unit is used to analyze and process the acquired text.
[0026] A database establishment unit is used to establish a deliberate metaphor database on the analyzed and processed text, and to train the deliberate metaphor database.
[0027] A data acquisition unit is used to acquire the text to be processed.
[0028] The recognition unit takes the text to be processed as input and performs recognition processing on the text to be processed based on the intentional metaphor database.
[0029] An output unit is used to obtain and output the recognition result.
[0030] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the Chinese intentional metaphor recognition method.
[0031] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the Chinese intentional metaphor recognition method.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] This invention provides a method for identifying deliberate metaphors in Chinese text. Specifically, it includes acquiring different types of text, analyzing and processing the acquired text, establishing a deliberate metaphor database based on the analyzed text, training the deliberate metaphor database, collecting text to be processed, performing recognition processing on the text to be processed based on the deliberate metaphor database, and finally obtaining and outputting the recognition result. By establishing a deliberate metaphor database and providing specific and detailed linguistic examples, this method effectively improves the convenience of extracting deliberate metaphors and their context from Chinese text, and promotes the in-depth and significant development of research on deliberate metaphors in Chinese. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of the Chinese intentional metaphor recognition method of the present invention;
[0036] Figure 2 This is a schematic diagram of the Chinese intentional metaphor recognition system of the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0038] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0039] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0040] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0041] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0042] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.
[0043] The present invention will now be described in further detail with reference to the accompanying drawings:
[0044] See Figure 1 The diagram below illustrates the process of identifying Chinese deliberate metaphors according to the present invention, which includes the following steps:
[0045] S1, obtain different types of processed text.
[0046] S2, analyze and process the acquired text;
[0047] S2.1, Extract keywords from different types of text;
[0048] S2.2, Based on the extracted keywords, compare them with the definition of intentional metaphor. If they are completely identical, apply the intentional metaphor label accordingly.
[0049] S3, establish a deliberate metaphor database based on the analyzed and processed text, and train the deliberate metaphor database;
[0050] S3.1, Obtain the initial text sequence A i The initial text sequence must include at least words, parts of speech, meanings, and definitions;
[0051] S3.2, Obtain the mutual relationship sequence B j The sequence of interrelationships includes at least valence, subject, and object;
[0052] S3.3, Obtain the structural sequence C k The structural sequence must include at least the event;
[0053] S3.4, semantically encode and concatenate the three sequences to form feature quantity D. Then, perform algorithmic analysis and prediction on feature quantity D. Feature quantity D = P(A i )* P(B j )* P(C k ), where P(A i P(B) represents the comparison result between the initial text sequence and the database of deliberate metaphors. j P(C) represents the comparison result between the sequence of mutual relationships and the database of deliberate metaphors. k The parentheses represent the comparison results between the structural sequence and the deliberate metaphor database, and the P function represents the comparison results between all sequences within the parentheses and the deliberate metaphor lexicon. P(A) represents the result of comparing the structure sequence with the deliberate metaphor lexicon. i For example, when the word, part of speech, meaning, and definition all match the features, the output is 100%; if one does not match, the output is 75%; if two do not match, the output is 50%, and so on. The final value of the feature indicates whether the text is a deliberate metaphor.
[0054] S4, collect the text to be processed.
[0055] S5, based on the intentional metaphor database, performs recognition and processing on the text to be processed;
[0056] S6. Obtain and output the recognition result. When outputting the recognition result, input the corresponding deliberate metaphor result into the deliberate metaphor database to update the deliberate metaphor database.
[0057] See Figure 2 The diagram below illustrates the Chinese intentional metaphor recognition system of the present invention, which includes the following modules:
[0058] A text acquisition unit, which is used to acquire texts of different types;
[0059] An analysis and processing unit, which is used to analyze and process the acquired texts;
[0060] A database establishment unit, which is used to establish a deliberate metaphor database for the texts after analysis and processing, and train the deliberate metaphor database;
[0061] A data acquisition unit, which is used to acquire texts to be processed;
[0062] An identification unit, which takes the text to be processed as an input value and performs identification processing on the text to be processed based on the deliberate metaphor database;
[0063] An output unit, which is used to obtain and output the identification result. Embodiment
[0064] Original corpus of the deliberate metaphor annotation database: There are always groups of doctors, nurses, builders, and supporters who rush to the forefront!
[0065] Through analysis and processing, it is identified that "rush" is a deliberate metaphor, and the DM annotation is added.
[0066] Import text to be processed 1: Teachers and students all rush heroically to the front line.
[0067] Import text to be processed 2: Every morning, he always makes a cup of milk tea.
[0068] The parameter identification of text to be processed 1 and text to be processed 2 is shown in Table 1.
[0069] Table 1. Parameter identification of text to be processed
[0070] ;
[0071] Obtain the initial text sequence A according to text to be processed 1 i (rush, verb, actively participate (has multiple meanings), charge), mutual relationship sequence B j (valence is 1, person, no object) and structure sequence C k (has a dative), obtain its feature vector D = 100%, compare with the deliberate metaphor annotation database, identify "rush" here as a deliberate metaphor, and output the identification result.
[0072] Obtain the initial text sequence A according to text to be processed 2 i (rush, verb, create (has multiple meanings), make tea), mutual relationship sequence B j(Valence is 2 (this value is 0), person, object, this value is 0) and structural sequence C k (If there is no relevant information, the value is 0), resulting in its feature vector D=0. The final value indicates that the text is not an intentional metaphor.
[0073] One embodiment of the present invention provides a terminal device. This terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the above-described embodiments of the Chinese intentional metaphor recognition method. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described embodiments.
[0074] The computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention.
[0075] The terminal device for recognizing deliberate Chinese metaphors can be a desktop computer, laptop, handheld computer, or cloud server, among other computing devices. The terminal device for recognizing deliberate Chinese metaphors may include, but is not limited to, processors and memory.
[0076] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0077] The memory can be used to store the computer program and / or module. The processor realizes various functions of the terminal device for Chinese deliberate metaphor recognition by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0078] If the modules / units integrated into the Chinese deliberate metaphor recognition terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium may be appropriately added to or subtracted from the content as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium may not include electrical carrier signals and telecommunication signals.
[0079] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A Chinese intentional metaphor recognition system applied to a Chinese intentional metaphor recognition method, characterized in that, The method for identifying deliberate metaphors in Chinese includes the following steps: Get different types of text; The acquired text is analyzed and processed, specifically including: extracting keywords from different types of text; comparing the extracted keywords with the definition of deliberate metaphor, and labeling them as deliberate metaphors if they are completely identical; A database of deliberate metaphors is established based on the analyzed text. The database is then trained using a recurrent neural network algorithm. The specific process is as follows: acquiring an initial text sequence A i , a mutual relation sequence B j , a structure sequence C k , the initial text sequence at least comprising words, word classes, semantic items and paraphrases; the mutual relation sequence at least comprising valences, subjects and objects; the structure sequence at least comprising events; For the initial text sequence A i Interrelation sequence B j Structural sequence C k Semantic encoding and concatenation are performed to form feature quantity D; feature quantity D is then analyzed and predicted using algorithms. Feature amount D = P(A i ) * P(B j ) * P(C k ); P(A i ) represents the comparison result of the initial text sequence and the deliberate metaphor database, when the word, the word class, the semantic item, and the disambiguation all meet the characteristics, P(A i ) outputs 100%, when one item does not meet the characteristics, P(A i ) outputs 75%, when two items do not meet the characteristics, P(A i ) outputs 50%, when three items do not meet the characteristics, P(A i ) outputs 25%, and when all four items do not meet the characteristics, P(A i ) outputs 0. P(B j ) denotes the comparison result of the mutual relationship sequence and the intentional metaphor database; P(C k ) denotes the result of the comparison of the structure sequence with the database of intentional metaphors; Collect the text to be processed; The text to be processed is identified based on a database of deliberate metaphors. The identification results are obtained and output, and the corresponding deliberate metaphor results are input into the deliberate metaphor database to update the deliberate metaphor database. The Chinese deliberate metaphor recognition system includes: A text acquisition unit, wherein the text acquisition unit is used to acquire text of different types; An analysis and processing unit is used to analyze and process the acquired text. A database establishment unit is used to establish a deliberate metaphor database on the analyzed and processed text, and to train the deliberate metaphor database. A data acquisition unit is used to acquire the text to be processed. The recognition unit takes the text to be processed as input and performs recognition processing on the text to be processed based on the intentional metaphor database. An output unit is used to obtain and output the recognition result.
2. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in claim 1.
3. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in claim 1.
Citation Information
Patent Citations
Chinese metaphor information knowledge base construction method and device based on government work report
CN112632963A