CN110377743B - Text labeling method and device - Google Patents

Text labeling method and device Download PDF

Info

Publication number
CN110377743B
CN110377743B CN201910679022.8A CN201910679022A CN110377743B CN 110377743 B CN110377743 B CN 110377743B CN 201910679022 A CN201910679022 A CN 201910679022A CN 110377743 B CN110377743 B CN 110377743B
Authority
CN
China
Prior art keywords
target
attribute
identifier
labeling
identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910679022.8A
Other languages
Chinese (zh)
Other versions
CN110377743A (en
Inventor
徐安华
廉雨薇
路德龙
马瑞璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201910679022.8A priority Critical patent/CN110377743B/en
Publication of CN110377743A publication Critical patent/CN110377743A/en
Application granted granted Critical
Publication of CN110377743B publication Critical patent/CN110377743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a text labeling method and a text labeling device, wherein the method comprises the following steps: acquiring a target text to be marked and a target attribute to be marked; determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords; and performing associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute, so that the problem of how to perform associated labeling on more than two keywords with certain association in a text in the related art can be solved, and the associated labeling among a plurality of keywords is realized.

Description

Text labeling method and device
Technical Field
The invention relates to the technical field of information, in particular to a text labeling method and device.
Background
Understanding human language by machines has been a problem that has been solved by various scholars. Artificial intelligence will also become a reality if the machine can have full knowledge of the human language and give appropriate feedback depending on the situation. While artificial intelligence is a well-known concept that holds an infinite expectation for machines to solve various problems, most people are not aware that the intelligence of machines is derived from manual information input, which is a large amount of manual information input to make machines intelligent.
Natural language processing is a major problem of artificial intelligence, and in popular speaking, natural language processing is to make a machine understand the meaning of languages in various expression forms such as characters and voice of human beings. Likewise, natural language processing still requires a large amount of manual information input as the basis for machine learning.
The manual information input is not any information, for the text field, the manual information input is marked information, and the marked data is valuable for the machine, namely a training set which people often say, and a certain amount of training set is required to be used as a learning source for machine learning.
The labeling of data is actually to label and classify the data according to the knowledge of human beings. It is equivalent to make a learning material which is special for the machine, and the machine can learn.
When data is labeled manually, labels of each entry in a text are generally labeled manually, in a label labeling method, attributes of each keyword in the text are labeled, and for more than two keywords with certain correlation, no solution is provided in the related technology.
Aiming at the problem of how to perform association labeling on more than two keywords with certain association in a text in the related technology, no solution is provided.
Disclosure of Invention
The embodiment of the invention provides a text labeling method and a text labeling device, which are used for at least solving the problem of how to perform associated labeling on more than two keywords with certain association in a text in the related technology.
According to an embodiment of the present invention, there is provided a text labeling method including:
acquiring a target text to be marked and a target attribute to be marked;
determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords;
and carrying out associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute.
Optionally, before performing associated annotation on the target attribute of the target object through the associated annotation identifier, the method further includes:
and acquiring the labeling identification of the target object.
Optionally, the performing associated labeling on the target attribute of the target object through an associated labeling identifier includes:
under the condition that the target object comprises a first target keyword and a second target keyword, acquiring a first labeling identifier of the first target keyword and one or more second labeling identifiers of the second target keyword;
under the condition that the second target keyword corresponds to one second annotation identification, displaying a first annotation identification associated with the one second annotation identification at a first preset position of the first target keyword;
and under the condition that the second target keyword corresponds to a plurality of second label identifications, displaying a plurality of first label identifications respectively associated with the plurality of second label identifications at a first preset position of the first target keyword, wherein one first label identification is associated with one second label identification, the plurality of second label identifications are different from each other, and the plurality of first label identifications are different from each other.
Optionally, determining the target object to be labeled in the target text according to the target attribute includes:
extracting target keywords in the target file;
determining a target attribute of the target keyword;
and acquiring a target object corresponding to the target attribute of the target keyword matched with the target attribute to be labeled from the target keyword, wherein the target object comprises at least two target keywords.
Optionally, determining the target attribute of the target keyword includes:
inputting the target keyword into a pre-trained target neural network model to obtain the probability of each attribute corresponding to the target keyword output by the target neural network model, wherein the attribute with the probability larger than a preset threshold value is determined as the target attribute.
Optionally, before determining a plurality of target objects to be labeled in the target text, the method further includes:
acquiring keywords with a preset number and attributes to which the keywords actually belong;
and training an original neural network model by using the preset number of keywords and the attribute to which the keywords actually belong to obtain the target neural network model, wherein the preset number of keywords are input into the original neural network model, and the target attribute to which the target keywords belong and the attribute to which the target keywords actually belong, which are output by the trained target neural network model, meet a preset target function.
Optionally, determining the target object to be labeled in the target text according to the target attribute includes:
receiving a selection instruction for selecting an object according to the target attribute;
and determining an object corresponding to the selected instruction as the target object.
Optionally, after the target attribute of the target object is subjected to associated tagging through the associated tagging identifier, the method further includes:
establishing and displaying a relation type identifier at a second preset position of a display interface, wherein the relation type identifier is an identifier of a corresponding relation of target attributes subjected to associated labeling;
and establishing association between the relation type identification and the identification corresponding to the target attribute corresponding to the relation type identification.
Optionally, after associating the relationship category identifier with an identifier corresponding to the target attribute corresponding to the relationship category identifier, the method further includes:
receiving a first selection instruction for selecting the relation category identification, and highlighting the relation category identification and the target attribute corresponding to the relation category identification according to the first selection instruction; or
And receiving a second selection instruction for selecting the target attribute, and highlighting the target attribute and the relation category identification corresponding to the target attribute according to the second selection instruction.
According to another embodiment of the present invention, there is also provided a text labeling apparatus including:
the first acquisition module is used for acquiring a target text to be marked;
the second acquisition module is used for acquiring the target attribute to be marked;
the determining module is used for determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords;
and the associated labeling module is used for performing associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute.
Optionally, the apparatus further comprises:
and the third acquisition module is used for acquiring the label identification of the target object.
Optionally, the association labeling module includes:
a first obtaining unit, configured to obtain a first label identifier of a first target keyword and one or more second label identifiers of a second target keyword when the target object is a set of two target keywords;
the first display unit is used for displaying a first label identifier associated with one second label identifier at a first preset position of the first target keyword under the condition that the second target keyword corresponds to the one second label identifier;
and the second display unit is used for displaying a plurality of first label identifications respectively associated with the plurality of second label identifications at a first preset position of the first target keyword under the condition that the second target keyword corresponds to the plurality of second label identifications, wherein one first label identification is associated with one second label identification, the plurality of second label identifications are different from each other, and the plurality of first label identifications are different from each other.
Optionally, the determining module includes:
the extraction unit is used for extracting the target key words in the target file;
a first determination unit configured to determine a target attribute of the target keyword;
and the second acquisition unit is used for acquiring a target object corresponding to the target attribute of the target keyword matched with the target attribute to be labeled from the target keywords, wherein the target object comprises at least two target keywords.
Optionally the first determination unit, is further configured to
Inputting the target keyword into a pre-trained target neural network model to obtain the probability of each attribute corresponding to the target keyword output by the target neural network model, wherein the attribute with the probability larger than a preset threshold value is determined as the target attribute.
Optionally, the apparatus further comprises:
the fourth acquisition module is used for acquiring keywords with a preset number and attributes to which the keywords actually belong;
and the training module is used for training an original neural network model by using the preset number of keywords and the attributes to which the keywords actually belong to obtain the target neural network model, wherein the preset number of keywords are input into the original neural network model, and the target attributes to which the target keywords actually belong and the attributes to which the target keywords actually belong output by the trained target neural network model meet a preset target function.
Optionally, the determining module includes:
the receiving unit is used for receiving a selection instruction for selecting the object according to the target attribute;
and the second determining unit is used for determining the object corresponding to the selected instruction as the target object.
Optionally, the apparatus further comprises:
the establishing module is used for establishing and displaying a relation category identifier at a second preset position of the display interface, wherein the relation category identifier is an identifier of a corresponding relation of the target attribute for associated labeling;
and the association establishing module is used for establishing association between the relationship type identification and the identification corresponding to the target attribute corresponding to the relationship type identification.
Optionally, the apparatus further comprises:
the first receiving module is used for receiving a first selection instruction for selecting the relation category identification, and highlighting the relation category identification and the target attribute corresponding to the relation category identification according to the first selection instruction; or
And the second receiving module is used for receiving a second selection instruction for selecting the target attribute and highlighting the target attribute and the relation category identification corresponding to the target attribute according to the second selection instruction.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the target text to be marked is obtained; acquiring target attributes to be marked; determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords; and performing associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute, so that the problem of how to perform associated labeling on more than two keywords with certain association in a text in the related art can be solved, and the associated labeling among a plurality of keywords is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a text labeling method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a text annotation method according to an embodiment of the invention;
FIG. 3 is a diagram illustrating text multiple relation labeling according to an embodiment of the present invention;
FIG. 4 is a block diagram of a text annotation device according to an embodiment of the invention;
FIG. 5 is a block diagram one of a text annotation device in accordance with a preferred embodiment of the present invention;
FIG. 6 is a block diagram II of a text annotation device according to a preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a text annotation method according to an embodiment of the present invention, as shown in fig. 1, a mobile terminal 10 may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the message receiving method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Based on the above mobile terminal, this embodiment provides a text annotation method, and fig. 2 is a flowchart of the text annotation method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, acquiring a target text to be labeled and a target attribute to be labeled;
step S204, determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords;
step S206, the target attribute of the target object is associated and labeled through an associated label identifier, wherein the label identifier is an identifier corresponding to the target attribute.
Acquiring a target text to be annotated through the steps S202 to S206; acquiring target attributes to be marked; determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords; and performing associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute, so that the problem of how to perform associated labeling on more than two keywords with certain association in a text in the related art can be solved, and the associated labeling among a plurality of keywords is realized.
Optionally, before the target attribute of the target object is related and labeled through the related label, the label of the target object is obtained according to the corresponding relationship between the preset keyword and the label.
Optionally, the step S206 may specifically include:
under the condition that the target object comprises a first target keyword and a second target keyword, acquiring a first labeling identifier of the first target keyword and one or more second labeling identifiers of the second target keyword;
under the condition that the second target keyword corresponds to one second annotation identification, displaying a first annotation identification associated with the one second annotation identification at a first preset position of the first target keyword;
and under the condition that the second target keyword corresponds to a plurality of second label identifications, displaying a plurality of first label identifications respectively associated with the plurality of second label identifications at a first preset position of the first target keyword, wherein one first label identification is associated with one second label identification, the plurality of second label identifications are different from each other, and the plurality of first label identifications are different from each other.
It should be noted that, in the case that the plurality of first annotation identifications correspond to one or more second annotation identifications, the plurality of first annotation identifications are respectively associated and displayed with the one or more second annotation identifications according to the above manner.
Optionally, the step S204 may specifically include:
s2041, extracting a target keyword in the target file;
s2042, determining the target attribute of the target keyword;
s2043, obtaining a target object corresponding to the target attribute of the target keyword matched with the target attribute to be labeled from the target keyword, wherein the target object comprises at least two target keywords.
Further, the step S2042 may specifically include:
inputting the target keyword into a pre-trained target neural network model to obtain the probability of each attribute corresponding to the target keyword output by the target neural network model, wherein the attribute with the probability larger than a preset threshold value is determined as the target attribute.
In the embodiment of the invention, a preset number of keywords and the attributes to which the keywords actually belong are obtained before a plurality of target objects to be labeled in the target text are determined; and training an original neural network model by using the preset number of keywords and the attribute to which the keywords actually belong to obtain the target neural network model, wherein the preset number of keywords are input into the original neural network model, and the target attribute to which the target keywords belong and the attribute to which the target keywords actually belong, which are output by the trained target neural network model, meet a preset target function.
In another optional embodiment, the step S204 may specifically include: receiving a selection instruction for selecting an object according to the target attribute; and determining the object corresponding to the selection instruction as the target object, namely, the user can select the target object through the selection instruction.
The embodiment of the invention can also highlight the associated label identification, establish and display the relationship type identification at the second preset position of the display interface after the target attribute of the target object is associated and labeled through the associated label identification, wherein the relationship type identification is the identification of the corresponding relationship of the target attribute which is associated and labeled; and establishing association between the relation type identification and the identification corresponding to the target attribute corresponding to the relation type identification.
Optionally, after the relationship category identifier is associated with an identifier corresponding to a target attribute corresponding to the relationship category identifier, receiving a first selection instruction for selecting the relationship category identifier, and highlighting the relationship category identifier and the target attribute corresponding to the relationship category identifier according to the first selection instruction; or receiving a second selection instruction for selecting the target attribute, and highlighting the target attribute and the relationship class identifier corresponding to the target attribute according to the second selection instruction.
The multiple relation labeling is simply to select one or more characters from a segment of natural language text for labeling, and any entity in the labeled characters can be singly or combined for labeling for many times after clicking 'overlapping label'. In addition, the label display relation item can be clicked to obtain a relation chain in the label text, and one entity can have a plurality of relations according to the situation. For example, the address entity can be subdivided into many levels, country, province, city, district, town, etc., so that the name of a person can correspond to so many addresses, and this method needs to be labeled with multiple relations.
Fig. 3 is a schematic diagram of multiple relationship labeling of text according to an embodiment of the present invention, and as shown in fig. 3, the ' suzuo ' and the ' X row X room X on north street in hengzhou in zhengzheng of the shi jia zheng county are labeled, the ' suzuo ' is a name entity, the ' X row X room X on north street in hengzhou in zheng of the shi jia zheng county ' is an address entity, and the ' shi jia ', ' zhengzheng prefecture in zheng of the shi jia zheng county ' is also an address entity. Related entities can be labeled, the label is shown as a figure, colored rectangular squares represent the entities, colored spherical labels represent the relationships, and spheres with the same color represent that a certain relationship exists between the entities. If the label is a Chinese label, displaying the first character of the Chinese label in the spherical label, and if the label is an English label, displaying the first two-digit letter; for example, a word of 'person' appears above 'suguang' (person 'represents' name of person '), and a word of' ground 'appears above' Shijiazhang '(ground' represents 'address'). The color of the circle above each address label is different, but the color of the circle above the name corresponds to the color of the circle above the name one by one, and the corresponding color is a relationship item; for example, the color of the circle above the label of the regular county of the 'Shijiazhuang' is dark blue, and the dark blue appears above the label of the 'Suguang' at the same time throughout the text, which means that the name of the 'Suguang' corresponds to the address of the regular county of the 'Shijiazhuang'. The 4 circles with 'person' above the 'suet' appear because the name corresponds to four addresses (which requires the application of multiple relational labels), and the number of circles in each row corresponds to the number of words labeled. If the label corresponding to more 'suave' appears, more rows of two circles per row appear on the 'suave', that is, the labels related to the spheres can be accumulated and arranged to the right and upward.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
The embodiment of the present invention further provides a text labeling apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and the description of the text labeling apparatus is omitted here. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a text labeling apparatus according to an embodiment of the present invention, as shown in fig. 4, including:
a first obtaining module 42, configured to obtain a target text to be labeled and a target attribute to be labeled;
a determining module 44, configured to determine, according to the target attribute, a target object to be labeled in the target text, where the target object includes at least two target keywords;
and the association labeling module 46 is configured to perform association labeling on the target attribute of the target object through an associated labeling identifier, where the labeling identifier is an identifier corresponding to the target attribute.
Fig. 5 is a block diagram of a text annotation device according to a preferred embodiment of the present invention, and as shown in fig. 5, the association annotation module 46 includes:
a first obtaining unit 52, configured to, in a case that the target object is a set of two target keywords, obtain a first annotation identifier of the first target keyword, and one or more second annotation identifiers of the second target keyword;
a first display unit 54, configured to display a first annotation identifier associated with one second annotation identifier at a first predetermined position of the first target keyword if the second target keyword corresponds to the one second annotation identifier;
a second display unit 56, configured to display, in a case that the second target keyword corresponds to a plurality of second annotation identifications, a plurality of first annotation identifications respectively associated with the plurality of second annotation identifications at a first predetermined position of the first target keyword, where one first annotation identification is associated with one second annotation identification, the plurality of second annotation identifications are different from each other, and the plurality of first annotation identifications are different from each other.
Optionally, the determining module 44 includes:
the extraction unit is used for extracting the target key words in the target file;
a first determination unit configured to determine a target attribute of the target keyword;
and the second acquisition unit is used for acquiring a target object corresponding to the target attribute of the target keyword matched with the target attribute to be labeled from the target keywords, wherein the target object comprises at least two target keywords.
Optionally, the first determining unit is further configured to
Inputting the target keyword into a pre-trained target neural network model to obtain the probability of each attribute corresponding to the target keyword output by the target neural network model, wherein the attribute with the probability larger than a preset threshold value is determined as the target attribute.
Optionally, the apparatus further comprises:
the third acquisition module is used for acquiring keywords with a preset number and attributes to which the keywords actually belong;
and the training module is used for training an original neural network model by using the preset number of keywords and the attribute to which the keywords actually belong to obtain the target neural network model, wherein the preset number of keywords are input into the original neural network model, and the target attribute to which the target keywords outputted by the trained target neural network model belong and the attribute to which the target keywords actually belong meet a preset target function.
Optionally, the determining module 44 includes:
the receiving unit is used for receiving a selection instruction for selecting the object according to the target attribute;
and the second determining unit is used for determining the object corresponding to the selected instruction as the target object.
Fig. 6 is a block diagram ii of a text labeling apparatus according to a preferred embodiment of the present invention, as shown in fig. 6, the apparatus further includes:
the establishing module 62 is configured to establish and display a relationship category identifier at a second predetermined position of the display interface, where the relationship category identifier is an identifier of a corresponding relationship of the target attribute for performing association labeling;
and an association establishing module 64, configured to establish an association between the relationship category identifier and an identifier corresponding to the target attribute corresponding to the relationship category identifier.
Optionally, the apparatus further comprises:
the first receiving module is used for receiving a first selection instruction for selecting the relation category identification, and highlighting the relation category identification and the target attribute corresponding to the relation category identification according to the first selection instruction; or
And the second receiving module is used for receiving a second selection instruction for selecting the target attribute and highlighting the target attribute and the relation category identification corresponding to the target attribute according to the second selection instruction.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
An embodiment of the present invention further provides a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the method embodiments described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s11, acquiring a target text to be labeled and a target attribute to be labeled;
s12, determining a target object to be labeled in the target text according to the target attribute;
s13, performing relevant labeling on the target attribute of the target object through a relevant labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s11, acquiring a target text to be labeled and a target attribute to be labeled;
s12, determining a target object to be labeled in the target text according to the target attribute;
s13, performing relevant labeling on the target attribute of the target object through a relevant labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A text labeling method is characterized by comprising the following steps:
acquiring a target text to be marked and a target attribute to be marked;
determining a target object to be labeled in the target text according to the target attribute;
performing associated labeling on a target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute;
establishing and displaying a relation type identifier at a second preset position of a display interface, wherein the relation type identifier is an identifier of a corresponding relation of target attributes subjected to associated labeling;
and establishing association between the relation type identification and the identification corresponding to the target attribute corresponding to the relation type identification.
2. The method of claim 1, wherein the performing associated labeling on the target attribute of the target object through the associated label identifier comprises:
under the condition that the target object is a set of two target keywords, acquiring a first labeling identifier of a first target keyword and one or more second labeling identifiers of a second target keyword;
under the condition that the second target keyword corresponds to one second annotation identification, displaying a first annotation identification associated with the one second annotation identification at a first preset position of the first target keyword;
and under the condition that the second target keyword corresponds to a plurality of second label identifications, displaying a plurality of first label identifications respectively associated with the plurality of second label identifications at a first preset position of the first target keyword, wherein one first label identification is associated with one second label identification, the plurality of second label identifications are different from each other, and the plurality of first label identifications are different from each other.
3. The method of claim 1, wherein determining the target object to be labeled in the target text according to the target attribute comprises:
extracting target keywords in the target file;
determining a target attribute of the target keyword;
and acquiring a target object corresponding to the target attribute of the target keyword matched with the target attribute to be labeled from the target keyword, wherein the target object comprises at least two target keywords.
4. The method of claim 3, wherein determining the target attribute of the target keyword comprises:
inputting the target keyword into a pre-trained target neural network model to obtain the probability of each attribute corresponding to the target keyword output by the target neural network model, wherein the attribute with the probability larger than a preset threshold value is determined as the target attribute.
5. The method of claim 1, wherein determining the target object to be labeled in the target text according to the target attribute comprises:
receiving a selection instruction for selecting an object according to the target attribute;
and determining an object corresponding to the selected instruction as the target object.
6. The method of claim 1, wherein after associating the relationship class identifier with an identifier corresponding to a target attribute corresponding to the relationship class identifier, the method further comprises:
receiving a first selection instruction for selecting the relation category identification, and highlighting the relation category identification and the target attribute corresponding to the relation category identification according to the first selection instruction; or
And receiving a second selection instruction for selecting the target attribute, and highlighting the target attribute and the relation category identification corresponding to the target attribute according to the second selection instruction.
7. A text labeling apparatus, comprising:
the first acquisition module is used for acquiring a target text to be labeled and a target attribute to be labeled;
the determining module is used for determining a target object to be labeled in the target text according to the target attribute, wherein the target object comprises at least two target keywords;
the associated labeling module is used for performing associated labeling on the target attribute of the target object through an associated labeling identifier, wherein the labeling identifier is an identifier corresponding to the target attribute;
the establishing module is used for establishing and displaying a relation category identifier at a second preset position of the display interface, wherein the relation category identifier is an identifier of a corresponding relation of the target attribute for associated labeling;
and the association establishing module is used for establishing association between the relation category identification and the identification corresponding to the target attribute corresponding to the relation category identification.
8. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN201910679022.8A 2019-07-25 2019-07-25 Text labeling method and device Active CN110377743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910679022.8A CN110377743B (en) 2019-07-25 2019-07-25 Text labeling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910679022.8A CN110377743B (en) 2019-07-25 2019-07-25 Text labeling method and device

Publications (2)

Publication Number Publication Date
CN110377743A CN110377743A (en) 2019-10-25
CN110377743B true CN110377743B (en) 2022-07-08

Family

ID=68256131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910679022.8A Active CN110377743B (en) 2019-07-25 2019-07-25 Text labeling method and device

Country Status (1)

Country Link
CN (1) CN110377743B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324706B (en) * 2020-01-21 2023-05-26 全球能源互联网研究院有限公司 Labeling method and device and electronic equipment
CN112560408A (en) * 2020-12-18 2021-03-26 广东轩辕网络科技股份有限公司 Text labeling method, text labeling device, text labeling terminal and storage medium
CN112784588B (en) * 2021-01-21 2023-09-22 北京百度网讯科技有限公司 Method, device, equipment and storage medium for labeling text
CN113822013B (en) * 2021-03-08 2024-04-05 京东科技控股股份有限公司 Labeling method and device for text data, computer equipment and storage medium
CN113592981B (en) * 2021-07-01 2022-10-11 北京百度网讯科技有限公司 Picture labeling method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2636098C1 (en) * 2016-10-26 2017-11-20 Общество с ограниченной ответственностью "Аби Продакшн" Use of depth semantic analysis of texts on natural language for creation of training samples in methods of machine training
CN107729319B (en) * 2017-10-18 2021-03-09 百度在线网络技术(北京)有限公司 Method and apparatus for outputting information
CN109325121B (en) * 2018-09-14 2021-04-02 北京字节跳动网络技术有限公司 Method and device for determining keywords of text
CN109460541B (en) * 2018-09-27 2023-02-21 广州大学 Vocabulary relation labeling method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110377743A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN110377743B (en) Text labeling method and device
CN108595494B (en) Method and device for acquiring reply information
US11645517B2 (en) Information processing method and terminal, and computer storage medium
CN109034864A (en) Improve method, apparatus, electronic equipment and storage medium that precision is launched in advertisement
CN110866093A (en) Machine question-answering method and device
CN109637238B (en) Method, device, equipment and storage medium for generating exercise questions
CN110019703B (en) Data marking method and device and intelligent question-answering method and system
CN108319888A (en) The recognition methods of video type and device, terminal
CN111523324A (en) Training method and device for named entity recognition model
CN110717312B (en) Text labeling method and device
CN108140055A (en) Trigger application message
CN115544241B (en) Intelligent pushing method and device for online operation
CN111144079A (en) Method and device for intelligently acquiring learning resources, printer and storage medium
CN110362826A (en) Periodical submission method, equipment and readable storage medium storing program for executing based on artificial intelligence
CN107358269B (en) Construction method of telecom user consumption portrait for precise marketing
CN109543049B (en) Method and system for automatically pushing materials according to writing characteristics
CN111144103A (en) Film review identification method and device
CN106407271B (en) Intelligent customer service system and updating method of intelligent customer service knowledge base thereof
CN116228361A (en) Course recommendation method, device, equipment and storage medium based on feature matching
CN115640403A (en) Knowledge management and control method and device based on knowledge graph
CN111274813A (en) Language sequence marking method, device storage medium and computer equipment
CN112765241B (en) Recall data determining method, recall data determining device and storage medium
CN112328812B (en) Domain knowledge extraction method and system based on self-adjusting parameters and electronic equipment
CN114862141A (en) Method, device and equipment for recommending courses based on portrait relevance and storage medium
CN111723164A (en) Address information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant