CN109062890B - Label switching method and device and computer readable storage medium - Google Patents

Label switching method and device and computer readable storage medium Download PDF

Info

Publication number
CN109062890B
CN109062890B CN201810681057.0A CN201810681057A CN109062890B CN 109062890 B CN109062890 B CN 109062890B CN 201810681057 A CN201810681057 A CN 201810681057A CN 109062890 B CN109062890 B CN 109062890B
Authority
CN
China
Prior art keywords
entity
type
mouse
label
labeled
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
CN201810681057.0A
Other languages
Chinese (zh)
Other versions
CN109062890A (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 CN201810681057.0A priority Critical patent/CN109062890B/en
Publication of CN109062890A publication Critical patent/CN109062890A/en
Application granted granted Critical
Publication of CN109062890B publication Critical patent/CN109062890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Abstract

The application discloses a label switching method and device and a computer readable storage medium, wherein the method comprises the following steps: monitoring and receiving mouse operation of a user; detecting whether the received mouse operation is a predefined tag type obtaining operation and whether the offset position of the text where the current mouse is located is a marked entity; if the received mouse operation is a predefined operation for obtaining the label type and the offset position of the text where the current mouse is located is a labeled entity, obtaining the label type of the labeled entity at the offset position of the text where the current mouse is located; when the next entity is labeled, its tag type is automatically switched to the retrieved tag type. According to the method and the device, the label type of the labeled entity at the offset position of the text where the current mouse is located is obtained, and the label type of the next labeled entity is automatically switched to the obtained label type of the labeled entity, so that the time for frequently selecting the label type is saved, and the labeling efficiency is improved.

Description

Label switching method and device and computer readable storage medium
Technical Field
The present invention relates to the field of Natural Language Processing (NLP) technology, and in particular, to a method and an apparatus for switching tags and a computer-readable storage medium.
Background
With the popularization of big data and Artificial Intelligence (AI), technologies related to natural language processing will be increasingly used in enterprise-level applications. Currently, many large companies provide hypertext Transfer Protocol (HTTP) services that are part-of-speech recognition, entity recognition, relationship recognition, and other models, but most of the natural language processing models behind these services are trained from internet data. While the sources of the text contents in the internet are wide: there are both content from professional media and content generated by netizens personally. Compared with the content of the text in the enterprise, the Internet text has larger difference between word use and writing style. Therefore, the natural language processing technology is expected to achieve a better effect in enterprise-level applications, and generally needs to retrain the text in the enterprise into a natural language processing model suitable for the needs of the enterprise itself after marking the text.
For the more important tasks in NLP: such as part-of-speech recognition, entity recognition, etc., all require tagging using textual data in the enterprise, followed by training of the model. In the process of part-of-speech recognition and entity recognition, texts are labeled by using a plurality of labels (different parts-of-speech or different entity types are all called labels herein). In the process of labeling texts, the labels are often switched once every time a section of text is labeled. In the labeling task with a plurality of labels, switching the labels brings a very large workload.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a method and an apparatus for switching labels, and a computer-readable storage medium, which can improve labeling efficiency.
In order to solve the above technical problem, the technical solution of the embodiment of the present invention is implemented as follows:
the embodiment of the invention provides a label switching method, which comprises the following steps:
monitoring and receiving mouse operation of a user;
detecting whether the received mouse operation is a predefined tag type obtaining operation and whether the offset position of the text where the current mouse is located is a marked entity;
if the received mouse operation is a predefined operation for obtaining the label type and the offset position of the text where the current mouse is located is a labeled entity, obtaining the label type of the labeled entity at the offset position of the text where the current mouse is located;
when the next entity is labeled, its tag type is automatically switched to the retrieved tag type.
Further, the predefined operation of obtaining the tag type is double clicking of a left mouse button, single clicking of the left mouse button or single clicking of a right mouse button.
Further, the method further comprises:
when the marked entity is deleted, acquiring the label type of the deleted marked entity;
and when the next entity is labeled, automatically switching the label type of the next entity to the label type of the deleted labeled entity.
Further, the method further comprises:
when the marked entity is modified, acquiring the label type of the modified marked entity;
and when the next entity is labeled, automatically switching the label type of the next entity to the label type of the modified labeled entity.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the label switching method as described in any one of the above.
The embodiment of the invention also provides a label switching device, which comprises a processor and a memory, wherein:
the processor is configured to execute a tag switching program stored in the memory to implement the steps of the tag switching method as described in any one of the above.
The embodiment of the invention also provides a label switching device, which comprises a monitoring module and an automatic switching module, wherein:
the monitoring module is used for monitoring and receiving mouse operation of a user, detecting whether the received mouse operation is predefined tag type obtaining operation and whether the offset position of the text where the mouse is located is a marked entity, and if the received mouse operation is the predefined tag type obtaining operation and the offset position of the text where the mouse is located is the marked entity, obtaining the tag type of the marked entity at the offset position of the text where the mouse is located;
and the automatic switching module is used for automatically switching the label type of the next entity to the acquired label type when the next entity is labeled.
Further, the predefined operation of obtaining the tag type is double clicking of a left mouse button, single clicking of the left mouse button or single clicking of a right mouse button.
Further, the monitoring module is further configured to, when a labeled entity is deleted, obtain a label type of the deleted labeled entity;
the automatic switching module is further configured to, when the next entity is labeled, automatically switch the label type of the next entity to the label type of the deleted labeled entity.
Further, the monitoring module is further configured to, when the tagged entity is modified, obtain a tag type of the modified tagged entity;
and the automatic switching module is also used for automatically switching the label type of the next entity to the label type of the modified labeled entity when the next entity is labeled.
The technical scheme of the invention has the following beneficial effects:
according to the label switching method and device and the computer readable storage medium, the label type of the labeled entity at the offset position of the text where the current mouse is located is obtained, and the label type of the next labeled entity is automatically switched to the obtained label type of the labeled entity, so that the time for frequently selecting the label type is saved, and the labeling efficiency is improved.
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 without limiting the invention. In the drawings:
fig. 1 is a schematic flowchart of a label switching method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a text structure in a tag labeling process according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a tag switching device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Natural language processing is a general term for a large class of problems of processing, converting, and extracting information for data such as speech and text. Entities, where emphasis refers to Named Entity Recognition (NER) in the field of natural language processing, but is not limited to Named entities. Relationships, the emphasis here refers to entities and relationships between entities in the natural language processing domain. And (4) entity identification, namely extracting entities with certain semantic information, such as names, dates, places, organizations and the like from the input text. Relationship recognition extracts from the input text the entities and relationships between entities that have certain semantic information, such as parent and child, employment, geography, and the like. Training, which refers to a process of updating model parameters by a machine according to training data and a loss function in the field of machine learning. Chinese Word Segmentation (CWS) refers to segmenting a Chinese character sequence into a single Word. Word segmentation is a process of recombining continuous word sequences into word sequences according to a certain specification.
Referring to fig. 1, a label switching method according to an embodiment of the present invention includes the following steps:
step 101: monitoring and receiving mouse operation of a user;
step 102: detecting whether the received mouse operation is a predefined tag type obtaining operation and whether the offset position of the text where the current mouse is located is a marked entity;
in this embodiment, the predefined operation for obtaining the tag type is double-click of a left mouse button, single-click of a left mouse button, or single-click of a right mouse button.
Step 103: if the received mouse operation is a predefined operation for obtaining the label type and the offset position of the text where the current mouse is located is a labeled entity, obtaining the label type of the labeled entity at the offset position of the text where the current mouse is located;
in this embodiment, if the received mouse operation is not a predefined operation for obtaining a tag type or the offset position of the text where the current mouse is located is an unmarked entity, the step 101 is returned to, and the mouse operation of the user is continuously monitored and received.
Step 104: when the next entity is labeled, its tag type is automatically switched to the retrieved tag type.
In this embodiment, in addition to obtaining the tag type of the tagged entity as the tag type to be automatically switched by the user when the next entity is tagged, the tag type may also be directly selected by clicking the tag, and as the tag type to be automatically switched by the user when the next entity is tagged.
It should be noted that, when the tag type is initialized (at this time, the tag type of any tagged entity is not obtained, and no tag type is clicked), when the next entity is tagged, the tag type that is automatically switched for the user may be null, or the last tag type value used in the previous text may be taken.
In this embodiment, the method further includes:
when the marked entity is deleted, acquiring the label type of the deleted marked entity;
when the next entity is labeled, its label type is automatically switched to the label type of the deleted labeled entity.
The method further comprises the following steps:
when the marked entity is modified, acquiring the label type of the modified marked entity;
when the next entity is labeled, the label type of the next entity is automatically switched to the label type of the modified labeled entity.
Therefore, when the operation such as batch modification or deletion is carried out on the text of a certain label type, the time for selecting the label type is saved, and the labeling efficiency is improved.
As shown in FIG. 2, assuming that the content that we need to label now is "Allen Glant" and the tag should be labeled "Name", we can directly click the left mouse button to start the left labeled content "John Hammond", and then the type of the tag that we need to apply can be switched to "Name". That is, we get the label type on the tagged instance by clicking on it. And applying the label type to other texts needing to be labeled. This method is different from directly clicking the type of the tab in the tab bar and also different from switching the tab using a shortcut key or the like. The method has good effect on a large number of entities marked with multiple types.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the label switching method as described in any one of the above.
The embodiment of the invention also provides a label switching device, which comprises a processor and a memory, wherein:
the processor is configured to execute a tag switching program stored in the memory to implement the steps of the tag switching method as described in any one of the above.
As shown in fig. 3, a tag switching apparatus according to the present invention includes a listening module 301 and an automatic switching module 302, wherein:
the monitoring module 301 is configured to monitor and receive a mouse operation of a user, detect whether the received mouse operation is a predefined tag type obtaining operation and whether an offset position of a text where the mouse is located is a tagged entity, and if the received mouse operation is the predefined tag type obtaining operation and the offset position of the text where the mouse is located is the tagged entity, obtain a tag type of the tagged entity at the offset position of the text where the mouse is located;
an automatic switching module 302, configured to automatically switch the tag type of the next entity to the obtained tag type when the next entity is labeled.
In this embodiment, the predefined operation for obtaining the tag type is double-click of a left mouse button, single-click of a left mouse button, or single-click of a right mouse button.
In this embodiment, the monitoring module 301 may also directly select the tag type by clicking the tag, in addition to acquiring the tag type of the tagged entity as the tag type to be automatically switched by the user when the next entity is tagged, and automatically switch the tag type to be used as the tag type to be automatically switched by the user when the next entity is tagged.
It should be noted that, when the tag type is initialized (at this time, the tag type of any tagged entity is not obtained, or any tag type is not clicked), the automatic switching module 302 is used for when the next entity is tagged, the tag type that is automatically switched for the user may be null, or the last tag type value used in the previous text may be taken.
In this embodiment, the monitoring module 301 is further configured to, when a labeled entity is deleted, obtain a label type of the deleted labeled entity;
the automatic switching module 302 is further configured to, when the next entity is labeled, automatically switch the label type of the next entity to the label type of the labeled entity that is deleted.
In this embodiment, the monitoring module 301 is further configured to, when the tagged entity is modified, obtain a tag type of the modified tagged entity;
the automatic switching module 302 is further configured to, when the next entity is labeled, automatically switch the label type of the next entity to the label type of the modified labeled entity.
Therefore, when the operation such as batch modification or deletion is carried out on the text of a certain label type, the time for selecting the label type is saved, and the labeling efficiency is improved.
In this embodiment, if the received mouse operation is not a predefined operation for obtaining a tag type or the offset position of the text where the current mouse is located is an unmarked entity, the monitoring module 301 continues to monitor and receive the mouse operation of the user.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
The foregoing is only a preferred embodiment of the present invention, and naturally there are many other embodiments of the present invention, and those skilled in the art can make various corresponding changes and modifications according to the present invention without departing from the spirit and the essence of the present invention, and these corresponding changes and modifications should fall within the scope of the appended claims.

Claims (4)

1. A label switching method is characterized by comprising the following steps:
monitoring and receiving mouse operation of a user;
detecting whether the received mouse operation is a predefined tag type obtaining operation and whether the offset position of the current text of the mouse is a marked entity, wherein the predefined tag type obtaining operation is a mouse left key double click, a mouse left key click or a mouse right key click;
if the received mouse operation is a predefined operation for obtaining the label type and the offset position of the text where the current mouse is located is a labeled entity, obtaining the label type of the labeled entity at the offset position of the text where the current mouse is located; when the next entity is marked, automatically switching the label type of the next entity to the acquired label type;
when the marked entity is deleted, acquiring the label type of the deleted marked entity; when the next entity is labeled, automatically switching the label type of the next entity to the label type of the deleted labeled entity;
when the marked entity is modified, acquiring the label type of the modified marked entity; and when the next entity is labeled, automatically switching the label type of the next entity to the label type of the modified labeled entity.
2. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the label switching method as claimed in claim 1.
3. A label switching device, comprising a processor and a memory, wherein:
the processor is configured to execute a tag switching program stored in the memory to implement the steps of the tag switching method according to claim 1.
4. A label switching device is characterized by comprising a monitoring module and an automatic switching module, wherein:
the monitoring module is used for monitoring and receiving mouse operation of a user, detecting whether the received mouse operation is predefined tag type obtaining operation and whether the offset position of the text where the current mouse is located is a labeled entity, wherein the predefined tag type obtaining operation is left mouse button double click, left mouse button click or right mouse button click, and if the received mouse operation is the predefined tag type obtaining operation and the offset position of the text where the current mouse is located is the labeled entity, obtaining the tag type of the labeled entity at the offset position of the text where the current mouse is located; when the marked entity is deleted, acquiring the label type of the deleted marked entity; when the marked entity is modified, acquiring the label type of the modified marked entity;
an automatic switching module, configured to, if the currently obtained tag type is the tag type of the tagged entity, automatically switch the tag type of the next entity to the obtained tag type of the tagged entity when the next entity is tagged; if the currently acquired tag type is the tag type of the deleted labeled entity, automatically switching the tag type of the next entity to the tag type of the deleted labeled entity when the next entity is labeled; if the currently acquired tag type is the tag type of the modified tagged entity, when the next entity is tagged, the tag type of the next entity is automatically switched to the tag type of the modified tagged entity.
CN201810681057.0A 2018-06-27 2018-06-27 Label switching method and device and computer readable storage medium Active CN109062890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810681057.0A CN109062890B (en) 2018-06-27 2018-06-27 Label switching method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810681057.0A CN109062890B (en) 2018-06-27 2018-06-27 Label switching method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109062890A CN109062890A (en) 2018-12-21
CN109062890B true CN109062890B (en) 2022-05-17

Family

ID=64817936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810681057.0A Active CN109062890B (en) 2018-06-27 2018-06-27 Label switching method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109062890B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471597A (en) * 2019-07-25 2019-11-19 北京明略软件系统有限公司 A kind of data mask method and device, computer readable storage medium
CN111159494B (en) * 2019-12-30 2024-04-05 北京航天云路有限公司 Data labeling method for multi-user concurrent processing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9438947B2 (en) * 2013-05-01 2016-09-06 Google Inc. Content annotation tool
CN103678685A (en) * 2013-12-26 2014-03-26 华为技术有限公司 Webpage labeling method and device
CN104182533B (en) * 2014-08-28 2018-05-08 北京金山安全软件有限公司 Browser label switching method and device and terminal
CN104484328A (en) * 2014-10-23 2015-04-01 安徽教育网络出版有限公司 Educational resource semantic annotation method
US10635854B2 (en) * 2015-09-23 2020-04-28 International Business Machines Corporation Enhanced annotation tool
CN105930432B (en) * 2016-04-19 2020-01-07 北京百度网讯科技有限公司 Training method and device for sequence labeling tool

Also Published As

Publication number Publication date
CN109062890A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
US9292483B2 (en) Intelligent text annotation
EP2570974B1 (en) Automatic crowd sourcing for machine learning in information extraction
US9477963B2 (en) Method and apparatus for automatically structuring free form heterogeneous data
JP2017045453A (en) Document-specific gazetteers for named entity recognition
US20220335223A1 (en) Automated generation of chatbot
CN105117387B (en) A kind of intelligent robot interactive system
Kaur et al. A survey of named entity recognition in English and other Indian languages
WO2008098956A1 (en) Method and apparatus for automatically discovering features in free form heterogeneous data
CN108897869B (en) Corpus labeling method, apparatus, device and storage medium
US10467262B2 (en) Customized visualization based intelligence augmentation
CN111046656A (en) Text processing method and device, electronic equipment and readable storage medium
CN109191158B (en) Processing method and processing equipment for user portrait label data
JP2022548215A (en) Progressive collocation for real-time conversations
CN111209374B (en) Data query display method, device, computer system and readable storage medium
CN116108857B (en) Information extraction method, device, electronic equipment and storage medium
AU2020357557A1 (en) Mapping natural language utterances to nodes in a knowledge graph
US20170039293A1 (en) Question answering system with data mining capabilities
CN109062890B (en) Label switching method and device and computer readable storage medium
CN109062871B (en) Text labeling method and device and computer readable storage medium
CN110413996B (en) Method and device for constructing zero-index digestion corpus
CN114461749B (en) Data processing method and device for conversation content, electronic equipment and medium
CN108959248A (en) A kind of entity mask method and device, computer readable storage medium
US20230110127A1 (en) Intelligent creation of customized responses to customer feedback
US20220012421A1 (en) Extracting content from as document using visual information
CN109508382B (en) Label labeling method and device and computer readable storage medium

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