CN115116069A - Text processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN115116069A
CN115116069A CN202210800979.5A CN202210800979A CN115116069A CN 115116069 A CN115116069 A CN 115116069A CN 202210800979 A CN202210800979 A CN 202210800979A CN 115116069 A CN115116069 A CN 115116069A
Authority
CN
China
Prior art keywords
text
initial
feature
processing
character
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.)
Pending
Application number
CN202210800979.5A
Other languages
Chinese (zh)
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.)
Shanghai Laiyibert Network Technology Co ltd
Laiye Technology Beijing Co Ltd
Original Assignee
Shanghai Laiyibert Network Technology Co ltd
Laiye Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Laiyibert Network Technology Co ltd, Laiye Technology Beijing Co Ltd filed Critical Shanghai Laiyibert Network Technology Co ltd
Priority to CN202210800979.5A priority Critical patent/CN115116069A/en
Publication of CN115116069A publication Critical patent/CN115116069A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/232Orthographic correction, e.g. spell checking or vowelisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Character Discrimination (AREA)

Abstract

The present disclosure provides a text processing method, apparatus, electronic device, and storage medium, where the method includes: acquiring an initial text, wherein the initial text is obtained by identifying an image; determining text classification features corresponding to the initial text, wherein the text classification features describe text processing information; and processing the initial text according to the text processing information to obtain a target text. By means of the method and device for optimizing the text recognition based on the image recognition, after the text is obtained based on the image recognition, the personalized optimization processing can be carried out on the recognized text based on the text classification features corresponding to the text, and therefore the accuracy of the image-based text recognition can be effectively improved. The method can also combine robot process automation RPA and artificial intelligence AI to realize intelligent automation IA text processing, and further reduce resource cost consumed by text processing.

Description

Text processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image recognition technologies, and in particular, to a text processing method and apparatus, an electronic device, and a storage medium.
Background
Robot Process Automation (RPA) is a Process task that simulates human operations on a computer through specific robot software and automatically executes according to rules.
Artificial Intelligence (AI) is a technical science that studies and develops theories, methods, techniques and application systems for simulating, extending and expanding human Intelligence.
Intelligent Automation (IA) is a generic name for a series of technologies from robot Process Automation To artificial intelligence, and combines RPA with a variety of AI technologies such as Optical Character Recognition (OCR), Intelligent Character Recognition (ICR), Process Mining (Process Mining), Deep Learning (Deep Learning, DL), Machine Learning (Machine Learning, ML), Natural Language Processing (NLP), Speech Recognition (Automatic Speech Recognition, ASR), Speech synthesis (Text Speech, TTS), Computer Vision (Computer Vision, CV), To create a thought, Learning, and adaptive end-To-end Process flow, covering from discovery, Process coverage, To data collection through Automatic and continuous data collection, understanding data, and optimizing the meaning of the whole Process flow using data management and whole Process flow.
In the related art, there may be problems of shadows, stains, unevenness, blurring, and the like in an image, and the accuracy of text recognition based on an image is relatively low.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the present disclosure provides a text processing method, an apparatus, an electronic device, and a storage medium, which can perform personalized optimization processing on a recognized text based on a text classification feature corresponding to the text after the text is obtained based on image recognition, so that accuracy of image-based text recognition can be effectively improved.
The text processing method provided by the embodiment of the first aspect of the disclosure includes: acquiring an initial text, wherein the initial text is obtained by identifying an image; determining text classification features corresponding to the initial text, wherein the text classification features describe text processing information; and processing the initial text according to the text processing information to obtain a target text.
In one embodiment, determining text classification features corresponding to the initial text comprises:
if the initial text comprises the characters to be processed, determining initial morphological characteristics of the characters to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI), wherein the initial morphological characteristics are taken as text classification characteristics; and/or
If the initial text comprises the characters to be processed, determining initial character features of the characters to be processed by adopting an OCR technology, wherein the initial character features are taken as text classification features; and/or
And determining initial semantic features of the initial text by adopting an OCR technology, wherein the initial semantic features are taken as text classification features.
In one embodiment, the text processing information is described by an initial morphological feature;
the processing of the initial text according to the text processing information to obtain the target text comprises:
calling a Robot Process Automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters;
determining similarity information between the initial morphological characteristics and the reference morphological characteristics;
determining a processing result value according to the similarity information;
and processing the initial text according to the processing result value to obtain a target text.
In one embodiment, processing the result value includes: a confidence flag, and a confidence evaluation value corresponding to the information flag;
wherein, processing the initial text according to the processing result value to obtain the target text, and the method comprises the following steps:
if the confidence mark is the target mark and the confidence evaluation value is less than or equal to the set threshold value, adjusting the characters to be processed in the initial text into error correction characters to obtain a target text;
and if the confidence mark is not the target mark or the confidence evaluation value is larger than a set threshold value, taking the initial text as the target text.
In one embodiment, the text processing information is described by initial character features;
the processing of the initial text according to the text processing information to obtain the target text comprises:
calling an RPA robot to process the text processing information so as to determine the reference character characteristics;
and correcting the character to be processed in the initial text according to the reference character characteristics to obtain a target text.
In one embodiment, the text processing information is described by an initial semantic feature;
the processing of the initial text according to the text processing information to obtain the target text comprises:
calling an RPA robot to process the text processing information to determine an error correction corresponding relation, wherein the error correction corresponding relation comprises: a plurality of error correction texts and an error correction marking result corresponding to each error correction text;
determining an error correction text matched with the initial text from the plurality of error correction texts, wherein the matched error correction text has a corresponding error correction marking result;
and correcting the existing marking result of the initial text according to the corresponding error correction marking result to obtain the target text.
In one embodiment, the method for determining the initial morphological characteristics of the character to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI) comprises the following steps:
determining structural features, stroke features, coding features and/or radical features of characters to be processed by adopting an OCR technology;
and taking the structural feature, and/or the stroke feature, and/or the coding feature, and/or the radical feature as the initial morphological feature.
In one embodiment, determining initial character features of a character to be processed using OCR technology includes:
and determining the format characteristics of the character to be processed by adopting an OCR technology, and taking the format characteristics as initial character characteristics.
In one embodiment, determining initial semantic features of an initial text using OCR technology includes:
determining text semantics of the initial text and semantic marking results indicated by the text semantics by adopting an OCR technology;
and taking the text semantics and the semantic labeling result as initial semantic features.
The text processing apparatus provided in an embodiment of the second aspect of the present disclosure includes: the acquisition module is used for acquiring an initial text, wherein the initial text is obtained by identifying an image; the determining module is used for determining text classification characteristics corresponding to the initial text, wherein the text classification characteristics describe text processing information; and the processing module is used for processing the initial text according to the text processing information to obtain a target text.
In one embodiment, the determining module includes:
the first determining submodule is used for determining the initial morphological characteristics of the characters to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI) when the initial texts comprise the characters to be processed, wherein the initial morphological characteristics are used as text classification characteristics; and/or
The second determining submodule is used for determining the initial character features of the characters to be processed by adopting an OCR technology when the initial text comprises the characters to be processed, wherein the initial character features are used as text classification features; and/or
And the third determining submodule is used for determining the initial semantic features of the initial text by adopting an OCR technology, wherein the initial semantic features are taken as text classification features.
In one embodiment, the text processing information is described by an initial morphological feature;
wherein, the processing module is specifically configured to:
calling a Robot Process Automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters;
determining similarity information between the initial morphological characteristics and the reference morphological characteristics;
determining a processing result value according to the similarity information;
and processing the initial text according to the processing result value to obtain a target text.
In one embodiment, processing the result value includes: a confidence flag, and a confidence evaluation value corresponding to the information flag;
wherein, the processing module is specifically configured to:
if the confidence mark is the target mark and the confidence evaluation value is less than or equal to the set threshold value, adjusting the characters to be processed in the initial text into error correction characters to obtain a target text;
and if the confidence mark is not the target mark or the confidence evaluation value is larger than a set threshold value, taking the initial text as the target text.
In one embodiment, the text processing information is described by initial character features;
wherein, the processing module is specifically configured to:
calling an RPA robot to process the text processing information so as to determine the reference character characteristics;
and correcting the character to be processed in the initial text according to the reference character characteristics to obtain a target text.
In one embodiment, the text processing information is described by an initial semantic feature;
wherein, the processing module is specifically configured to:
calling an RPA robot to process the text processing information to determine an error correction corresponding relation, wherein the error correction corresponding relation comprises: a plurality of error correction texts and an error correction marking result corresponding to each error correction text;
determining an error correction text matched with the initial text from the plurality of error correction texts, wherein the matched error correction text has a corresponding error correction marking result;
and correcting the existing marking result of the initial text according to the corresponding error correction marking result to obtain the target text.
In an embodiment, the first determining submodule is specifically configured to:
determining structural features, stroke features, coding features and/or radical features of characters to be processed by adopting an OCR technology;
taking structural characteristics, and/or stroke characteristics, and/or coding characteristics, and/or radical characteristics as initial morphological characteristics.
In an embodiment, the second determining submodule is specifically configured to:
and determining the format characteristics of the character to be processed by adopting an OCR technology, and taking the format characteristics as initial character characteristics.
In an embodiment, the third determining submodule is specifically configured to:
determining text semantics of the initial text and semantic marking results indicated by the text semantics by adopting an OCR technology;
and taking the text semantics and the semantic labeling result as initial semantic features.
An embodiment of a third aspect of the present disclosure provides an electronic device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the text processing method set forth in the embodiments of the first aspect of the present disclosure.
The computer-readable storage medium provided in an embodiment of a fourth aspect of the present disclosure stores computer-executable instructions, and when a processor executes the computer-executable instructions, the text processing method provided in an embodiment of the first aspect of the present disclosure is implemented.
The advantages or beneficial effects in the above technical solution at least include: by acquiring an initial text, wherein the initial text is obtained by identifying an image, and determining a text classification feature corresponding to the initial text, wherein the text classification feature describes text processing information, and processing the initial text according to the text processing information to obtain a target text, after the text is obtained based on the image identification, personalized optimization processing can be performed on the identified text based on the text classification feature corresponding to the text, so that the accuracy of the image-based text identification can be effectively improved.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present disclosure will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference characters designate like or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are not to be considered limiting of its scope.
Fig. 1 is a schematic flowchart of a text processing method according to an embodiment of the disclosure;
fig. 2 is a schematic flow chart of a text processing method according to another embodiment of the disclosure;
fig. 3 is a schematic flowchart of a text processing method according to another embodiment of the disclosure;
fig. 4 is a flowchart illustrating a text processing method according to another embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a text processing apparatus according to an embodiment of the disclosure;
fig. 6 is a schematic structural diagram of a text processing apparatus according to another embodiment of the present disclosure;
fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of illustrating the present disclosure and should not be construed as limiting the same.
In the description of the present disclosure, the term "plurality" means two or more.
In the description of the present disclosure, the term "Robotic Process Automation (RPA)" refers to the automatic execution of a Process task according to a rule on a computer by a robot application software.
In the description of the present disclosure, the term "Artificial Intelligence (AI)" refers to the discipline of studying certain mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) that make computers simulate human beings, both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning technology, a deep learning technology, a big data processing technology, a knowledge map technology and the like.
In the description of the present disclosure, the term "Intelligent Automation (IA)" refers To a series of technologies from robot Process Automation To artificial intelligence, and combines RPA with a plurality of AI technologies such as Optical Character Recognition (OCR), Intelligent Character Recognition (ICR), Process Mining (Process Mining), Deep Learning (Deep Learning, DL), Machine Learning (Machine Learning, ML), Natural Language Processing (NLP), Speech Recognition (ASR), Speech synthesis (Text To Speech, TTS), Computer Vision (Computer Vision, CV), etc., to create end-to-end business processes that can think, learn, and adapt, ranging from process discovery, process automation, to using data to manage and optimize the entire course of a business process through automatic and continuous data collection, understanding the meaning of the data.
In the description of the present disclosure, the term "initial text" refers to the text to be processed, which may be recognized from an image.
In the description of the present disclosure, the term "text classification feature" refers to a classification category feature obtained by performing feature classification on an initial text.
In the description of the present disclosure, the term "word to be processed" refers to a word included in an initial text, and when the initial text is optimized correspondingly, a global or local optimization process may be performed on the portion of the word, so that the word may be referred to as a word to be processed.
In the description of the present disclosure, the term "initial morphological feature" refers to a morphological feature of the word to be processed, such as a formal feature, an arrangement combination feature, a structural feature, and the like.
In the description of the present disclosure, the term "character to be processed" refers to a character (number, letter, symbol, etc.) included in an initial text, and when the initial text is optimized accordingly, the character portion may be optimized globally or locally, and the character may be referred to as a character to be processed.
In the description of the present disclosure, the term "initial character feature" refers to a feature related to a character to be processed, such as a meaning feature, a morphological feature, an arrangement feature, and the like.
In the description of the present disclosure, the term "initial semantic feature" refers to a semantic feature of the initial text, such as a semantic meaning characterized by the initial text, or an inferred semantic meaning, etc.
In the description of the present disclosure, the term "text processing information" refers to a way method for performing personalized optimization processing on the initial text.
In the description of the present disclosure, the term "target text" refers to a text that is processed accordingly on the original text.
In the description of the present disclosure, the term "structural feature" refers to a feature of a word that exhibits a structural aspect, such as an upper-middle-lower structure, an upper-lower structure, a left-right structure, and the like.
In the description of the present disclosure, the term "stroke characteristics" refers to characteristics of stroke dimensions of a word, such as the order of strokes, the number of strokes, and so forth.
In the description of the present disclosure, the term "coding feature" refers to a coding feature obtained by correspondingly coding a character, for example, a four-corner code or the like.
In the description of the present disclosure, the term "radical feature" refers to a feature of a radical dimension of a character obtained by radical recognition on the character.
In the description of the present disclosure, the term "error correction text" refers to text used for error correction reference to text to be processed.
In the description of the present disclosure, the term "reference morphological feature" refers to an error correction word-related morphological feature.
In the description of the present disclosure, the term "similarity information" refers to information describing a situation of similarity between an initial morphological feature of a word to be processed and a reference morphological feature of an error-corrected word.
The Intelligent automation platform can realize seamless integration of multiple capabilities such as RPA (Intelligent Document Processing, IDP), Conversational AI (Conversational AI, CoAI), Process Mining (Process Mining), has five major functions of 'business understanding', 'Process creation', 'anywhere operation', 'centralized control' and 'man-machine cooperation', realizes end-to-end Intelligent automation of business processes for enterprises, replaces manual operation, further improves business efficiency and accelerates digital transformation.
Intelligent Document Processing (IDP) is one of the core capabilities of an intelligent automation platform. The Intelligent Document Processing (IDP) is a new generation of automation technology that identifies, classifies, extracts elements, checks, compares, corrects, and the like, various documents based on AI technologies such as Optical Character Recognition (OCR), Computer Vision (CV), Natural Language Processing (NLP), and Knowledge Graph (KG), and helps enterprises to realize intellectualization and automation of Document Processing work.
These and other aspects of embodiments of the disclosure will be apparent with reference to the following description and attached drawings. In the description and drawings, particular embodiments of the disclosure have been disclosed in detail as being indicative of some of the ways in which the principles of the embodiments of the disclosure may be practiced, but it is understood that the scope of the embodiments of the disclosure is not limited thereby. On the contrary, the embodiments of the disclosure include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
A text processing method according to an embodiment of the present disclosure is described below with reference to the drawings.
Fig. 1 is a schematic flowchart of a text processing method according to an embodiment of the disclosure.
The embodiment is exemplified by the text processing method being configured in a text processing apparatus, the text processing method in the embodiment may be configured in the text processing apparatus, the text processing apparatus may be disposed in a server, or may also be disposed in an electronic device, and the embodiment of the present disclosure does not limit this.
The present embodiment takes the case where the text processing method is configured in the electronic device as an example. Among them, electronic devices such as smart phones, tablet computers, personal digital assistants, electronic books, and other hardware devices having various operating systems.
It should be noted that the execution subject of the embodiment of the present disclosure may be, for example, a Central Processing Unit (CPU) in a server or an electronic device in terms of hardware, and may be, for example, a related background service in the server or the electronic device in terms of software, which is not limited to this.
The text processing method in the embodiment of the present disclosure may be a text processing method that implements IA by combining RPA and AI, and of course, any other possible technique or combination of techniques may also be used to implement the text processing method in the embodiment of the present disclosure, which is not limited to this.
In addition, the term "Processing" in the embodiments of the present disclosure may refer to, for example, a process of implementing text Processing by the intelligent automation IA in combination with the robot process automation RPA and the artificial intelligence AI, that is, the process of text Processing is a process of fully automated text Processing, and the process of text Processing is also combined with the artificial intelligence AI to implement text Processing in the field of Natural Language Processing (NLP) automatically.
The present disclosure may be applied in particular in the field of Natural Language Processing (NLP) for artificial intelligence AI, that is, in the field of computer science, artificial intelligence, linguistics concerning the interaction between computers and human (Natural) Language.
For example, in the embodiment of the present disclosure, based on the full-process automation text processing process, it may be implemented that the full-process automation RPA technology is performed to obtain an initial text based on the robot-process automation RPA technology, where the initial text is obtained by image recognition, a text classification feature corresponding to the initial text is determined based on an artificial intelligence AI technology, where the text classification feature describes text processing information, and the initial text is processed according to the text processing information to obtain a target text.
As shown in fig. 1, the text processing method includes:
s101: and acquiring an initial text, wherein the initial text is obtained by image recognition.
In the description of the present disclosure, the term "initial text" refers to the text to be processed, which may be recognized from an image.
For example, the image may be recognized based on techniques such as optical character recognition OCR, intelligent character recognition ICR, flow mining PM, deep learning DL, machine learning ML, natural language processing NLP, and the like, and the text recognized from the image may be used as the initial text.
In the embodiment of the disclosure, after the initial text obtained by image recognition is acquired, the subsequent personalized optimization processing on the initial text can be triggered, so that the accuracy of the text recognition based on the image is improved.
S102: text classification features corresponding to the initial text are determined, wherein the text classification features describe text processing information.
In the description of the present disclosure, the term "text classification feature" refers to a classification category feature obtained by performing feature classification on an initial text.
For example, if the text is in a text form, the text classification feature may be a text category, if the text is in a character form, the text classification feature may be a character category, and if the semantic meaning of the text is a city, the text classification feature may be a city short for category, which is not limited to this.
For example, the form of the text may be confirmed, the text classification feature may be confirmed based on the form actually presented by the text, or the semantics represented by the text may also be confirmed, and the text classification feature may be confirmed based on the semantics actually represented by the text, or the spatial dimension feature of the text may also be confirmed, and the text classification feature may be confirmed based on the spatial dimension feature actually possessed by the text, which is not limited thereto.
Optionally, in some embodiments, when determining the text classification feature corresponding to the initial text, it may be that when the initial text includes the character to be processed, an optical character recognition OCR technology in the field of artificial intelligence AI is used to determine an initial morphological feature of the character to be processed, where the initial morphological feature is taken as the text classification feature; and/or when the initial text comprises characters to be processed, determining initial character features of the characters to be processed by adopting an OCR technology, wherein the initial character features are taken as text classification features; and/or determining the initial semantic features of the initial text by adopting an OCR technology, wherein the initial semantic features are used as text classification features, so that the text classification features of the initial text can be quickly and effectively identified, and when a personalized optimization processing mode is determined based on the identified text classification features, the initial text can be accurately and pertinently optimized, and the text processing effect is improved.
In the description of the present disclosure, the term "word to be processed" refers to a word included in an initial text, and when the initial text is optimized correspondingly, a global or local optimization process may be performed on the portion of the word, so that the word may be referred to as a word to be processed.
Words to be processed, such as those directly contained in the original text.
In the description of the present disclosure, the term "initial morphological feature" refers to a morphological feature of the word to be processed, such as a formal feature, an arrangement combination feature, a structural feature, and the like.
In the description of the present disclosure, the term "character to be processed" refers to a character (number, letter, symbol, etc.) included in an initial text, and when the initial text is optimized accordingly, the character portion may be optimized globally or locally, and the character may be referred to as a character to be processed.
Characters to be processed, such as dates in the original text.
In the description of the present disclosure, the term "initial character feature" refers to a feature related to a character to be processed, such as a meaning feature, a morphological feature, an arrangement feature, and the like.
In the description of the present disclosure, the term "initial semantic feature" refers to a semantic feature of the initial text, such as a semantic meaning characterized by the initial text, or an inferred semantic meaning, etc.
And initial semantic features such as city abbreviation and city full name in initial text.
After the initial text is obtained, the content included in the initial text may be determined first, and then the content is analyzed to determine whether the text is a character or a character, and when the initial text includes a character part, whether the character is a character to be optimized is determined, if so, the character is taken as the character to be processed, and then the initial morphological feature of the character is determined, and when the initial text includes a character part, whether the character is the character to be optimized is determined, if so, the character is taken as the character to be processed, and then the initial character feature of the character is determined, or a direct semantic meaning or an extended semantic meaning carried by the character may be directly analyzed based on the initial text, so as to determine the initial semantic feature.
After determining the text classification feature corresponding to the initial text, the text processing information described by the text classification feature may be obtained.
In the description of the present disclosure, the term "text processing information" refers to a way method for performing personalized optimization processing on the initial text.
The text processing information, for example, may be a method of performing global or local error correction on characters in the initial text, a method of performing error correction on dates in the initial text, or a method of performing correction processing on cities for short in the initial text, which is not limited in this respect.
The text processing information may be configured in advance, or may be dynamically set, which is not limited to this.
For example, a processing method adapted to each text classification feature may be configured in advance, and a key field encapsulating the adapted processing method may be extracted as text processing information, or a processing information generation model may be established, and the text classification feature may be input to the processing information generation model to obtain processing information output by the processing information generation model as text processing information, which is not limited thereto.
S103: and processing the initial text according to the text processing information to obtain a target text.
In the description of the present disclosure, the term "target text" refers to a text that is processed accordingly on the original text.
After the text classification features corresponding to the initial text are determined and the text processing information described by the text classification features is determined, the initial text can be processed directly based on the text processing information to obtain the target text.
For example, the text processing information, for example, a method for performing global or local error correction on characters in the initial text, a method for performing error correction on a date in the initial text, or a method for performing correction processing on a city in the initial text for short, may perform adaptive processing on the initial text by using the corresponding text processing information to obtain the target text.
In the embodiment of the disclosure, implementation processing logic related to a text processing method may be encapsulated in a plug-in, and the plug-in is inserted into a platform capable of implementing Robot Process Automation (RPA), and supports a project developer to import and refer to the plug-in, and perform corresponding parameterization configuration, so that text recognition based on an image can be implemented continuously.
In the embodiment, by acquiring the initial text, wherein the initial text is obtained by identifying the image, and determining the text classification feature corresponding to the initial text, wherein the text classification feature describes the text processing information, and processing the initial text according to the text processing information to obtain the target text, after the text is obtained based on the image identification, the identified text can be subjected to personalized optimization processing based on the text classification feature corresponding to the text, so that the accuracy of the image-based text identification can be effectively improved.
Fig. 2 is a schematic flowchart of a text processing method according to another embodiment of the disclosure.
As shown in fig. 2, the text processing method includes:
s201: acquiring initial text, wherein the initial text is obtained by image recognition.
For the description of S201, refer to the above embodiments, and are not described herein again.
S202: and determining initial morphological characteristics corresponding to the initial text by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI), wherein the initial morphological characteristics describe text processing information.
In the description of the present disclosure, the term "initial morphological feature" refers to a morphological feature of the word to be processed, such as a formal feature, an arrangement combination feature, a structural feature, and the like.
Optionally, in some embodiments, when the initial morphological feature of the word to be processed is determined, OCR technology may be adopted to determine a structural feature, and/or a stroke feature, and/or a coding feature, and/or a radical feature of the word to be processed, and the structural feature, and/or the stroke feature, and/or the coding feature, and/or the radical feature is used as the initial morphological feature, so that a manner of characterizing the initial morphological feature of the word in the initial text is effectively extended, so that the determined initial morphological feature sufficiently embodies a morphological situation of the word in the initial text, and effective error correction and correction of the word to be processed in the initial text are facilitated.
In the description of the present disclosure, the term "structural feature" refers to a feature of a word that exhibits a structural aspect, such as an upper-middle-lower structure, an upper-lower structure, a left-right structure, and the like.
In the description of the present disclosure, the term "stroke characteristics" refers to characteristics of stroke dimensions of a word, such as the order of strokes, the number of strokes, and so forth.
In the description of the present disclosure, the term "coding feature" refers to a coding feature obtained by correspondingly coding a character, for example, a four-corner code or the like.
In the description of the present disclosure, the term "radical feature" refers to a feature of a radical dimension of a character obtained by radical recognition on the character.
S203: and calling a robot flow automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters.
In the description of the present disclosure, the term "error correction text" refers to text used for error correction reference to text to be processed.
In the description of the present disclosure, the term "reference morphological feature" refers to an error correction word-related morphological feature.
For example, if the text processing information is, for example, a method for performing global or local error correction on a word in an initial text, the text processing information may be analyzed, a plurality of candidate corrected words are determined by combining the word to be processed, then, the reference morphological feature of each corrected word is analyzed to determine a probability condition for correcting the word to be processed based on the corrected word, and the obtained probability value may be used to determine an error correction processing opportunity.
S204: similarity information between the initial morphological feature and the reference morphological feature is determined.
In the description of the present disclosure, the term "similarity information" refers to information describing a situation of similarity between an initial morphological feature of a word to be processed and a reference morphological feature of an error-corrected word.
After determining the reference morphological feature of the error correction word according to the text processing information, similarity information between the initial morphological feature and the reference morphological feature may be determined, for example, similarity analysis may be performed between the initial morphological feature and the reference morphological feature, and the analysis result may be used as similarity information, which may be used for determining the timing of error correction later.
For example, a correction list is obtained, for example, the automobile brand of the client agent has [ general purpose card ', ' toyota card ', ' lincoln card ', and the like, where the ' general purpose card ', ' toyota card ', ' lincoln card ' may be referred to as error correction words, and the word to be processed in the identified initial text may be one of the error correction words or a word having a form close to that of one of the error correction words, and similarity information between the word to be processed and each of the error correction words may be calculated, where the similarity information may include: similarity information determined based on structural features, and/or similarity information determined based on stroke features, and/or similarity information determined based on coding features, and/or similarity information determined based on radical features.
For example, the similarity information determined based on the stroke features may be stroke number similarity; the similarity information determined based on the structural characteristics can be the structural similarity of Chinese characters, and whether the characters are characters or characters can be obtained through the disassembly of the characters, wherein the characters can be disassembled into an upper-lower structure, an upper-middle-lower structure, a left-right structure and the like, the characters are disassembled to the minimum granularity, namely the characters, and the characters can be disassembled into stroke sequences, namely the minimum particles of the characters. Similarity information determined based on structural features is divided into: the similarity of the texts and the texts, the similarity of the words and the characters, and the similarity of the texts and the words; the similarity information determined based on the coding features may be four-corner coding similarity; the similarity information determined based on the feature of the radical may be the radical similarity.
S205: and determining a processing result value according to the similarity information.
After the similarity information of each dimension is obtained, fitting processing can be performed on the similarity information of multiple dimensions to obtain a processing result value.
In the description of the present disclosure, the term "processing result value" refers to a result value obtained by fitting processing of one-dimensional or multi-dimensional similarity information, which can be mapped out the one-dimensional or multi-dimensional similarity information, and may be regarded as a result value of quantization processing of the one-dimensional or multi-dimensional similarity information, which may be used as a reference value for processing the original text.
When determining the processing result value according to the similarity information, the processing result value may be obtained by determining the weight information of the structural feature, and/or the stroke feature, and/or the coding feature, and/or the radical feature of the character to be processed, and then processing the corresponding similarity information based on the weight information of each feature.
For example, a total similarity (i.e., a processing result value) can be calculated by the above similarity information of each dimension characteristic and the weight information corresponding to each dimension characteristic, and is used as a final similarity judgment criterion.
Wherein, the weight information corresponding to each dimension characteristic is distributed as follows:
the weight of similarity information of structural features > the weight of similarity information of coding features > the weight of similarity information of radical features > the weight of similarity information of stroke features.
Best example after testing:
weight of similarity information of structural features: 10;
weight of similarity information of coding features: 8;
similarity information weight of radical features: 6;
weight of similarity information of stroke features: 2;
the total weight is (weight of similarity information of structural features + weight of similarity information of coding features + weight of similarity information of radical features + weight of similarity information of stroke features);
total score (similarity of Chinese character structure) and weight of similarity information of structural features
+ four corner coding similarity degree weight of similarity degree information of coding features
+ similarity of radical and weight of similarity information of radical features
+ stroke number similarity ×. weight of similarity information of stroke features);
the total similarity (i.e., the processing result value) is the total score/total weight.
S206: and processing the initial text according to the processing result value to obtain a target text.
After the processing result value is determined, it may be determined to perform local correction or global correction on the initial text based on the processing result value, and then correct the initial text based on the determined correction manner to obtain the target text, which is not limited in this respect.
Optionally, in some embodiments, processing the result value comprises: the method includes the steps that a confidence mark and a confidence evaluation value corresponding to an information mark are processed according to a processing result value to obtain a target text, when the confidence mark is the target mark and the confidence evaluation value is smaller than or equal to a set threshold value, characters to be processed in the initial text are adjusted to be error correction characters to obtain the target text, and when the confidence mark is not the target mark or the confidence evaluation value is larger than the set threshold value, the initial text is used as the target text, so that effective correction of the initial text based on the processing result value is achieved, the correction processing effect of the characters to be processed in the initial text is effectively improved, and the accuracy of character recognition based on images is effectively improved.
For example, the similarity between the initial morphological feature and the reference morphological feature may be characterized based on the edit distance, and the smaller the edit distance, the higher the similarity between the initial morphological feature and the reference morphological feature.
The correction is exemplified as follows:
correction data source (comprising a plurality of correction words): [ 'Linqing brand', 'Universal brand', 'Toyota brand', 'Lincoln brand' ];
OCR recognition results: wood love cards;
and (4) correcting the result: ('Lincoln brand', 3.5769230769230766, True);
wherein, 'lincoln' is a corrected word, 3.5769230769230766 represents a confidence evaluation value (which can be calculated from a processing result value), True represents an information identifier, True represents an object identifier, if the information identifier is the object identifier, it represents confidence, and if the information identifier is not the object identifier (i.e. the information identifier is False), it represents no information.
OCR recognition results: wood condition;
and (4) correcting the result: ('Lincoln brand', 3.5769230769230766, True);
OCR recognition results: a wood emotion card;
and (4) correcting the result: ('Linqing brand', 2.2897435897435896, True);
OCR recognition results: wood + wood emotion cards;
and (4) correcting the result: ('Linqing brand', 6, False);
OCR recognition results: wood Z-wood feeling cards;
and (4) correcting the result: ('Linqing brand', 6, False).
The correction results show that:
three values are returned, respectively: corrected content, confidence evaluation value and whether confidence exists;
corrected content, by calculating the most similar result in the corrected data source;
the confidence evaluation value can be calculated in such a manner that the smallest edit distance + (1-word similarity maximum) among the plurality of edit distances of the word to be processed in the initial text and the error-corrected word candidate in the correction data source;
whether confidence exists or not, if the confidence evaluation value is less than or equal to 5.0 points (set threshold value), the confidence exists (value is True), if the confidence evaluation value is more than 5.0 points, the confidence does not exist (value is False);
when the confidence is TRUE, the correction result can be directly used, that is, the characters to be processed in the initial text are replaced by the error correction characters, and when the confidence is False, whether the correction result is used can be judged according to the actual situation.
In this embodiment, by acquiring the initial text, wherein the initial text is obtained by recognizing the image, and the optical character recognition OCR technology in the artificial intelligence AI field is adopted to determine the initial morphological characteristics corresponding to the initial text, wherein the initial morphological characteristics describe text processing information, and the robot process automation RPA robot is invoked to process the text processing information, to determine the reference morphological characteristics of the error-corrected text, to determine similarity information between the initial morphological characteristics and the reference morphological characteristics, and to determine a processing result value according to the similarity information, and processing the initial text according to the processing result value to obtain a target text, and determining a strategy for correcting the initial text based on the initial morphological characteristics of the characters to be processed in the initial text, thereby effectively improving the pertinence of correcting the characters to be processed in the initial text and improving the accuracy of processing the characters in the initial text.
Fig. 3 is a flowchart illustrating a text processing method according to another embodiment of the disclosure.
As shown in fig. 3, the text processing method includes:
s301: acquiring initial text, wherein the initial text is obtained by image recognition.
For the description of S301, refer to the above embodiments, and are not described herein again.
S302: an initial character feature corresponding to the initial text is determined using OCR technology, wherein the initial character feature describes the text processing information.
In the description of the present disclosure, the term "initial character feature" refers to a feature related to a character to be processed, such as a meaning feature, a morphological feature, an arrangement feature, and the like.
Optionally, the initial text may be subjected to character analysis to obtain a character to be processed included in the initial text, and then the character to be processed is subjected to meaning recognition to obtain a meaning characteristic, or the character is subjected to form recognition to obtain a form characteristic, or when the character to be processed forms a character sequence, the arrangement combination characteristic of each character in the character sequence is analyzed to obtain an arrangement characteristic, and then the meaning characteristic, and/or the form characteristic, and/or the arrangement combination characteristic may be used as the initial character characteristic.
Optionally, in some embodiments, when the OCR technology is used to determine the initial character feature of the character to be processed, the OCR technology may be used to determine the format feature of the character to be processed, and the format feature is used as the initial character feature, so that the format feature of the character to be processed in the initial text is effectively analyzed, the error correction adjustment of the format feature of the character to be processed is facilitated, and the accuracy of format recognition of the character to be processed is improved.
In the description of the present disclosure, the term "format feature" refers to a format-related feature of characters to be processed in the original text.
For example, if the character to be processed characterizes a date, the written format feature of its date may be referred to as a format feature.
S303: the RPA robot is invoked to process the text processing information to determine reference character characteristics.
In the description of the present disclosure, the term "reference character feature" refers to a character feature referred to for error correction processing of a character to be processed in an initial text.
The reference character feature may be, for example, a format feature as a reference, the reference character feature may be calibrated in advance, and if it is determined that the character to be processed represents a date, a standard format feature of the date may be obtained as the reference format feature.
The reference character feature may also be obtained by parsing based on the text processing information, which is not limited to this.
S304: and correcting the character to be processed in the initial text according to the reference character characteristics to obtain a target text.
After the RPA robot is called to process the text processing information to determine the reference character features, corresponding error correction processing can be performed on the initial character features of the characters to be processed in the initial text according to the reference character features, and the initial text after the character error correction processing is used as the target text.
For example, assuming that an error correction is performed on a date (represented in a character form, and a character representing the date may be, for example, a character to be processed) in an initial text, the format of the date may be identified, a writing format of the date in the initial text is identified as a format feature, and the format feature is compared with a reference character feature (which may be, for example, a reference format feature) to confirm the correctness of the writing format feature, and then the writing format feature is corrected based on the reference character feature, specifically, for example, a year completion may be performed, the year is 4 bits, and if 2 bits are completed before 20 bits; if the 3 bit is supplemented with 2; if the length is more than 4, taking the last 4 bits; completing the month, wherein the month is 2 bits, and if the front of 1 bit is supplemented with 0; completing every day, wherein every day is 2 bits, and if the front of 1 bit is supplemented with 0; recognition error correction, e.g. 8 as B, 2 as Z, respectively, -as + or ═ is recognized.
In the embodiment, by acquiring an initial text, wherein the initial text is obtained by image recognition, determining an initial character feature corresponding to the initial text by using an OCR technology, wherein the initial character feature describes text processing information, and calling an RPA robot to process the text processing information to determine a reference character feature, and performing correction processing on a character to be processed in the initial text according to the reference character feature to obtain a target text, a strategy for determining correction processing on the character to be processed based on the initial character feature of the character to be processed in the initial text is realized, the pertinence of the correction processing on the character to be processed in the initial text is effectively improved, and the character processing accuracy in the initial text is improved.
Fig. 4 is a flowchart illustrating a text processing method according to another embodiment of the disclosure.
As shown in fig. 4, the text processing method includes:
s401: acquiring initial text, wherein the initial text is obtained by image recognition.
For the description of S401, reference may be made to the above embodiments, which are not described herein again.
S402: an initial semantic feature corresponding to the initial text is determined using OCR technology, wherein the initial semantic feature describes text processing information.
In the description of the present disclosure, the term "initial semantic feature" refers to a semantic feature obtained by performing semantic recognition on an initial text, and the initial semantic feature can be used for a feature that characterizes a semantic dimension of the initial text.
Optionally, in some embodiments, when the initial semantic features of the initial text are determined by using an OCR technology, the text semantics of the initial text and semantic labeling results indicated by the text semantics can be determined, the text semantics and the semantic labeling results are used as the initial semantic features, so that the semantic representation accuracy of the initial text can be effectively improved, the initial semantic features are embodied based on the text semantics and the semantic labeling results, the initial semantic features can be conveniently and effectively corrected, and the correction processing efficiency is effectively improved.
In the description of the present disclosure, the term "text semantics" refers to semantics recognized for an initial text directly based on semantic recognition, and the term "semantic labeling result" refers to a labeling result obtained by semantically labeling the initial text based on the text semantics.
For example, the text semantic is, for example, a vehicle administration department of a patrol police team in a Jiangning district, and the semantic marking result is, for example, Xiang A906235678, in this case, the semantic marking result indicates a vehicle identification result, and the text semantic may be used to describe a certificate authority corresponding to the vehicle identification result.
In the embodiment of the present disclosure, corresponding error correction processing is supported for the correspondence between the semantic marking result and the corresponding text semantic, which may be specifically referred to in the following embodiments.
S403: calling an RPA robot to process the text processing information to determine an error correction corresponding relation, wherein the error correction corresponding relation comprises: a plurality of error correction texts, and an error correction marking result corresponding to each error correction text.
In the description of the present disclosure, the term "error correction text" refers to a text for error correction reference of the text semantics in the initial text, and the error correction text may be derived in advance based on mass data analysis.
In the description of the present disclosure, the term "error correction marking result" refers to a semantic marking of an error correction text based on the semantic meaning of the error correction text, and the error correction marking result may be used together with the error correction text to perform error correction adjustment on the relationship between the text semantic meaning of the initial text and the semantic marking result.
In the description of the present disclosure, the term "error correction correspondence" refers to a correspondence for describing an association between the above-described error correction text and the error correction flag result.
The error correction correspondence may also be obtained in advance based on mass data analysis, and supports dynamic adjustment in the actual application process.
The error correction correspondence may be, for example:
the corresponding relation between the city full name and the city short name.
The corresponding relation between the city full name and the city short name can be obtained by obtaining all provinces, cities and districts in the country, editing the corresponding relation, and arranging the list according to the order of district first and city last. For example:
upper urban area, Zhe A; archway area, Zhe A; west lake area, Zhe A; jian De City, Zhe A; … … … Hangzhou city, Zhe A; calendar field, lua; midget city, lua; scholartree shade region, lua; … … … Shannan City, Lu A; jiangning district, su a; the six-fold region, threo a; li Water area, Su A; kochun region, threa; … … … Nanjing, Su A; … … … are provided.
S404: and determining the error correction text matched with the initial text from the plurality of error correction texts, wherein the matched error correction text has the corresponding error correction marking result.
The error correction text matched with the initial text can be determined, and then error correction adjustment processing is carried out on the marking result in the initial text based on the error correction marking result corresponding to the matched error correction text.
S405: and correcting the existing marking result of the initial text according to the corresponding error correction marking result to obtain the target text.
For example, image-based optical character recognition OCR recognizes the content as (existing marking result): xiang a 906235678; issuing authority (error correction text): the vehicle management station of the large team of traffic and patrol police in Jiangning district judges whether the vehicle license plate rule is met, the first province is called as short, the second place is English letters, OCR (optical character recognition) content is obtained according to the rule, and the first place result and the second place result are as follows: "Xiang A", then refer to the corresponding relation between the city full name and the city abbreviation, obtain "Jiangning district" should be "Su A", replace "Xiang A" in the existing marking result in the initial text to be "Su A", obtain the target text.
In the embodiment of the disclosure, the accuracy of the text recognition based on the image can be greatly improved, the accuracy of the real data verification is improved from 69% to 98%, and the solution time of the text recognition based on the image is effectively shortened; the text recognition model does not need to be repeatedly trained based on mass image data to improve the accuracy of the model, so that the repeated training cost of the model can be effectively saved; and the dynamic addition and modification of the correction list in the actual application process are supported, and the correction accuracy is improved.
In the embodiment, by acquiring an initial text, wherein the initial text is obtained by image recognition, an OCR technology is adopted to determine an initial semantic feature corresponding to the initial text, wherein the initial semantic features describe text processing information and invoke the RPA robot to process the text processing information, determining an error correction text matching the initial text from the plurality of error correction texts in order to determine an error correction correspondence, the matched error correction text has the corresponding error correction marking result, the existing marking result of the initial text is corrected according to the corresponding error correction marking result to obtain the target text, the strategy of correcting the initial text based on the initial semantic features corresponding to the initial text is determined, the pertinence of correcting the semantic features of the initial text is effectively improved, and the accuracy of semantic representation in the initial text is improved.
Fig. 5 is a schematic structural diagram of a text processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the text processing apparatus 50 includes:
an obtaining module 501, configured to obtain an initial text, where the initial text is obtained by identifying an image.
A determining module 502, configured to determine a text classification feature corresponding to the initial text, where the text classification feature describes text processing information.
And the processing module 503 is configured to process the initial text according to the text processing information to obtain a target text.
Optionally, in some embodiments, as shown in fig. 6, fig. 6 is a schematic structural diagram of a text processing apparatus according to another embodiment of the present disclosure, and the determining module 502 includes:
the first determining submodule 5021 is used for determining initial morphological characteristics of characters to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI) when the initial texts comprise the characters to be processed, wherein the initial morphological characteristics are used as text classification characteristics; and/or
The second determining submodule 5022 is used for determining initial character features of the characters to be processed by adopting an OCR technology when the initial texts comprise the characters to be processed, wherein the initial character features are used as text classification features; and/or
A third determining sub-module 5023, configured to determine an initial semantic feature of the initial text by using OCR technology, where the initial semantic feature is used as a text classification feature.
Optionally, in some embodiments, the text processing information is described by an initial morphological feature;
the processing module 503 is specifically configured to:
calling a Robot Process Automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters;
determining similarity information between the initial morphological characteristics and the reference morphological characteristics;
determining a processing result value according to the similarity information;
and processing the initial text according to the processing result value to obtain a target text.
Optionally, in some embodiments, processing the result value comprises: a confidence flag, and a confidence evaluation value corresponding to the information flag; the processing module 503 is specifically configured to:
if the confidence mark is the target mark and the confidence evaluation value is less than or equal to the set threshold value, adjusting the characters to be processed in the initial text into error correction characters to obtain a target text;
and if the confidence mark is not the target mark or the confidence evaluation value is larger than a set threshold value, taking the initial text as the target text.
Optionally, in some embodiments, the text processing information is described by an initial character feature;
the processing module 503 is specifically configured to:
calling an RPA robot to process the text processing information so as to determine the reference character characteristics;
and correcting the character to be processed in the initial text according to the reference character characteristics to obtain a target text.
Optionally, in some embodiments, the text processing information is described by an initial semantic feature;
the processing module 503 is specifically configured to:
calling an RPA robot to process the text processing information to determine an error correction corresponding relation, wherein the error correction corresponding relation comprises: a plurality of error correction texts and an error correction marking result corresponding to each error correction text;
determining error correction texts matched with the initial text from the plurality of error correction texts, wherein the matched error correction texts have corresponding error correction marking results;
and correcting the existing marking result of the initial text according to the corresponding error correction marking result to obtain the target text.
Optionally, in some embodiments, the first determining submodule 5021 is specifically configured to:
determining structural features, stroke features, coding features and/or radical features of characters to be processed by adopting an OCR technology;
taking structural characteristics, and/or stroke characteristics, and/or coding characteristics, and/or radical characteristics as initial morphological characteristics.
Optionally, in some embodiments, the second determining sub-module 5022 is specifically configured to:
and determining the format characteristics of the character to be processed by adopting an OCR technology, and taking the format characteristics as initial character characteristics.
Optionally, in some embodiments, the third determining sub-module 5023 is specifically configured to:
determining text semantics of the initial text and semantic marking results indicated by the text semantics by adopting an OCR technology;
and taking the text semantics and the semantic labeling result as initial semantic features.
Corresponding to the text processing method provided in the embodiments of fig. 1 to 6, the present disclosure also provides a text processing apparatus, and since the text processing apparatus provided in the embodiments of the present disclosure corresponds to the text processing method provided in the embodiments of fig. 1 to 6, the implementation manner of the text processing method is also applicable to the text processing apparatus provided in the embodiments of the present disclosure, and is not described in detail in the embodiments of the present disclosure.
The functions of the modules in the apparatuses according to the embodiments of the present disclosure may refer to the corresponding descriptions in the above methods, and are not described herein again.
In the embodiment, by acquiring the initial text, wherein the initial text is obtained by identifying the image, and determining the text classification feature corresponding to the initial text, wherein the text classification feature describes the text processing information, and processing the initial text according to the text processing information to obtain the target text, after the text is obtained based on the image identification, the identified text can be subjected to personalized optimization processing based on the text classification feature corresponding to the text, so that the accuracy of the image-based text identification can be effectively improved.
In order to implement the above embodiments, the present disclosure also provides an electronic device, including: the text processing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the text processing method provided by the embodiment of the disclosure is realized.
Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, the electronic apparatus 70 includes: a memory 710 and a processor 720, the memory 710 having stored therein computer programs that are executable on the processor 720. The processor 720, when executing the computer program, implements the text processing method in the above-described embodiments. The number of the memory 710 and the processor 720 may be one or more.
The electronic device 70 further includes:
and a communication interface 730, configured to communicate with an external device, and perform data interactive transmission.
If the memory 710, the processor 720 and the communication interface 730 are implemented independently, the memory 710, the processor 720 and the communication interface 730 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Optionally, in an implementation, if the memory 710, the processor 720 and the communication interface 730 are integrated on a chip, the memory 710, the processor 720 and the communication interface 730 may complete communication with each other through an internal interface.
Embodiments of the present disclosure provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements a method provided in embodiments of the present disclosure.
The disclosed embodiment also provides a chip, which comprises a processor and is used for calling and executing the instructions stored in the memory from the memory, so that the communication device provided with the chip executes the method provided by the disclosed embodiment.
The embodiment of the present disclosure further provides a chip, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the embodiment of the application.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an Advanced reduced instruction set machine (ARM) architecture.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may include a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can include Random Access Memory (RAM), which acts as external cache Memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data rate Synchronous Dynamic Random Access Memory (DDR SDRAM), Enhanced SDRAM (ESDRAM), SLDRAM (SLDRAM), and Direct Memory bus RAM (DR RAM).
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the present disclosure may be fully or partially generated upon loading and execution of the computer program instructions on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means two or more unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method of the above embodiments may be implemented by hardware that is configured to be instructed to perform the relevant steps by a program, which may be stored in a computer-readable storage medium, and which, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module may also be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily think of the various changes or substitutions within the technical scope of the present disclosure, and these should be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (15)

1. A method of text processing, comprising:
acquiring an initial text, wherein the initial text is obtained by identifying an image;
determining text classification features corresponding to the initial text, wherein the text classification features describe text processing information;
and processing the initial text according to the text processing information to obtain a target text.
2. The method of claim 1, wherein said determining a text classification feature corresponding to the initial text comprises:
if the initial text comprises the characters to be processed, determining initial morphological characteristics of the characters to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI), wherein the initial morphological characteristics are taken as the text classification characteristics; and/or
If the initial text comprises characters to be processed, determining initial character features of the characters to be processed by adopting the OCR technology, wherein the initial character features are taken as the text classification features; and/or
Determining an initial semantic feature of the initial text using the OCR technique, wherein the initial semantic feature is taken as the text classification feature.
3. The method of claim 2, wherein the text processing information is described by the initial morphological feature;
wherein, the processing the initial text according to the text processing information to obtain a target text comprises:
calling a Robot Process Automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters;
determining similarity information between the initial morphological feature and the reference morphological feature;
determining a processing result value according to the similarity information;
and processing the initial text according to the processing result value to obtain the target text.
4. The method of claim 3, wherein processing the result value comprises: a confidence flag and a confidence evaluation value corresponding to the information flag;
wherein the processing the initial text according to the processing result value to obtain the target text comprises:
if the confidence mark is a target mark and the confidence evaluation value is less than or equal to a set threshold value, adjusting the characters to be processed in the initial text into the error correction characters to obtain the target text;
and if the confidence mark is not the target mark or the confidence evaluation value is larger than the set threshold value, taking the initial text as the target text.
5. The method of claim 2, wherein the text processing information is described by the initial character feature;
wherein, the processing the initial text according to the text processing information to obtain a target text comprises:
calling an RPA robot to process the text processing information to determine reference character characteristics;
and correcting the character to be processed in the initial text according to the reference character characteristics to obtain the target text.
6. The method of claim 2, wherein the text processing information is described by the initial semantic features;
wherein, the processing the initial text according to the text processing information to obtain a target text comprises:
calling an RPA robot to process the text processing information to determine an error correction correspondence, wherein the error correction correspondence comprises: a plurality of error correction texts and an error correction marking result corresponding to each error correction text;
determining an error correction text matched with the initial text from the plurality of error correction texts, wherein the matched error correction text has a corresponding error correction marking result;
and correcting the existing marking result of the initial text according to the corresponding error correction marking result to obtain the target text.
7. The method as claimed in claim 2, wherein said determining the initial morphological feature of the word to be processed by Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI) comprises:
determining the structural feature, and/or stroke feature, and/or coding feature, and/or radical feature of the character to be processed by adopting the OCR technology;
taking the structural feature, and/or the stroke feature, and/or the coding feature, and/or the radical feature as the initial morphological feature.
8. The method of claim 2, wherein said determining initial character features of the character to be processed using the OCR technique comprises:
and determining the format characteristic of the character to be processed by adopting the OCR technology, and taking the format characteristic as the initial character characteristic.
9. The method of claim 2, wherein said determining initial semantic features of the initial text using the OCR technique comprises:
determining the text semantics of the initial text and the semantic marking result indicated by the text semantics by adopting the OCR technology;
and taking the text semantics and the semantic mark result as the initial semantic features.
10. A text processing apparatus, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an initial text, and the initial text is obtained by identifying an image;
a determining module, configured to determine a text classification feature corresponding to the initial text, where the text classification feature describes text processing information;
and the processing module is used for processing the initial text according to the text processing information to obtain a target text.
11. The apparatus of claim 10, wherein the determining module comprises:
the first determining submodule is used for determining the initial morphological characteristics of the characters to be processed by adopting an Optical Character Recognition (OCR) technology in the field of Artificial Intelligence (AI) when the initial texts comprise the characters to be processed, wherein the initial morphological characteristics are taken as the text classification characteristics; and/or
A second determining sub-module, configured to determine, when the initial text includes a character to be processed, an initial character feature of the character to be processed by using the OCR technology, where the initial character feature is used as the text classification feature; and/or
A third determining sub-module, configured to determine an initial semantic feature of the initial text by using the OCR technology, where the initial semantic feature is used as the text classification feature.
12. The apparatus of claim 11, wherein the text processing information is described by the initial morphological feature;
wherein, the processing module is specifically configured to:
calling a Robot Process Automation (RPA) robot to process the text processing information so as to determine the reference morphological characteristics of the error correction characters;
determining similarity information between the initial morphological feature and the reference morphological feature;
determining a processing result value according to the similarity information;
and processing the initial text according to the processing result value to obtain the target text.
13. The apparatus of claim 12, wherein the processing the result value comprises: a confidence flag and a confidence evaluation value corresponding to the information flag;
the processing module is specifically configured to:
if the confidence mark is a target mark and the confidence evaluation value is less than or equal to a set threshold value, adjusting the characters to be processed in the initial text into the error correction characters to obtain the target text;
and if the confidence mark is not the target mark or the confidence evaluation value is larger than the set threshold value, taking the initial text as the target text.
14. An electronic device, comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
execution of the computer-executable instructions stored by the memory by the at least one processor causes the at least one processor to perform the text processing method of any of claims 1-9.
15. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the text processing method of any one of claims 1-9.
CN202210800979.5A 2022-07-08 2022-07-08 Text processing method and device, electronic equipment and storage medium Pending CN115116069A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210800979.5A CN115116069A (en) 2022-07-08 2022-07-08 Text processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210800979.5A CN115116069A (en) 2022-07-08 2022-07-08 Text processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115116069A true CN115116069A (en) 2022-09-27

Family

ID=83332348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210800979.5A Pending CN115116069A (en) 2022-07-08 2022-07-08 Text processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115116069A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117217876A (en) * 2023-11-08 2023-12-12 深圳市明心数智科技有限公司 Order preprocessing method, device, equipment and medium based on OCR technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117217876A (en) * 2023-11-08 2023-12-12 深圳市明心数智科技有限公司 Order preprocessing method, device, equipment and medium based on OCR technology
CN117217876B (en) * 2023-11-08 2024-03-26 深圳市明心数智科技有限公司 Order preprocessing method, device, equipment and medium based on OCR technology

Similar Documents

Publication Publication Date Title
CN112016310A (en) Text error correction method, system, device and readable storage medium
CN111695439A (en) Image structured data extraction method, electronic device and storage medium
JP2023509405A (en) Translation method, device, electronic device and computer program
CN114596566B (en) Text recognition method and related device
CN115034200A (en) Drawing information extraction method and device, electronic equipment and storage medium
CN112463986A (en) Information storage method and device
CN116152840A (en) File classification method, apparatus, device and computer storage medium
CN115116069A (en) Text processing method and device, electronic equipment and storage medium
CN114399775A (en) Document title generation method, device, equipment and storage medium
CN111881900B (en) Corpus generation method, corpus translation model training method, corpus translation model translation method, corpus translation device, corpus translation equipment and corpus translation medium
CN111274813A (en) Language sequence marking method, device storage medium and computer equipment
CN117274969A (en) Seal identification method, device, equipment and medium
CN113434631A (en) Emotion analysis method and device based on event, computer equipment and storage medium
CN109902309B (en) Translation method, device, equipment and storage medium
CN110110050B (en) Method for generating news event generating type question-answer data set
CN114462418B (en) Event detection method, system, intelligent terminal and computer readable storage medium
US20230082485A1 (en) Machine learning techniques for denoising input sequences
CN115346095A (en) Visual question answering method, device, equipment and storage medium
CN114331932A (en) Target image generation method and device, computing equipment and computer storage medium
CN114067343A (en) Data set construction method, model training method and corresponding device
CN114037828A (en) Component identification method and device, electronic equipment and storage medium
CN112364640A (en) Entity noun linking method, device, computer equipment and storage medium
CN113283241A (en) Text recognition method and device, electronic equipment and computer readable storage medium
CN117289905B (en) Application software development method and device, storage medium and electronic equipment
CN113487698B (en) Form generation method and device based on two-channel neural network model

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