A method and system for extracting scene graphs from Chinese text

Through grammatical analysis methods, the subject and object of verbs are extracted from Chinese text to construct a scene map, which solves the complexity of extracting scene maps in Chinese text, and achieves efficient and accurate extraction effect.

CN113901800BActive Publication Date: 2025-02-11HUNAN XINGLAN ZHIYUAN NETWORK TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111014653.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2025-02-11
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

At this stage, the direct extraction of objects and their relationships from Chinese texts is still in the initial exploration period, especially due to the complex Chinese grammar and sentence structure, the technical solution for extracting scene maps is not yet mature.

Method used

By obtaining verbs in Chinese text, using grammatical analysis methods such as subject-predicate relationship, verb-object relationship and parallel relationship, logical grammatical processing is performed, subject and object corresponding to verbs are extracted, and scene maps are constructed according to preset extraction rules.

Benefits of technology

It realizes accurate and efficient extraction of scene maps from Chinese text, avoids the complexity of learning object relationships through neural networks such as graph convolution in traditional methods, and is conducive to computer understanding of Chinese text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901800B_ABST
    Figure CN113901800B_ABST
Patent Text Reader

Abstract

A method and system for extracting scene graphs from Chinese text, obtaining an input Chinese text, determining whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and performing logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei"; obtaining a verb V in the Chinese text; A , the verb V A Add to the verb list; traverse the verb list and use the subject-predicate relationship SBV to obtain the verb V A The corresponding subject S A ; Use the verb-object relationship VOB and the prepositioned object FOB to obtain the verb V A The corresponding object O A ; will get the verb V A The corresponding subject S A and object O A Add to the object attribute list; extract the scene graph of the Chinese text from the object attribute list according to a preset extraction rule. The present invention avoids the traditional method of learning the relationship between objects through neural networks such as graph convolution, and can accurately and efficiently extract scene graphs from Chinese text by processing Chinese text, which is conducive to computer understanding of Chinese text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for extracting scene graphs from Chinese text. Background Art

[0002] A scene graph is a semantic graph structure. The nodes in the scene graph represent objects contained in text or image data, and the edges between different nodes express the relationships between different objects, usually including position relationships, action relationships, etc. Since the scene graph can well express objects and their relationships, it has been widely used in fields such as retrieval and video generation.

[0003] At present, scene graph extraction methods are mainly based on image data. Such methods often first use object recognition models to identify the objects contained in the image, and then use neural networks such as graph convolution to learn the relationship between objects. However, the direct extraction of objects and their relationships from text data is still in the initial exploration stage. Stanford proposed a text parser for English text data, which can extract the corresponding scene graph by analyzing the grammatical structure of text data. However, compared with English, Chinese grammar and sentence structure are more complex, which also brings many challenges. How to provide a technical solution for extracting scene graphs from Chinese text is a technical problem that needs to be solved urgently. Summary of the invention

[0004] To this end, the present invention provides a method and system for extracting scene graphs from Chinese text, so as to achieve accurate and efficient extraction of scene graphs from Chinese text.

[0005] In order to achieve the above object, the present invention provides the following technical solution: a method for extracting scene graphs from Chinese text, comprising the following steps:

[0006] Obtaining an input Chinese text, determining whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and performing logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei";

[0007] Get the verb V in the Chinese text A , the verb V A Add to the list of verbs;

[0008] Traverse the verb list and use the subject-predicate relationship SBV to obtain the verb V A The corresponding subject S A ;

[0009] Get the verb V using the verb-object relationship VOB and the prepositioned object FOB A The corresponding object O A ;

[0010] will get the verb V A The corresponding subject S A and object O A Add to the object properties list;

[0011] The scene graph of the Chinese text is extracted from the object attribute list according to a preset extraction rule.

[0012] As a preferred method for extracting scene graphs from Chinese texts, the logical grammar processing process of the "ba" and "bei" sentences divides the "ba" and "bei" sentences into two parts based on the "ba" and "bei" characters, and obtains the grammar trees of the two parts through the language technology platform LTP;

[0013] The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED.

[0014] As a preferred method for extracting scene graphs from Chinese text, when the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A The subject of the sentence.

[0015] As a preferred method for extracting scene graphs from Chinese text, when the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject S A Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

[0016] As a preferred method for extracting scene graphs from Chinese text, a list of copulas is constructed, which includes Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb V A The corresponding object O A Included in the list of copulas, the object O A As subject S A Attributes.

[0017] As a preferred method for extracting scene graphs from Chinese text, if the object O A Does not exist, the verb V A As subject S A Attributes.

[0018] As a preferred method for extracting scene graphs from Chinese text, if the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship;

[0019] If there is a verb-object relationship VOB and a prepositioned object FOB relationship, the object O is obtained through the language technology platform LTP. A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb V A The object of .

[0020] The present invention also provides a system for extracting scene graphs from Chinese text, comprising:

[0021] A Chinese text processing module is used to obtain an input Chinese text, determine whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and perform logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei";

[0022] A verb list module, used to obtain the verb V in the Chinese text A , the verb V A Add to the list of verbs;

[0023] The subject processing module is used to traverse the verb list and obtain the verb V using the subject-predicate relationship SBV. A The corresponding subject S A ;

[0024] The object processing module is used to obtain the verb V using the verb-object relationship VOB and the prepositioned object FOB A The corresponding object O A ;

[0025] The attribute adding module is used to obtain the verb V A The corresponding subject S A and object O A Add to the object properties list;

[0026] A scene graph generation module is used to extract the scene graph of the Chinese text from the object attribute list according to a preset extraction rule.

[0027] As a system optimization scheme for extracting scene graphs from Chinese texts, the logical grammar processing process of the "ba" and "bei" sentences divides the "ba" and "bei" sentences into two parts based on the "ba" and "bei" characters, and obtains the grammar trees of the two parts through the language technology platform LTP;

[0028] The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED;

[0029] When the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A the subject of;

[0030] When the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject S A Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

[0031] As a preferred solution for extracting scene graphs from Chinese text, the system also includes a copula list module for constructing a copula list, wherein the copula list includes Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb VA The corresponding object O A Included in the list of copulas, the object O A As subject S A Attributes;

[0032] If the object O A Does not exist, the verb V A As subject S A Attributes;

[0033] If the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship;

[0034] If there is a verb-object relationship VOB and a prepositioned object FOB relationship, the object O is obtained through the language technology platform LTP. A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb V A The object of .

[0035] The present invention has the following advantages: obtaining an input Chinese text, determining whether the Chinese text contains a sentence with the word "ba" or "bei", and performing logical grammar processing if the sentence contains a sentence with the word "ba" or "bei"; obtaining the verb V in the Chinese text; A , the verb V A Add to the verb list; traverse the verb list and use the subject-predicate relationship SBV to obtain the verb V A The corresponding subject S A ; Use the verb-object relationship VOB and the prepositioned object FOB to obtain the verb V A The corresponding object O A ; will get the verb V A The corresponding subject S A and object O AAdd to the object attribute list; extract the scene graph of the Chinese text from the object attribute list according to a preset extraction rule. The present invention avoids the traditional method of learning the relationship between objects through neural networks such as graph convolution, and can accurately and efficiently extract scene graphs from Chinese text by processing Chinese text, which is conducive to computer understanding of Chinese text. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0037] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0038] Figure 1 A schematic diagram of a method for extracting scene graphs from Chinese text provided in Example 1 of the present invention;

[0039] Figure 2 A schematic diagram of an algorithm flow of a method for extracting scene graphs from Chinese text provided in Example 1 of the present invention;

[0040] Figure 3 A schematic diagram of a syntax tree of a method for extracting a scene graph from a Chinese text provided in Example 1 of the present invention;

[0041] Figure 4 A system for extracting scene graphs from Chinese text provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0042] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] In the following embodiments, the English abbreviations SBV (subject-verb), VOB (direct object, verb-object), FOB (fronting-object), HED (head) and COO (coordinate) are commonly used abbreviations in syntactic analysis in the prior art;

[0044] LTP (Language Technology Plant form, developed by Harbin Engineering University) provides a series of Chinese natural language processing tools. Users can use these tools to perform word segmentation, part-of-speech tagging, syntactic analysis, and other tasks on Chinese texts.

[0045] Example 1

[0046] See also Figure 1 , Figure 2 and Figure 3 Embodiment 1 of the present invention provides a method for extracting a scene graph from a Chinese text, comprising the following steps:

[0047] S1, obtaining an input Chinese text, determining whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and performing logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei";

[0048] S2. Obtain the verb V in the Chinese text A , the verb V A Add to the list of verbs;

[0049] S3, traverse the verb list, and use the subject-predicate relationship SBV to obtain the verb V A The corresponding subject S A ;

[0050] S4. Obtain the verb V using the verb-object relationship VOB and the prepositioned object FOB A The corresponding object O A ;

[0051] S5, the verb V is obtained A The corresponding subject S A and object O A Add to the object properties list;

[0052] S6. Extracting the scene graph of the Chinese text from the object attribute list according to a preset extraction rule.

[0053] In this embodiment, the logical grammar processing process of the ba and bei sentences divides the ba and bei sentences into two parts based on the ba and bei characters, and obtains the grammar trees of the two parts through the language technology platform LTP;

[0054] The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED.

[0055] Specifically, the sentence processing of "ba" and "bei" is based on the word "ba" and "bei". The sentence is divided into two parts. Take the sentence processing of "ba" as an example: First, the syntax tree of the two parts is obtained by Harbin Institute of Technology LTP (the example of the syntax tree is shown in the figure below). Figure 3 As shown). The subject S1 of the first part is obtained through the subject-predicate relationship SBV, the subject S2 of the second part and the predicate P of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED, and then the original sentence is simplified to S1+P+S2.

[0056] In this embodiment, Harbin Institute of Technology LTP is used to obtain the grammatical tree of the processed sentence, and the verbs in the core relationship HED and the subject-predicate relationship SBV are added to the verb list for subsequent traversal. In addition, if the verbs in the subject-predicate relationship SBV have a parallel relationship COO, the parallel verbs are also added to the verb list.

[0057] In this embodiment, when the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A When the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject S A Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

[0058] Specifically, the subject-predicate relationship SBV is used to obtain the verb V A If the corresponding subject does not exist using the subject-predicate relationship SBV, then the verb V is determined by the parallel relationship COO. A Is there a parallel verb V? B , if the parallel verb V B If it exists, then look for the parallel verb V B Is there a subject? If the parallel verb V BThere is a subject-verb relationship SBV, and through LTP part-of-speech analysis, we can get the parallel verb V B Subject S B If S is a noun, B As the verb V A If the subject-predicate relationship SBV exists, the subject S is determined by the parallel relationship COO. A Is there a parallel subject S? B , if the parallel subject S B exists and the part of speech is a noun, then the verb V A The subject is S A +S B , otherwise the subject is S A If the subject is not empty, it is added to the object attribute list object_list.

[0059] In this embodiment, a list of copulas is constructed, which includes Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb V A The corresponding object O A Included in the list of copulas, the object O A As subject S A If the object O A Does not exist, the verb V A As subject S A If the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship; if there is a verb-object relationship VOB and a prepositioned object FOB relationship, obtain the object O through the language technology platform LTP A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb VA Object of

[0060] Specifically, use the verb-object relationship VOB and the prepositional object FOB to obtain the verb V A The corresponding object. First, this embodiment customizes a copula list attribute_list, which contains common Chinese copulas such as "in" and "is", and determines whether the object O A is included in the copula list. If it is included, then the object O A serves as the subject S A 's attribute, and add {S A :O A} to the attribute list attribute_list. For example: The rose is red, and red is an attribute of the rose.

[0061] If the object does not exist, then the verb V A serves as the subject S A 's attribute, and add {S A :V A} to the attribute list attribute_list. For example: The rose blooms, and blooming is an attribute of the rose.

[0062] If the verb V A is not a copula, then first determine whether the verb V A has a verb-object relationship VOB and a prepositional object FOB relationship. If it exists, obtain the object O A 's part of speech through LTP, and determine whether the object O A is a noun. If the object O A is a verb, then obtain the subject S A of the object O OA , and use S OA +O A as the object of V A ; if the object O A is a noun, then first determine whether there is a coordinate object O A for the object O B through the coordinate relationship COO. If it exists, then O A +O B is the object of the verb V A , otherwise the object O A is the object of the verb V A . If the object O A is not empty, then add the object to the object attribute list object_list.

[0063] Specifically, after obtaining the subject S A corresponding to the verb V A and the object O AAfter that, add [S A , O A , V A to the relation list relation_list.

[0064] For the sentence "As soon as I got home, the little dog blushed and hung its head and said, 'I used to always chase you, but you helped me instead. Sorry, I was wrong.'"

[0065] The finally extracted scene graph format is as follows:

[0066] object list: ['dog', 'home', 'dog', 'face', 'I', 'you', 'you', 'I', 'I']

[0067] attribute list: [{'object': ['I'], 'attribute': ['wrong']}]

[0068] object ralation: [['dog', 'home', 'to'], ['dog', 'face','red'], ['I', 'you', 'chase'], ['you', 'I', 'help']]

[0069] In summary, the present invention obtains the input Chinese text, determines whether the Chinese text contains "ba" or "bei" sentences, and performs logical grammar processing if it contains "ba" or "bei" sentences; obtains the verb V in the Chinese text A , and adds the verb V A to the verb list; traverses the verb list, and uses the subject-predicate relationship SBV to obtain the subject S A corresponding to the verb V A ; uses the verb-object relationship VOB and the prepositional object FOB to obtain the object O A corresponding to the verb V A ; adds the obtained subject S A corresponding to the verb V A and the object O A to the object attribute list; extracts the scene graph of the Chinese text from the object attribute list according to the preset extraction rules. The present invention avoids the traditional method of learning the relationships between objects through neural networks such as graph convolution, and can accurately and efficiently extract the scene graph from the Chinese text through the processing of the Chinese text, which is beneficial to the computer understanding of the Chinese text.

[0070] Embodiment 2

[0071] See Figure 4 , Embodiment 2 of the present invention also provides a system for extracting a scene graph from a Chinese text, including:

[0072] The Chinese text processing module 1 is used to obtain the input Chinese text, determine whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and perform logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei";

[0073] Verb list module 2, used to obtain the verb V in the Chinese text A , the verb V A Add to the list of verbs;

[0074] The subject processing module 3 is used to traverse the verb list and obtain the verb V using the subject-predicate relationship SBV. A The corresponding subject S A ;

[0075] The object processing module 4 is used to obtain the verb V using the verb-object relationship VOB and the prepositioned object FOB. A The corresponding object O A ;

[0076] Attribute adding module 5, used to obtain the verb V A The corresponding subject S A and object O A Add to the object properties list;

[0077] The scene graph generation module 6 is used to extract the scene graph of the Chinese text from the object attribute list according to a preset extraction rule.

[0078] In this embodiment, the logical grammar processing process of the ba and bei sentences divides the ba and bei sentences into two parts based on the ba and bei characters, and obtains the grammar trees of the two parts through the language technology platform LTP;

[0079] The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED;

[0080] When the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A The subject of

[0081] When the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject SA Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

[0082] In this embodiment, a copula list module 7 is also included, which is used to construct a copula list, wherein the copula list includes Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb V A The corresponding object O A Included in the list of copulas, the object O A As subject S A Attributes;

[0083] If the object O A Does not exist, the verb V A As subject S A Attributes;

[0084] If the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship;

[0085] If there is a verb-object relationship VOB and a prepositioned object FOB relationship, the object O is obtained through the language technology platform LTP. A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb V A The object of .

[0086] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown in the previous part of the present application, and will not be repeated here.

[0087] Example 3

[0088] Embodiment 3 of the present invention provides a computer-readable storage medium, in which a method program code for extracting scene graphs from Chinese text is stored. The program code includes method instructions for extracting scene graphs from Chinese text in accordance with Embodiment 1 or any possible implementation thereof.

[0089] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. 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)).

[0090] Example 4

[0091] Embodiment 4 of the present invention provides an electronic device, comprising a processor, wherein the processor is coupled to a storage medium, and when the processor executes instructions in the storage medium, the electronic device executes the method for extracting scene graphs from Chinese text of Embodiment 1 or any possible implementation thereof.

[0092] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0093] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. 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 invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from a website site, computer, server or 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, server or data center.

[0094] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0095] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A method for extracting scene graphs from Chinese text, characterized in that: The following steps are involved: Obtaining an input Chinese text, determining whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and performing logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei"; Get the verb V in the Chinese text A , the verb V A Add to the list of verbs; Traverse the verb list and use the subject-predicate relationship SBV to obtain the verb V A The corresponding subject S A ; Get the verb V using the verb-object relationship VOB and the prepositioned object FOB A The corresponding object O A ; will get the verb V A The corresponding subject S A and object O A Add to the object properties list; Extracting the scene graph of the Chinese text from the object attribute list according to a preset extraction rule; Construct a list of copulas, including Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb V A The corresponding object O A Included in the list of copulas, the object O A As subject S A Attributes; if the object O A Does not exist, the verb V A As subject S A Attributes; If the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship; If there is a verb-object relationship VOB and a prepositioned object FOB relationship, the object O is obtained through the language technology platform LTP. A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb V A The object of .

2. The method for extracting scene graphs from Chinese text according to claim 1, characterized in that: The logical grammar processing process of the ba and bei sentences is to divide the ba and bei sentences into two parts based on the ba and bei characters, and obtain the grammar trees of the two parts through the language technology platform LTP; The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED.

3. The method for extracting scene graphs from Chinese text according to claim 1, characterized in that: When the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A The subject of the sentence.

4. The method for extracting scene graphs from Chinese text according to claim 3, characterized in that: When the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject S A Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

5. A system for extracting scene graphs from Chinese text, characterized in that: include: A Chinese text processing module is used to obtain an input Chinese text, determine whether the Chinese text contains a sentence with the Chinese character "ba" or "bei", and perform logical grammar processing if the sentence contains a sentence with the Chinese character "ba" or "bei"; A verb list module, used to obtain the verb V in the Chinese text A , the verb V A Add to the list of verbs; The subject processing module is used to traverse the verb list and obtain the verb V using the subject-predicate relationship SBV. A The corresponding subject S A ; The object processing module is used to obtain the verb V using the verb-object relationship VOB and the preposition object FOB A The corresponding object O A ; The attribute adding module is used to obtain the verb V A The corresponding subject S A and object O A Add to the object properties list; A scene graph generation module, used to extract the scene graph of the Chinese text from the object attribute list according to a preset extraction rule; It also includes a copula list module for constructing a copula list, wherein the copula list includes Chinese copulas, judgment verbs V A The corresponding object O A Is it included in the list of copulas? If the verb V A The corresponding object O A Included in the list of copulas, the object O A As subject S A Attributes; If the object O A Does not exist, the verb V A As subject S A Attributes; If the verb V A It is not a linking verb. First, determine the verb V. A Whether there is a verb-object relationship VOB and a prepositioned object FOB relationship; If there is a verb-object relationship VOB and a prepositioned object FOB relationship, the object O is obtained through the language technology platform LTP. A Part of speech, determine the object O A Is it a noun? If the object O A is a noun, then the object O is determined by the parallel relation COO. A Is there a parallel object O? B ; If there is a parallel object O B , then the object O A + parallel object O B As a verb V A The object of A As a verb V A The object of A is a verb, and obtains the object O through the subject-predicate relationship SBV A Subject S OA , and change the subject S OA + object O A As a verb V A The object of .

6. The system for extracting scene graphs from Chinese text according to claim 5, characterized in that: The logical grammar processing process of the ba and bei sentences is to divide the ba and bei sentences into two parts based on the ba and bei characters, and obtain the grammar trees of the two parts through the language technology platform LTP; The subject of the first part is obtained through the subject-predicate relationship SBV, and the subject of the second part and the predicate of the second part are obtained through the subject-predicate relationship SBV and the core relationship HED; When the subject-predicate relationship SBV does not exist, the parallel relationship COO is used to determine the verb V A Is there a parallel verb V? B ; If there is a parallel verb V B , find the parallel verb V B Is there a subject? If the parallel verb V B There is a subject-predicate relationship, and the parallel verb V is obtained through part-of-speech analysis of the language technology platform LTP B The subject is a noun, and the parallel verb V B The subject in V A The subject of When the subject-predicate relationship SBV exists, the parallel relationship COO is used to determine the subject S A Is there a parallel subject S? B , if there is a parallel subject S B And the part of speech is noun, then the verb V A The subject is S A +S B .

Citation Information

Patent Citations

  • Chinese entity relation extraction method based on keyword and verb dependency

    CN109241538A