CN113655933A - 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
CN113655933A
CN113655933A CN202110942753.4A CN202110942753A CN113655933A CN 113655933 A CN113655933 A CN 113655933A CN 202110942753 A CN202110942753 A CN 202110942753A CN 113655933 A CN113655933 A CN 113655933A
Authority
CN
China
Prior art keywords
text
marked
labeled
target
overlapped
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.)
Granted
Application number
CN202110942753.4A
Other languages
Chinese (zh)
Other versions
CN113655933B (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
Priority claimed from CN202110942753.4A external-priority 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

Images

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 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 with an overlapped object with the text to be marked as a target text, and configuring a frame for the target text and the text to be marked; and updating the text identifier of each object in the text to be labeled according to the target text and the overlapped object, and configuring different display styles for the overlapped object. The technical scheme of the embodiment of the disclosure overcomes the problem that the related art 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 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.
Background
In the field of Natural Language Understanding (NLU), a training model is going to be able to apply to labeled data of the existing business, that is, manually labeling the text in the source data.
In the prior art, when a text is manually marked, when two marked texts have overlapped objects, a marking auditor is difficult to distinguish the contents in the two marked texts.
It is to be noted that the information disclosed in the above background section is only for enhancement of 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 is directed to a text labeling method, a text labeling apparatus, a computer readable medium, and an electronic device, thereby overcoming, at least to some extent, the problem of the related art that it is difficult to distinguish two labeled text contents having overlapping objects.
According to a first aspect of the present disclosure, a text labeling method for displaying labeled text in a differentiated manner is provided, 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 with an overlapped object with the text to be marked as a target text, and configuring a frame for the target text and the text to be marked;
and updating the text identifier of each object in the text to be labeled according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
According to a second aspect of the present disclosure, there is provided a text labeling apparatus for displaying labeled text in a differentiated manner, the apparatus comprising:
the judging module is used for responding to the marking operation of a text to be marked by a user, configuring a text identifier for the text to be marked and determining whether an overlapped object exists between the text to be marked and the marked text;
the determining module is used for determining the marked text with an overlapped object with the text to be marked as a target text and configuring a frame 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 labeled 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, a computer-readable medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the above-mentioned method.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, 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 above-described method.
The text labeling method provided by the embodiment of the disclosure responds to the labeling operation of a user on a text to be labeled, configures a text identifier for the text to be labeled, and determines whether an overlapped object exists between the text to be labeled and the labeled text; determining the marked text with an overlapped object with the text to be marked as a target text, and configuring a frame for the target text and the text to be marked; and updating the text identifier of each object in the text to be labeled according to the target text and the overlapped object, and configuring different display styles for the overlapped object. Compared with the prior art, on one hand, the frames are arranged for the marked text and the text to be marked with the overlapped objects, so that the marked text and the text to be marked can be clearly distinguished when a user clicks. On the other hand, the text identifier is reset for the overlapped object, and different display styles are configured for the overlapped object, so that the user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Furthermore, the text identification 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 identification of the overlapped object, the difficulty of distinguishing the labeling text with the overlapped area by 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 present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. 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 diagram of a related art annotation result presentation interface;
FIG. 4 schematically illustrates a flow chart of a text annotation process in an exemplary embodiment of the disclosure;
FIG. 5 is a schematic diagram illustrating an annotation result presentation interface in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates an overall flow chart of a text annotation process in an exemplary embodiment of the disclosure;
fig. 7 schematically illustrates a composition diagram of a text labeling apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different 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 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 their repetitive description 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 the form of 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 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a text annotation method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a natural language processing function, 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, server 105 may be a server cluster comprised of multiple servers, or the like.
The text annotation method provided by the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the text annotation apparatus is generally disposed in the terminal devices 101, 102, and 103. However, it is easily understood by those skilled in the art that the text annotation method provided in the embodiment of the present disclosure may also be executed by the server 105, and accordingly, the text annotation device may also be disposed in the server 105, which is not particularly limited in the exemplary embodiment.
The exemplary embodiment of the present disclosure provides an electronic device for implementing a text annotation 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 being configured to perform the text annotation method via execution of the executable instructions.
The following takes the mobile terminal 200 in fig. 2 as an example, and exemplifies the configuration of the electronic device. It will be appreciated by those skilled in the art that the configuration of figure 2 can also be applied to fixed type devices, in addition to components specifically intended for mobile purposes. In other embodiments, mobile terminal 200 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement 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 only schematically illustrated and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also interface differently than shown in fig. 2, or a combination of multiple interfaces.
As shown in fig. 2, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a microphone 272, a microphone 273, an earphone interface 274, a sensor module 280, a display 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identity Module (SIM) card interface 295. Wherein the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, and the like.
Processor 210 may include one or more processing units, such as: the Processor 210 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), and the like. The different processing units may be separate devices or may be integrated into one or more processors.
The NPU is a Neural-Network (NN) computing processor, which processes input information quickly by using a biological Neural Network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can implement applications such as intelligent recognition of the mobile terminal 200, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
A memory is provided in the processor 210. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and execution is controlled by processor 210.
The charge management module 240 is configured to receive a charging input from a charger. The power management module 241 is used for connecting the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives the input of the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 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 wireless communication of 2G/3G/4G/5G, etc. applied to the mobile terminal 200; the modem processor may include a modulator and a demodulator; the Wireless communication module 260 may provide a solution for Wireless communication including a Wireless Local Area Network (WLAN) (e.g., a Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), and the like, applied to the mobile terminal 200. In some embodiments, antenna 1 of the mobile terminal 200 is coupled to the mobile communication module 250 and antenna 2 is coupled to the wireless communication module 260, such that the mobile terminal 200 may communicate with networks and other devices via wireless communication techniques.
The mobile terminal 200 implements a display function through the GPU, the display screen 290, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 290 and an 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 alter display information.
The mobile terminal 200 may implement a photographing function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290, the application processor, and the like. The ISP is used for processing 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; the 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 extend the memory capability of the mobile terminal 200. The external memory card communicates with the processor 210 through the external memory interface 222 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
Internal memory 221 may be used to store computer-executable program code, which includes instructions. The internal memory 221 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (e.g., audio data, a 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 Storage (UFS), and the like. The processor 210 executes 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 an audio function through the audio module 270, the speaker 271, the receiver 272, the microphone 273, the earphone interface 274, the 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 to the camera module 291.
The pressure sensor 2802 is used to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 2802 may be disposed on the display screen 290. Pressure sensor 2802 can be of a wide variety, 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 the mobile terminal 200 about three axes (i.e., x, y, and z axes) may be determined by the gyroscope sensor 2803. The gyro sensor 2803 can be used to photograph anti-shake, navigation, body-feel game scenes, and the like.
In addition, other functional sensors, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light 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 for providing auxiliary functions may also be included in mobile terminal 200. For example, the keys 294 include a power-on key, a volume key, and the like, and a user can generate key signal inputs related to user settings and function control of the mobile terminal 200 through key inputs. Further examples include indicator 292, motor 293, SIM card interface 295, etc.
In the field of Natural Language Understanding (NLU), a training model is used to train labeled data that can be applied to an existing service, that is, manually labeling source data. In the manual labeling process, the text slots refer to the required content extracted from a segment of characters, and the slots are manually selected, marked with labels, added with descriptions and the like.
The slot position extraction of the text is performed on the webpage, and usually, a background color (background-color) different from that of the original text is added to the extracted text slot position, that is, the text slot position is highlighted, that is, the marked text is highlighted, and when the corresponding text slot position is clicked by a mouse, a label and the like corresponding to the text slot position are displayed.
Because the existing text lifting slot highlight display method only highlights the text selected by the current mouse, but does not combine the already marked and highlighted characters in the section of characters, when the two text lifting slots are partially overlapped, because the overlapped parts of the adjacent text lifting slots and the character lifting slots are highlighted and have the same color, a marking person or a marking auditor cannot distinguish the contents of the two text lifting slots; that is, the two marked texts include overlapping objects, that is, overlapping characters, so that it is difficult for a marking auditor to distinguish the specific contents of the two marked texts. Secondly, as a new label is generated by dragging the text lifting groove according to a mouse each time, when the text is overlapped, a new label is created in the original label and 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 correctly displayed;
referring to the text labeling scheme shown in fig. 3, a mouse dragging area is obtained first, a new label and a unique text identifier are created for characters in the mouse dragging area, display attributes are added to display different background colors, click event monitoring is added, and when characters in the area are clicked, a frame is added to the whole area to display a corresponding label. When there is no overlapping object between the text to be labeled and the labeled text, and when there is overlapping object between the two labeled texts, it is difficult for the label auditor to distinguish the contents in the two labeled texts
The following describes a text labeling method and a text labeling apparatus according to exemplary embodiments of the present disclosure.
Fig. 4 shows a flow of a text annotation method in the exemplary embodiment, which includes the following steps:
step S410, 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;
step S420, determining the marked text with the overlapped object with the text to be marked as a target text, and configuring a frame for the text to be marked;
step S430, updating the text identification of each object in the text to be labeled according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
Compared with the prior art, on one hand, the frames are arranged for the marked text and the text to be marked with the overlapped objects, so that the marked text and the text to be marked can be clearly distinguished when a user clicks. On the other hand, the text identifier is reset for the overlapped object, and different display styles are configured for the overlapped object, so that the user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Furthermore, the text identification 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 identification of the overlapped object, the difficulty of distinguishing the labeling text with the overlapped area by the user is further reduced, and the user experience is improved.
The above steps will be 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 it is determined whether there is an overlapping object between the text to be labeled and the labeled text.
In an example embodiment of the present disclosure, when a user marks an article to be marked, a processor may determine, in response to a marking operation of the user on a text to be marked in the article, whether the text to be marked and a marked text in the article have an overlapping object, where the overlapping object may be a repeated word in the text to be marked and the marked text.
In this example embodiment, the processor may perform differentiated display on the labeled text, for example, highlight the labeled text, where the highlight color may be yellow, green, or the like, and may also be customized according to a user requirement, and in this example embodiment, the processor is not specifically limited.
In an example embodiment of the present disclosure, different highlighting colors may be configured according to the text types of the marked-up text and the tape-coded text, for example, the same text type may be configured with the same display color, and different text types may be configured with different highlighting colors.
Specifically, the text type may be a type of a character in the text, for example, the text type may be an animal, a plant, or the like, and different highlighting colors may be configured for texts corresponding to the animal and the plant.
In the present exemplary 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 end point of each marked text; and determining whether an overlapping object exists between the text to be marked and the marked text according to the starting point and the end point of the text to be marked and the starting point and the end point of each marked text.
Specifically, a marked text list can be established according to the size arrangement of the starting point and the end point of the marked text according to the size arrangement of the starting point; and traversing the marked text list according to the starting point and the end point of the text to be marked to determine whether an overlapped object exists between the text to be marked and the marked text.
In this exemplary embodiment, when it is determined that the starting point and the end point of the text to be labeled are enough, the differentiated display effect of all labeled texts can be deleted, that is, all labeled texts are not highlighted. After the labeling of the text to be labeled is completed, rendering is performed on the display areas of the labeled text and the text to be labeled so as to realize the differentiated display of the labeled text and the text to be labeled.
In the present exemplary embodiment, when rendering, the text type of each labeled text may be used to set the top of each labeled text so as to boil the high-volume display color of the text, and render the text.
In an example embodiment of the present disclosure, when the text to be annotated is determined, a text identifier of the text to be annotated may be generated.
In step S420, the marked text having the overlapped object with the text to be marked is determined as the target text, and a border is configured for the text to be marked and the marked text.
In this exemplary embodiment, when there is an overlapping object between the text to be annotated and the annotated text, the annotated text that has an overlapping object with the text to be annotated may be defined as a target text, and then a frame is configured for both the target text and the text to be annotated, so that when the user clicks the text to be annotated or the target text, the frame is displayed, so that the user can distinguish the contents of the target text and the text to be annotated more easily.
The display modes of the border with the labeled text and the border with the target text may be the same or different, and are not specifically limited in this exemplary embodiment.
In the present exemplary embodiment, when configuring a border for the text to be annotated, a left border, an upper border, and a lower border may be added to an object at a starting point of the text to be annotated, a right border, an upper border, and a lower border may be added to an object at an end point, and an upper border and a lower border may be added to an object located between the starting point and the end point.
In step S430, the text identifiers of the objects in the text to be labeled are updated according to the target text and the overlapped objects, and different display styles are configured for the overlapped objects.
In this exemplary embodiment, the text to be annotated may be divided into a plurality of object regions by the minimum non-repetitive division according to the target text and the overlapping object, and then the text identifier of each object region is updated according to the target text and the overlapping object. For example, if the text to be labeled includes characters 1-10, the overlapping objects in the text to be labeled include 1, 2, 3, 9, and 10. At this time, the text to be annotated can be divided into three object areas, namely 1-3, 4-8 and 9-10, and then the text identifier of each object area is determined according to the text identifier of the text to be annotated and the text identifier of the target text.
For example, the target text may include a plurality of target texts, and the overlapping objects of the first target text and the text to be labeled are 1, 2, and 3; the overlapping object of the second target text and the text to be labeled comprises 9 and 10, if the text identifier of the text to be labeled is a, the text identifier of the first target text is B, and the text identifier of the second target text is C, then the text identifiers of the object areas 1-3 may be configured as a and B, and the text identifiers of the object areas 9-10 may be configured as a and C. According to the technical scheme, the text to be marked is subjected to region division, so that the text identification of each object in the overlapped region is prevented from being determined, the marking efficiency is improved, and the calculated amount is reduced.
It should be noted that, in the present exemplary embodiment, the target texts may be two, three, four, and the like, and may also have user requirements and be customized, and the present exemplary embodiment is not particularly limited.
In this example embodiment, the text labeling method may further include responding to a trigger operation of a user on any object in a labeled text in a text display interface, displaying a border corresponding to the labeled text, and displaying a labeling result corresponding to the labeled text on a labeling result display interface. Further, referring to fig. 5, the processor may further respond to a trigger operation of the user on an overlapped object in the text display interface 501, display a frame corresponding to the text to be annotated, generate a annotation result display interface 502, and display the target text and the annotation result of the result to be annotated on the annotation result display interface. The trigger operation may be a click operation of the overlapping object by a user through a mouse, or a click operation of the overlapping object by a user through a touch panel, which is not specifically limited in this exemplary embodiment.
In this exemplary embodiment, the selection interface 503 may further include a selection interface 503, where the selection interface 503 displays selection boxes of the text to be annotated and the target text, and may, in response to a selection operation of a user on a selection box, highlight a text corresponding to the selection operation on the annotation result display interface 502.
In an example embodiment of the present disclosure, the annotation result display area includes annotation content of the annotation text, a text position, a tag selection box, and an operation interface. The operation interface can respond to the trigger operation of the user on the deletion identifier, and delete the label of the text to be labeled or the target text.
In an example embodiment of the present disclosure, the processor may determine a priority order of a plurality of labeled texts corresponding to the overlapping object, where the priority order is determined according to the labeling time of the labeled texts, for example, the priority of the labeled text with the labeling time closest to the current time may be set to be the highest, that is, when the user clicks the overlapping object, a frame of the labeled text with the highest priority in the labeled texts corresponding to the overlapping object is displayed.
In this exemplary embodiment, when the highlight colors of the target text and the text to be annotated are different, that is, the text types of the target text and the text to be annotated are different, the highlight color of the target text and the fusion color of the highlight colors of the text to be annotated are used as the target display color of the overlapping object, and when the highlight colors of the target text and the text to be annotated are the same, that is, the text types of the target text and the text to be annotated are the same, the target display color different from the highlight color of the text to be annotated is configured for the overlapping object.
As described in detail below with reference to fig. 6, step S610 may be performed first, determining a text to be annotated, specifically, selecting a text to be annotated in an article as the text to be annotated, then step S620 is performed, configuring text identifiers for the text to be annotated, specifically, configuring the same text identifier for each text in the text to be annotated, then step S630 is performed, determining a target text having overlapping objects in the text to be annotated, and segmenting the text to be annotated according to the target text and the overlapping objects; step S640 is then executed to update the text identifier of the text to be annotated, and step S650 is then executed to determine the display style to be annotated.
The details of the above steps have been described in detail, and therefore are not described again.
In summary, in the exemplary embodiment, frames are set for both the marked text and the text to be marked having the overlapped object, 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 identifier is reset for the overlapped object, and different display styles are configured for the overlapped object, so that the user can easily find the position of the overlapped object, and the user can conveniently distinguish the content of the marked text.
Furthermore, the text identification 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 identification of the overlapped object, the difficulty of distinguishing the labeling text with the overlapped area by the user is further reduced, and the user experience is improved.
It is noted that the above-mentioned figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Further, referring to fig. 7, in the present exemplary embodiment, a text annotation apparatus 700 is further provided, which includes a determining module 710, a determining module 720, and a configuring module 730. Wherein:
the judging module 710 may be configured to respond to a labeling operation of a user on a text to be labeled, and determine whether an overlapping object exists between the text to be labeled and the labeled text.
Specifically, the determining module 710 may determine a starting point and an ending point of the text to be annotated; determining a starting point and an end point of each marked text; and determining whether an overlapping object exists between the text to be marked and the marked text according to the starting point and the end point of the text to be marked and the starting point and the end 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 end point of the text to be marked and the starting point and the end point of each marked text, establishing a marked text list according to the starting point and the end point of each marked text in a size arrangement manner; and traversing the marked text list according to the starting point and the end point of the text to be marked to determine whether an overlapped object exists between the text to be marked and the marked text.
The determining module 720 may be configured to determine the marked text having an overlapped object with the text to be marked as a target text, and configure a border for the text to be marked and the marked text.
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 a frame corresponding to the marked text.
The configuration module 730 may be configured to configure text identifiers for each object in the text to be labeled according to the target text and the overlapping object, and configure different display styles for the overlapping object.
Specifically, the differentiated display of the labeled text comprises highlighting the labeled text, configuring different display styles for the overlapped object, and taking the highlight color of the target text and the fusion color of the highlight color of the text to be labeled as the target display color of the overlapped object when the highlight colors of the target text and the text to be labeled are different.
And when the highlight display colors of the target text and the text to be marked are the same, configuring a target display color different from the highlight display color of the text to be marked for the overlapped object.
In the present exemplary embodiment, the text types of the marked text and the text to be marked may be determined first; and then configuring highlight display colors for the marked text and the text to be marked according to the text types.
In this exemplary embodiment, the text labeling apparatus may further include a response module, configured to respond to a trigger operation of a user on an overlapped object, and display a frame corresponding to a text to be labeled; and generating a marking result display interface, and displaying the marking result of the text to be marked of the target text and the marking result of the target text on the marking result display interface.
The specific details of each module in the above apparatus have been described in detail in the method section, and details that are not disclosed may refer to the method section, and thus are not described again.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally 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 above-described method of the present specification. In some possible embodiments, 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 perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through 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 variations, 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (12)

1. A text labeling method is characterized in that labeled text is displayed in a differentiated mode, and the method comprises the following steps:
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 with an overlapped object with the text to be marked as a target text, and configuring a frame for the target text and the text to be marked;
and updating the text identifier of each object in the text to be labeled according to the target text and the overlapped object, and configuring different display styles for the overlapped object.
2. The method according to claim 1, wherein the updating the text identifiers of the objects in the text to be labeled according to the target text and the overlapping object comprises:
according to the target text and the overlapped objects, performing minimum non-repeated division on the text to be labeled to obtain a plurality of object areas;
and updating the text identification of each object area according to the target text and the overlapped object.
3. The method of claim 1, wherein the differentiated display of the labeled text comprises highlighting the labeled text, and wherein configuring different display styles for the overlapping objects comprises:
and when the highlight colors of the target text and the text to be marked are different, taking the highlight color of the target text and the fusion color of the highlight colors of the text to be marked as the target display color of the overlapped object.
4. The method according to claim 3, wherein when the highlighting color of the target text and the highlighting color of the text to be labeled are the same, a target display color different from the highlighting color of the text to be labeled is configured for the overlapping object.
5. The method according to any one of claims 3 or 4, further comprising:
determining the text types of the marked text and the text to be marked;
and configuring highlight display colors for the marked text and the text to be marked according to the text type.
6. The method of claim 1, wherein the determining whether the text to be labeled and the labeled text have an overlapping object comprises:
determining a starting point and an end point of the text to be marked;
determining a starting point and an end point of each marked text;
and determining whether an overlapping object exists between the text to be marked and the marked text according to the starting point and the end point of the text to be marked and the starting point and the end point of each marked text.
7. The method according to claim 6, wherein the determining whether there is an overlapping object between the text to be labeled and the labeled text according to the starting point and the ending point of the text to be labeled and the starting point and the ending point of each labeled text comprises:
establishing a marked text list according to the size arrangement of the starting point and the end point of each marked text;
and traversing the marked text list according to the starting point and the end point of the text to be marked to determine whether an overlapped object exists between the text to be marked and the marked text.
8. The method of claim 1, further comprising:
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 a frame corresponding to the marked text.
9. The method of claim 8, 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 marked;
and generating a marking result display interface, and displaying the marking result of the text to be marked and the marking result of the target text on the marking result display interface.
10. A text labeling apparatus, wherein labeled text is displayed in a differentiated manner, the apparatus comprising:
the judging module is used for responding to the marking operation of a text to be marked by a user, configuring a text identifier for the text to be marked and determining whether an overlapped object exists between the text to be marked and the marked text;
the determining module is used for determining the marked text with an overlapped object with the text to be marked as a target text and configuring a frame 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 labeled according to the target text and the overlapped object and configuring different display styles for the overlapped object.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a text annotation method according to any one of claims 1 to 9.
12. An electronic device, comprising:
a processor; and
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the text annotation method of any one of claims 1-9.
CN202110942753.4A 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 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 Text labeling method and device, storage medium and electronic equipment

Publications (2)

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

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919287A (en) * 2021-12-06 2022-01-11 北京来也网络科技有限公司 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

Cited By (2)

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

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
US10789474B2 (en) System, method and apparatus for displaying information
CN110446066B (en) Method and apparatus for generating video
KR20200101014A (en) Electronic device supporting recommendation and download of avatar
CN110472558B (en) Image processing method and device
US11210563B2 (en) Method and apparatus for processing image
CN113806306B (en) Media file processing method, device, equipment, readable storage medium and product
WO2023197648A1 (en) Screenshot processing method and apparatus, electronic device, and computer readable medium
CN112188461A (en) Control method and device for near field communication device, medium and electronic equipment
CN112116690A (en) Video special effect generation method and device and terminal
CN112749362A (en) Control creating method, device, equipment and storage medium
CN113238727A (en) Screen switching method and device, computer readable medium and electronic equipment
CN113744286A (en) Virtual hair generation method and device, computer readable medium and electronic equipment
CN111176533A (en) Wallpaper switching method, device, storage medium and terminal
WO2024046360A1 (en) Media content processing method and apparatus, device, readable storage medium, and product
CN113205569A (en) Image drawing method and device, computer readable medium and electronic device
CN109871465B (en) Time axis calculation method and device, electronic equipment and storage medium
US11810336B2 (en) Object display method and apparatus, electronic device, and computer readable storage medium
CN113655933B (en) Text labeling method and device, storage medium and electronic equipment
CN111462548A (en) Paragraph point reading method, device, equipment and readable medium
CN111770484B (en) Analog card switching method and device, computer readable medium and mobile terminal
CN113655933A (en) Text labeling method and device, storage medium and electronic equipment
CN111159472B (en) Multimodal chat technique
CN117076702B (en) Image searching method and electronic equipment

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