CN113655933B - Text labeling method and device, storage medium and electronic equipment - Google Patents

Text labeling method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113655933B
CN113655933B CN202110942753.4A CN202110942753A CN113655933B CN 113655933 B CN113655933 B CN 113655933B CN 202110942753 A CN202110942753 A CN 202110942753A CN 113655933 B CN113655933 B CN 113655933B
Authority
CN
China
Prior art keywords
text
marked
labeled
annotated
target
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
CN202110942753.4A
Other languages
Chinese (zh)
Other versions
CN113655933A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110942753.4A priority Critical patent/CN113655933B/en
Publication of CN113655933A publication Critical patent/CN113655933A/en
Application granted granted Critical
Publication of CN113655933B publication Critical patent/CN113655933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0483Interaction with page-structured environments, e.g. book metaphor
    • 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/34Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/40Software arrangements specially adapted for pattern recognition, e.g. user interfaces or toolboxes therefor
    • 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/0482Interaction with lists of selectable items, e.g. menus
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure relates to the field of natural language processing technologies, and in particular, to a text labeling method and apparatus, a computer readable storage medium, and an electronic device, where the method includes: responding to the labeling operation of a user on the text to be labeled, configuring a text identifier for the text to be labeled, and determining whether an overlapped object exists between the text to be labeled and the labeled text; determining a marked text with an overlapped object with the text to be marked as a target text, and configuring frames for the target text and the text to be marked; and updating the text identifiers of the objects in the text to be annotated according to the target text and the overlapped objects, and configuring different display styles for the overlapped objects. The technical scheme of the embodiment of the disclosure solves the problem that the related technology is difficult to distinguish two marked text contents with overlapped objects.

Description

Text labeling method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of natural language processing, in particular to a text labeling method and device, a computer readable storage medium and electronic equipment.
Background
In the field of natural language understanding (NLU: natural Language Understanding), labeled data suitable for existing services is often needed before training a model, namely, texts in source data need to be labeled manually.
In the prior art, when texts are marked manually, when two marked texts have overlapped objects, the marked auditor is difficult to distinguish the contents in the two marked texts.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a text labeling method, a text labeling device, a computer-readable medium and an electronic apparatus, which further overcome at least to some extent the problem that it is difficult to distinguish two labeled text contents with overlapping objects in the related art.
According to a first aspect of the present disclosure, there is provided a text labeling method for differentially displaying labeled text, including:
responding to the labeling operation of a user on a text to be labeled, configuring a text identifier for the text to be labeled, and determining whether an overlapped object exists between the text to be labeled and the labeled text;
Determining the marked text which has an overlapped object with the text to be marked as a target text, and configuring frames for the target text and the text to be marked;
and updating the text identifiers of the objects in the text to be annotated according to the target text and the overlapped objects, and configuring different display styles for the overlapped objects.
According to a second aspect of the present disclosure, there is provided a text labeling apparatus for differentially displaying labeled text, the apparatus comprising:
The judging module is used for responding to the labeling operation of a user on the text to be labeled, configuring a text identifier for the text to be labeled and determining whether an overlapped object exists between the text to be labeled and the labeled text;
the determining module is used for determining the marked text with the overlapped object with the text to be marked as a target text and configuring frames for the text to be marked;
And the configuration module is used for updating the text identifier of each object in the text to be annotated according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
According to a third aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, comprising:
A processor; and
And a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the methods described above.
According to the text labeling method provided by the embodiment of the disclosure, a labeling operation of a user on a text to be labeled is responded, a text identifier is configured for the text to be labeled, and whether an overlapped object exists between the text to be labeled and the labeled text is determined; determining a marked text with an overlapped object with the text to be marked as a target text, and configuring frames for the target text and the text to be marked; and updating the text identifiers of the objects in the text to be annotated according to the target text and the overlapped objects, and configuring different display styles for the overlapped objects. Compared with the prior art, on one hand, frames are arranged for the marked text with the overlapped objects and the text to be marked, so that when a user clicks, the marked text and the text to be marked can be clearly distinguished. On the other hand, the text mark is reset for the overlapped object, and different display styles are configured for the overlapped object, so that a user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Further, the text identifier is reset for the overlapped object, when the user clicks the overlapped object, the labeling result of the target text and the labeling result of the text to be labeled can be generated simultaneously according to the text identifier of the overlapped object, so that the difficulty of distinguishing the labeled text with the overlapped area for the user is further reduced, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
FIG. 2 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied;
FIG. 3 schematically illustrates a schematic diagram of a related art labeling results presentation interface;
FIG. 4 schematically illustrates a flow chart of a text labeling method in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of a labeling results presentation interface in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates an overall flow diagram of a text labeling method in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a composition diagram of a text labeling device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
FIG. 1 illustrates a schematic diagram of a system architecture of an exemplary application environment in which text labeling methods and apparatus of embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of the terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The terminal devices 101, 102, 103 may be a variety of electronic devices having natural language processing capabilities including, but not limited to, desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
The text labeling method provided by the embodiment of the disclosure is generally executed by the terminal devices 101, 102 and 103, and accordingly, the text labeling device is generally arranged in the terminal devices 101, 102 and 103. However, it will be readily understood by those skilled in the art that the text labeling method provided in the embodiment of the present disclosure may be performed by the server 105, and accordingly, the text labeling device may also be disposed in the server 105, which is not specifically limited in the present exemplary embodiment.
The exemplary embodiments of the present disclosure provide an electronic device for implementing a text labeling method, which may be the terminal device 101, 102, 103 or the server 105 in fig. 1. The electronic device includes at least a processor and a memory for storing executable instructions of the processor, the processor configured to perform a text labeling method via execution of the executable instructions.
The configuration of the electronic device will be exemplarily described below using the mobile terminal 200 of fig. 2 as an example. It will be appreciated by those skilled in the art that the configuration of fig. 2 can also be applied to stationary type devices in addition to components specifically for mobile purposes. In other embodiments, mobile terminal 200 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interfacing relationship between the components is shown schematically only and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also employ a different interface from that of fig. 2, or a combination of interfaces.
As shown in fig. 2, the mobile terminal 200 may specifically include: processor 210, internal memory 221, external memory interface 222, universal serial bus (Universal Serial Bus, USB) interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 271, receiver 272, microphone 273, headset interface 274, sensor module 280, display screen 290, camera module 291, indicator 292, motor 293, keys 294, and subscriber identity module (subscriber identification module, SIM) card interface 295, among others. Wherein the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyro sensor 2803, and the like.
Processor 210 may include one or more processing units such as, for example: the Processor 210 may include an application Processor (Application Processor, AP), a modem Processor, a graphics Processor (Graphics Processing Unit, GPU), an image signal Processor (IMAGE SIGNAL Processor, ISP), a controller, a video codec, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), a baseband Processor and/or a neural network Processor (Neural-Network Processing Unit, NPU), and the like. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The NPU is a neural Network (Neural-Network, NN) computing processor, and can rapidly process input information by referencing a biological neural Network structure, such as referencing a transmission mode among human brain neurons, and can continuously learn. Applications such as intelligent awareness of the mobile terminal 200 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The processor 210 has a memory disposed therein. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transfer instructions, and notification instructions, and are controlled to be executed by the processor 210.
The charge management module 240 is configured to receive a charge input from a charger. The power management module 241 is used for connecting the battery 242, the charge management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charge management module 240 and provides power to the processor 210, the internal memory 221, the display 290, the camera module 291, the wireless communication module 260, and the like.
The wireless communication function of the mobile terminal 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. Wherein the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals; the mobile communication module 250 may provide a solution including 2G/3G/4G/5G wireless communication applied to the mobile terminal 200; the modem processor may include a modulator and a demodulator; the wireless communication module 260 may provide solutions for wireless communication including wireless local area network (Wireless Local Area Networks, WLAN), such as wireless fidelity (WIRELESS FIDELITY, wi-Fi) network, bluetooth (BT), etc., as applied on the mobile terminal 200. In some embodiments, antenna 1 and mobile communication module 250 of mobile terminal 200 are coupled, and antenna 2 and wireless communication module 260 are coupled, so that mobile terminal 200 may communicate with a network and other devices through wireless communication techniques.
The mobile terminal 200 implements display functions through a GPU, a display screen 290, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 290 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The mobile terminal 200 may implement a photographing function through an ISP, a camera module 291, a video codec, a GPU, a display screen 290, an application processor, and the like. The ISP is used for processing the data fed back by the camera module 291; the camera module 291 is used for capturing still images or videos; the digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals; video codec is used to compress or decompress digital video, and the mobile terminal 200 may also support one or more video codecs.
The external memory interface 222 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the mobile terminal 200. The external memory card communicates with the processor 210 via an external memory interface 222 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 221 may be used to store computer executable program code that includes instructions. The internal memory 221 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the mobile terminal 200, and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 210 performs various functional applications of the mobile terminal 200 and data processing by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
The mobile terminal 200 may implement audio functions through an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, an application processor, and the like. Such as music playing, recording, etc.
The depth sensor 2801 is used to acquire depth information of a scene. In some embodiments, a depth sensor may be provided at the camera module 291.
The pressure sensor 2802 is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 2802 may be disposed on display 290. The pressure sensor 2802 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like.
The gyro sensor 2803 may be used to determine a motion gesture of the mobile terminal 200. In some embodiments, the angular velocity of mobile terminal 200 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 2803. The gyro sensor 2803 can be used to capture anti-shake, navigation, motion-sensing game scenes, and the like.
In addition, sensors for other functions, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., may be provided in the sensor module 280 according to actual needs.
Other devices that provide auxiliary functionality may also be included in mobile terminal 200. For example, the keys 294 include a power-on key, a volume key, etc., by which a user can generate key signal inputs related to user settings and function controls of the mobile terminal 200. As another example, indicator 292, motor 293, SIM card interface 295, and the like.
In the field of natural language understanding (NLU: natural Language Understanding), labeled data suitable for existing services is often needed before model training, namely, source data needs to be labeled manually. In the manual labeling process, text slots refer to extracting needed contents from a section of text, manually selecting the slots, labeling, adding a description and the like.
The text is extracted on the web page, and the extracted text slot is usually added with a background color (background-color) different from the original text, that is, the text slot is highlighted, that is, the marked text is highlighted, and when the corresponding text slot is clicked by the mouse, a label corresponding to the text slot is displayed, and the like.
Because the existing text lifting groove highlighting method only highlights the text selected by the current mouse, and does not combine the marked and highlighted text in the text, when partial text overlapping occurs in the two text lifting grooves, the overlapping parts of the adjacent text lifting grooves and the text lifting grooves are highlighted and have the same color, and a labeling person or a labeling auditor is difficult to distinguish the contents of the two text lifting grooves; that is, the two marked texts include overlapping objects, that is, overlapping words, which makes it difficult for a marking auditor to distinguish the specific contents of the two marked texts. Secondly, because a new label is generated by dragging the text lifting groove according to a mouse every time, when the texts are overlapped, a new label is created in the original label, and then click event monitoring is added, so that when the text of the previous lifting groove is clicked, the frame of the text lifting groove cannot be displayed correctly;
Referring to the text labeling scheme shown in fig. 3, a mouse dragging area is first obtained, new labels and unique text identifiers are created for characters in the mouse dragging area, display attributes are added to display different background colors, clicking event monitoring is added, and when the characters in the area are clicked, frames are added to the whole area, and corresponding labels are displayed. When the two marked texts have overlapped objects, the marked auditor can hardly distinguish the contents in the two marked texts
The text labeling method and the text labeling device according to the exemplary embodiments of the present disclosure are specifically described below.
Fig. 4 shows a flow of a text labeling method in the present exemplary embodiment, including the following steps:
Step S410, responding to the labeling operation of a user to-be-labeled text, configuring a text identifier for the to-be-labeled text, and determining whether an overlapped object exists between the to-be-labeled text and the labeled text;
Step S420, determining the marked text with the overlapped object with the text to be marked as a target text, and configuring frames for the text to be marked;
And step S430, updating the text identifiers of the objects in the text to be annotated according to the target text and the overlapped objects, and configuring different display styles for the overlapped objects.
Compared with the prior art, on one hand, frames are arranged for the marked text with the overlapped objects and the text to be marked, so that when a user clicks, the marked text and the text to be marked can be clearly distinguished. On the other hand, the text mark is reset for the overlapped object, and different display styles are configured for the overlapped object, so that a user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Further, the text identifier is reset for the overlapped object, when the user clicks the overlapped object, the labeling result of the target text and the labeling result of the text to be labeled can be generated simultaneously according to the text identifier of the overlapped object, so that the difficulty of distinguishing the labeled text with the overlapped area for the user is further reduced, and the user experience is improved.
The above steps are described in detail below.
In step S410, in response to a labeling operation of a user on a text to be labeled, a text identifier is configured for the text to be labeled, and whether an overlapping object exists between the text to be labeled and the labeled text is determined.
In an example embodiment of the present disclosure, when a user annotates an article to be annotated, a processor may determine, in response to an annotation operation performed by the user on a text to be annotated in the article, whether the text to be annotated has an overlapping object with an annotated text in the article, where the overlapping object may be a repeated text in the text to be annotated and the annotated text.
In this exemplary embodiment, the processor may perform differential display on the noted text, for example, highlight the noted text, where the highlighting color may be yellow, green, or the like, or may be customized according to the user requirement, and in this exemplary embodiment, the method is not specifically limited.
In one example embodiment of the present disclosure, different highlighting colors may be configured according to the text type of the annotated text and the above-described authored text, and may be configured according to the text type as described above, e.g., the same display color may be configured for the same text type, and different highlighting colors may be configured for different text types.
Specifically, the text type may be a type of text in the text, for example, the text type may be an animal, a plant, etc., and different highlighting colors may be configured for the text corresponding to the animal and the plant.
In this example embodiment, when determining whether there is an overlapping object between the text to be annotated and the annotated text, a start point and an end point of the text to be annotated may be determined first; determining a starting point and an ending point of each marked text; and determining whether overlapping objects exist between the text to be annotated and the annotated text according to the starting point and the ending point of the text to be annotated and the starting point and the ending point of each annotated text.
Specifically, a labeled text list can be established according to the starting point and the ending point of the labeled text and the size arrangement of the starting point; and traversing the marked text list according to the starting point and the ending point of the text to be marked to determine whether overlapping objects exist between the text to be marked and the marked text.
In this exemplary embodiment, after determining that the start point and the end point of the text to be annotated are enough, the differential display effect of all the annotated text may be deleted, that is, all the annotated text is not highlighted. And after the labeling of the text to be labeled is completed, rendering the display areas of the labeled text and the text to be labeled so as to realize the differential display of the labeled text and the text to be labeled.
In this example embodiment, each of the above-described high-volume display colors for the boiling text may be topped according to the text type of each of the above-described labeled text at the time of rendering, and rendered.
In an example embodiment of the present disclosure, when determining the text to be annotated, a text identifier of the text to be annotated may be generated.
In step S420, the labeled text that has an overlapping object with the text to be labeled is determined as a target text, and a border is configured for the text to be labeled and the text to be labeled.
In this example embodiment, when the to-be-annotated text and the annotated text have overlapping objects, the annotated text having overlapping objects with the to-be-annotated text may be defined as a target text, and then a frame is configured for both the target text and the to-be-annotated text, so that when a user clicks on the to-be-annotated text or the target text, the frame is displayed, and the user can easily distinguish the content of the target text from the content of the to-be-annotated text.
The display modes of the frame with the marked text and the frame of the target text may be the same or different, and are not particularly limited in this exemplary embodiment.
In this example embodiment, when configuring the frame for the text to be annotated, a left frame, an upper frame, and a lower frame may be added to the object of the starting point of the text to be annotated, a right frame, an upper frame, and a lower frame may be added to the object of the ending point, and an upper frame and a lower frame may be added to the object located between the starting point and the ending point.
In step S430, the text identifier of each object in the text to be annotated is updated according to the target text and the overlapping object, and different display styles are configured for the overlapping object.
In this exemplary embodiment, the text to be annotated may be minimally and non-repeatedly divided according to the target text and the overlapping object, so as to obtain a plurality of object regions, and then the text identifier of each object region may be updated according to the target text and the overlapping object. For example, if the text to be annotated includes characters 1-10, the overlapping objects in the text to be annotated include 1,2, 3, 9, and 10. At this time, the text to be marked can be divided into three object areas of 1-3, 4-8 and 9-10, and then the text identification of each object area is determined according to the text identifications of the text to be marked and the target text.
For example, the target text may include a plurality of overlapping objects of the first target text and the text to be annotated are 1, 2, and 3; the overlapping objects of the second target text and the text to be marked comprise 9 and 10, if the text of the text to be marked is marked as A, the text of the first target text is marked as B, and the text of the second target text is marked as C, at this time, the text marks of the object areas 1-3 can be configured as A and B, and the text marks of the object areas 9-10 can be configured as A and C. According to the technical scheme, the text to be marked is divided into the regions, so that the determination of text identification of each object in the overlapping region is avoided, the marking efficiency is quickened, and the calculated amount is reduced.
In this exemplary embodiment, the target text may be two, three, four, etc., or may be more user-desired and customized, and is not specifically limited in this exemplary embodiment.
In this example embodiment, the text labeling method may further include responding to a triggering operation of a user on any object in the labeled text in the text display interface, displaying a frame corresponding to the labeled text, and displaying a labeling result corresponding to the labeled text on the labeling result display interface. Further, referring to fig. 5, the processor may further respond to a triggering operation of the user on the overlapped object in the text display interface 501 to display a frame corresponding to the text to be marked, and generate a marking result display interface 502, where the marking result display interface displays the target text and the marking result of the result to be marked. The triggering operation may be a click operation performed by the user on the overlapping object through a mouse, or a click operation performed by the user on the overlapping object through a touch panel, which is not specifically limited in this exemplary embodiment.
In this example embodiment, a selection interface 503 may be further included, where the selection interface 503 displays a selection box of the text to be annotated and the target text, and in response to a selection operation of the selection box by the user, the text corresponding to the selection operation may be highlighted on the annotation result display interface 502.
In one example embodiment of the present disclosure, the annotation result presentation area includes annotation content of the annotation text, text location, a label selection box, and an operation interface. The operation interface can respond to the triggering operation of the user on the deletion mark, and delete the labels of the texts to be labeled or the target texts.
In an example embodiment of the present disclosure, the processor may determine a priority order of a plurality of labeled texts corresponding to the overlapped object, where the priority order is determined according to a labeling time of the labeled texts, for example, a priority of a labeled text having a labeling time closest to a current time may be set to be the highest, that is, when a user clicks the overlapped object, a border of a labeled text having the highest priority among the labeled texts corresponding to the overlapped object is displayed.
In this exemplary embodiment, when the target text is different from the text to be annotated, that is, when the types of the target text and the text to be annotated are different, the fusion color of the highlighting color of the target text and the highlighting color of the text to be annotated is used as the target display color of the overlapping object, and when the target text is identical to the highlighting color of the text to be annotated, that is, when the types of the target text and the text to be annotated are identical, the overlapping object is configured with the target display color different from the highlighting color of the text to be annotated.
The text labeling method can be described in detail below with reference to fig. 6, where step S610 is first performed, specifically, a text to be labeled is selected from articles as the text to be labeled, step S620 is then performed, text identifiers are configured for the text to be labeled, specifically, the same text identifiers are configured for each text in the text to be labeled, step S630 is then performed, a target text with an overlapping object is determined for the text to be labeled, and segmentation is performed on the text to be labeled according to the target text and the overlapping object; then step S640 is executed to update the text identifier of the text to be annotated, and step S650 is executed to determine the display style to be annotated.
The details of the above steps are described in detail, so that each time the details are omitted.
In summary, in the present exemplary embodiment, the frames are set for the marked text and the text to be marked with overlapping objects, so that when the user clicks, the marked text and the text to be marked can be clearly distinguished. On the other hand, the text mark is reset for the overlapped object, and different display styles are configured for the overlapped object, so that a user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Further, the text identifier is reset for the overlapped object, when the user clicks the overlapped object, the labeling result of the target text and the labeling result of the text to be labeled can be generated simultaneously according to the text identifier of the overlapped object, so that the difficulty of distinguishing the labeled text with the overlapped area for the user is further reduced, and the user experience is improved.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Further, referring to fig. 7, in this exemplary embodiment, a text labeling device 700 is further provided, which includes a judging module 710, a determining module 720, and a configuring module 730. Wherein:
The judging module 710 may be configured to determine, in response to a labeling operation of a user on a text to be labeled, whether there is an overlapping object between the text to be labeled and the labeled text.
Specifically, the determining module 710 may determine a start point and an end point of the text to be annotated; determining a starting point and an ending point of each marked text; and determining whether overlapping objects exist between the text to be marked and the marked text according to the starting point and the ending point of the text to be marked and the starting point and the ending point of each marked text.
When determining whether an overlapping object exists between the text to be marked and the marked text according to the starting point and the ending point of the text to be marked and the starting point and the ending point of each marked text, a marked text list can be established according to the starting point and the ending point of each marked text and the size arrangement of the starting point; and traversing the marked text list according to the starting point and the ending point of the text to be marked to determine whether overlapping objects exist between the text to be marked and the marked text.
The determining module 720 may be configured to determine, as the target text, the labeled text having an object overlapping the text to be labeled, and configure a border for the text to be labeled and the text to be labeled.
The determining module 720 may be further configured to configure a frame for each labeled text; and responding to the triggering operation of the user on any object in the marked text, and displaying the corresponding border of the marked text.
The configuration module 730 may be configured to configure a text identifier for each object in the text to be annotated according to the target text and the overlapping object, and configure different display styles for the overlapping object.
Specifically, the differential display of the marked text includes highlighting the marked text, and configuring different display styles for the overlapping object, including setting a fusion color of the highlighting color of the target text and the highlighting color of the text to be marked as a target display color of the overlapping object when the highlighting color of the target text and the highlighting color of the text to be marked are different.
And when the target text is identical to the highlighting color of the text to be marked, configuring a target display color which is different from the highlighting color of the text to be marked for the overlapped object.
In this example embodiment, the text types of the annotated text and the text to be annotated may be determined first; and configuring highlighting colors for the marked text and the text to be marked according to the text types.
In this example embodiment, the text labeling device may further include a response module, configured to respond to a triggering operation of the user on the overlapping object, and display a frame corresponding to the text to be labeled; and generating a labeling result display interface, and displaying the labeling result of the text to be labeled of the target text and the labeling result of the target text on the labeling result display interface.
The specific details of each module in the above apparatus are already described in the method section, and the details that are not disclosed can be referred to the embodiment of the method section, so that they will not be described in detail.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for labeling text, the method comprising:
performing differential display on the marked text;
responding to the labeling operation of a user on a text to be labeled, configuring a text identifier for the text to be labeled, and determining whether an overlapped object exists between the text to be labeled and the labeled text;
Determining a marked text with an overlapped object with the text to be marked as a target text, and configuring frames for the target text and the text to be marked;
And according to the target text and the overlapped object, carrying out minimal non-repeated division on the text to be marked to obtain a plurality of object areas, updating text identifiers of the object areas according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
2. The method of claim 1, wherein differentially displaying the annotated text comprises highlighting the annotated text, the configuring the overlapping objects with different display styles comprising:
and when the highlighting color of the target text is different from that of the text to be marked, taking the fusion color of the highlighting color of the target text and that of the text to be marked as the target display color of the overlapped object.
3. The method of claim 2, wherein the overlapping object is configured with a target display color that is different from the highlighting color of the text to be annotated when the target text is the same as the highlighting color of the text to be annotated.
4. A method according to any one of claims 2 or 3, wherein the method further comprises:
determining the text types of the marked text and the text to be marked;
And configuring highlighting colors for the marked text and the text to be marked according to the text type.
5. The method of claim 1, wherein the determining whether there is an overlapping object between the text to be annotated and the annotated text comprises:
determining a starting point and an ending point of the text to be marked;
determining a starting point and an ending point of each marked text;
and determining whether overlapping objects exist between the text to be marked and the marked text according to the starting point and the ending point of the text to be marked and the starting point and the ending point of each marked text.
6. The method of claim 5, wherein the determining whether there is an overlapping object between the text to be annotated and the annotated text based on the start point and the end point of the text to be annotated and the start point and the end point of each of the annotated text comprises:
Establishing a marked text list according to the starting point and the ending point of each marked text and the size arrangement of the starting point;
And traversing the marked text list according to the starting point and the ending point of the text to be marked to determine whether overlapping objects exist between the text to be marked and the marked text.
7. The method according to claim 1, wherein the method further comprises:
configuring a frame for each marked text;
and responding to the triggering operation of the user on any object in the marked text, and displaying the frame corresponding to the marked text.
8. The method of claim 7, wherein the method further comprises:
Responding to the triggering operation of the user on the overlapped object, and displaying a frame corresponding to the text to be annotated;
And generating a labeling result display interface, and displaying the labeling result of the text to be labeled and the labeling result of the target text on the labeling result display interface.
9. A text labeling device, the device comprising:
the module is used for carrying out differential display on the marked text;
The judging module is used for responding to the labeling operation of a user on the text to be labeled, configuring a text identifier for the text to be labeled and determining whether an overlapped object exists between the text to be labeled and the labeled text;
the determining module is used for determining the marked text which has an overlapped object with the text to be marked as a target text and configuring frames for the target text and the text to be marked;
And the configuration module is used for carrying out minimum non-repeated division on the text to be annotated according to the target text and the overlapped object to obtain a plurality of object areas, updating the text identification of each object area according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the text labeling method according to any one of claims 1 to 8.
11. An electronic device, comprising:
A processor; and
A memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the text labeling method of any of claims 1-8.
CN202110942753.4A 2021-08-17 2021-08-17 Text labeling method and device, storage medium and electronic equipment Active CN113655933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110942753.4A CN113655933B (en) 2021-08-17 2021-08-17 Text labeling method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110942753.4A CN113655933B (en) 2021-08-17 2021-08-17 Text labeling method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113655933A CN113655933A (en) 2021-11-16
CN113655933B true CN113655933B (en) 2024-05-31

Family

ID=78479947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110942753.4A Active CN113655933B (en) 2021-08-17 2021-08-17 Text labeling method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113655933B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919287B (en) * 2021-12-06 2022-02-25 北京来也网络科技有限公司 Entity relationship labeling method and device combining RPA and AI and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040236A (en) * 1996-07-19 1998-02-13 Nec Corp Hypertext document processor with comments
KR100765781B1 (en) * 2006-04-13 2007-10-12 삼성전자주식회사 Method and apparatus for generating xhtml data
CN104298714A (en) * 2014-09-16 2015-01-21 北京航空航天大学 Automatic massive-text labeling method based on exception handling
CN111666735A (en) * 2020-07-07 2020-09-15 腾讯科技(深圳)有限公司 Image text label display method and device and storage medium
CN111898411A (en) * 2020-06-16 2020-11-06 华南理工大学 Text image labeling system, method, computer device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040236A (en) * 1996-07-19 1998-02-13 Nec Corp Hypertext document processor with comments
KR100765781B1 (en) * 2006-04-13 2007-10-12 삼성전자주식회사 Method and apparatus for generating xhtml data
CN101410789A (en) * 2006-04-13 2009-04-15 三星电子株式会社 Method and apparatus for generating XHTML data
CN104298714A (en) * 2014-09-16 2015-01-21 北京航空航天大学 Automatic massive-text labeling method based on exception handling
CN111898411A (en) * 2020-06-16 2020-11-06 华南理工大学 Text image labeling system, method, computer device and storage medium
CN111666735A (en) * 2020-07-07 2020-09-15 腾讯科技(深圳)有限公司 Image text label display method and device and storage medium

Also Published As

Publication number Publication date
CN113655933A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US20220405986A1 (en) Virtual image generation method, device, terminal and storage medium
US11875437B2 (en) Image drawing method based on target template image, apparatus, readable medium and electronic device
US20190012527A1 (en) Method and apparatus for inputting emoticon
US10789474B2 (en) System, method and apparatus for displaying information
CN110070496B (en) Method and device for generating image special effect and hardware device
CN112181576A (en) Form processing method, device, terminal and storage medium
JP7261732B2 (en) Method and apparatus for determining character color
US12019669B2 (en) Method, apparatus, device, readable storage medium and product for media content processing
WO2023197648A1 (en) Screenshot processing method and apparatus, electronic device, and computer readable medium
WO2024037557A1 (en) Special effect prop processing method and apparatus, electronic device, and storage medium
CN112188461A (en) Control method and device for near field communication device, medium and electronic equipment
CN113238727A (en) Screen switching method and device, computer readable medium and electronic equipment
CN113655933B (en) Text labeling method and device, storage medium and electronic equipment
WO2021227953A1 (en) Image special effect configuration method, image recognition method, apparatuses, and electronic device
CN109949793A (en) Method and apparatus for output information
WO2024046360A1 (en) Media content processing method and apparatus, device, readable storage medium, and product
CN109871465B (en) Time axis calculation method and device, electronic equipment and storage medium
WO2023098576A1 (en) Image processing method and apparatus, device, and medium
CN112016077A (en) Page information acquisition method and device based on sliding track simulation and electronic equipment
US11810336B2 (en) Object display method and apparatus, electronic device, and computer readable storage medium
CN111770484B (en) Analog card switching method and device, computer readable medium and mobile terminal
CN112153439A (en) Interactive video processing method, device and equipment and readable storage medium
CN112667321B (en) Quick application starting method and device, storage medium and electronic equipment
CN115499672B (en) Image display method, device, equipment and storage medium
US20240320256A1 (en) Method, apparatus, device, readable storage medium and product for media content processing

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