CN113064497A - Statement identification method, device, equipment and computer storage medium - Google Patents

Statement identification method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN113064497A
CN113064497A CN202110310856.9A CN202110310856A CN113064497A CN 113064497 A CN113064497 A CN 113064497A CN 202110310856 A CN202110310856 A CN 202110310856A CN 113064497 A CN113064497 A CN 113064497A
Authority
CN
China
Prior art keywords
sentence
character
segmentation
input
preset
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
CN202110310856.9A
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 Chenxing Software Technology Co ltd
Original Assignee
Shanghai Chenxing Software Technology 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 Chenxing Software Technology Co ltd filed Critical Shanghai Chenxing Software Technology Co ltd
Priority to CN202110310856.9A priority Critical patent/CN113064497A/en
Publication of CN113064497A publication Critical patent/CN113064497A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Character Discrimination (AREA)

Abstract

The embodiment of the application provides a sentence recognition method, a sentence recognition device, a sentence recognition equipment and a computer storage medium, wherein the input of a first sentence input by a user in an input method interface is received, the first sentence is segmented through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character, and the segmentation model can segment any interval between the characters in the sentence, so that the sentence segmentation accuracy is ensured; identifying the segmentation track of at least one character through a preset character identification model to obtain at least one identified character; and combining at least one recognition character through a preset language model to obtain a second sentence with higher accuracy. By combining the segmentation model, the character recognition model and the combination model to recognize the handwritten sentences of the user, the recognition accuracy of the handwritten sentences of the user is improved, the sentence input speed of the user is improved, and the user experience is improved.

Description

Statement identification method, device, equipment and computer storage medium
Technical Field
The present application belongs to the technical field of input methods, and in particular, to a method, an apparatus, a device, and a computer storage medium for sentence recognition.
Background
With the popularization of the internet, more and more extensive groups come into contact with the mobile intelligent terminals. In the use of the mobile intelligent terminal, the input method is an indispensable application program. The input method comprises the steps of keyboard input, handwriting input and voice input, wherein the handwriting input method greatly improves the convenience of using the mobile intelligent terminal for the group who is not used to the keyboard input method and the voice input method.
At present, in a handwriting input mode, an Optical Character Recognition (OCR) technology is used to analyze an image containing a handwritten sentence to obtain characters in the image, and the characters recognized by the OCR technology need to have fixed intervals, the same size and regular font. The situation of the user handwritten sentences is complex, the space between the characters is not fixed, the characters are different in size, the fonts are random, especially, under the situation of continuous writing or overlapping writing, the recognition of the user handwritten sentences by the OCR technology is inaccurate, the speed of inputting the sentences by the user is reduced, and the use experience of the user is influenced.
Disclosure of Invention
The embodiment of the application provides a sentence recognition method, a sentence recognition device and a computer storage medium, which can improve the recognition accuracy of a handwritten sentence of a user, improve the speed of inputting the sentence by the user and improve the use experience of the user.
In a first aspect, an embodiment of the present application provides a method for sentence recognition, where the method includes:
receiving input of a first sentence input by a user in an input method interface;
segmenting the first sentence through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character;
identifying the segmentation track of at least one character through a preset character identification model to obtain at least one identified character;
and combining at least one recognition character through a preset language model to obtain a second sentence.
In a possible implementation manner, segmenting the first sentence according to the input of the first sentence by using the preset segmentation model to obtain a segmentation track of at least one character includes:
acquiring a probability value of the input track of the first sentence as a starting track through a preset segmentation model according to the input track of the first sentence;
and when the probability value is greater than a preset threshold value, segmenting the first sentence through a preset segmentation model to obtain a segmentation track of at least one character.
In a possible implementation manner, the obtaining of the at least one recognized word by presetting a segmentation track of the word recognition model to recognize the at least one word includes:
identifying a segmentation track of at least one character through a preset character identification model to obtain at least one first identification character of the segmentation track of the at least one character, wherein each first identification character corresponds to a target probability value, and the target probability value represents the probability value that the segmentation track of the character and the preset character in an identification character library are the same character;
and determining that the first recognition character corresponding to the maximum probability value in the probability values of the at least one first recognition character of the segmentation track of the at least one character is the at least one recognition character.
In a possible implementation manner, combining at least one recognition word through a preset language model to obtain a second sentence, including:
combining at least one recognition character through a preset language model to obtain at least one combined sentence;
calculating a score value for each of the at least one combined sentence;
and determining the combined sentence with the largest score value in the at least one combined sentence as the second sentence.
In a possible implementation manner, before segmenting the first sentence according to the input of the first sentence and by using the preset segmentation model to obtain the segmentation track of the at least one character, the method further includes:
acquiring a training sample image, wherein the training sample image comprises an input image containing sample sentences and an output image containing characters corresponding to the sample sentences;
and training the initial neural network model according to the input image and the output image to obtain a preset segmentation model.
In one possible implementation, the training of the initial neural network model to obtain the preset segmentation model according to the input image and the output image includes:
inputting the input image into a convolutional neural network to obtain a characteristic matrix of a sample statement in the input image;
and training a binary neural network to obtain a preset segmentation model according to the characteristic matrix and the output image.
In a second aspect, an embodiment of the present application provides an apparatus for sentence recognition, where the apparatus includes:
the receiving module is used for receiving the input of a first statement input by a user in the input method interface;
the segmentation module is used for segmenting the first sentence through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character;
the recognition module is used for recognizing the segmentation track of at least one character through a preset character recognition model to obtain at least one recognized character;
and the combination module is used for combining at least one recognition character through a preset language model to obtain a second sentence.
In a possible implementation manner, the segmentation module is specifically configured to:
according to the input of the first sentence, obtaining a probability value of taking the input track of the first sentence as a starting track through a preset segmentation model;
and when the probability value is greater than a preset threshold value, segmenting the first sentence through a preset segmentation model to obtain a segmentation track of at least one character.
In a third aspect, an embodiment of the present application provides a sentence recognition apparatus, including: a processor, and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the method of statement identification in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, where computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the method for sentence recognition in the first aspect or any one of the possible implementation manners of the first aspect is implemented.
According to the sentence recognition method, the sentence recognition device, the sentence recognition equipment and the computer storage medium, the input of the first sentence input by the user in the input method interface is received, the first sentence is segmented through the preset segmentation model according to the input of the first sentence, the segmentation track of at least one character is obtained, the segmentation model can segment any interval between the characters in the sentence, and the sentence segmentation accuracy is guaranteed; the segmentation track of at least one character is identified through a preset character identification model to obtain at least one identified character, and the accuracy of the identified character is further ensured based on the accuracy of the segmentation track of the character to be identified; and combining at least one recognition character through a preset language model to obtain a second sentence with higher accuracy. By combining the segmentation model, the character recognition model and the combination model to recognize the handwritten sentences of the user, the recognition accuracy of the handwritten sentences of the user is improved, the sentence input speed of the user is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a sentence recognition method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a sentence recognition apparatus provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a sentence recognition device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
When a user inputs sentences in a handwriting input mode on an intelligent terminal interface, the condition of continuous writing mostly occurs. The continuous writing means that a user can continuously write a plurality of characters on a handwriting keyboard, and when the writing is finished, the input method provides corresponding phrases for the user, so that the writing efficiency of the user can be greatly improved. The user can continuously write a plurality of characters at one time, and the difference is that the two characters required to be written by the overlapping writing have partial overlap, and the two characters required to be written by the overlapping writing have a space. The existing continuous writing method is based on an OCR technology, namely, an image is analyzed to obtain characters in the image, but the continuous writing method has small problems in application, the character space recognized by the OCR technology is fixed, the character size is the same, the characters are more regular, the handwriting condition of a user is more complicated, and the recognition is not accurate enough for the condition that the character space does not accord with the above-mentioned conditions.
In order to solve the prior art problems, embodiments of the present application provide a method, an apparatus, a device, and a computer storage medium for sentence recognition.
In the embodiment of the application, the input of a first sentence input by a user in an input method interface is received, the first sentence is segmented through a preset segmentation model according to the input of the first sentence, a segmentation track of at least one character is obtained, the segmentation model can segment any interval between the characters in the sentence, and the sentence segmentation accuracy is guaranteed; the segmentation track of at least one character is identified through a preset character identification model to obtain at least one identified character, and the accuracy of the identified character is further ensured based on the accuracy of the segmentation track of the character to be identified; and combining at least one recognition character through a preset language model to obtain a second sentence with higher accuracy. By combining the segmentation model, the character recognition model and the combination model to recognize the handwritten sentences of the user, the recognition accuracy of the handwritten sentences of the user is improved, the sentence input speed of the user is improved, and the user experience is improved.
The following first introduces a sentence recognition method provided in the embodiments of the present application.
Fig. 1 shows a flowchart of a sentence recognition method according to an embodiment of the present application. As shown in fig. 1, the method may include the steps of:
s110, receiving input of a first sentence input by a user in the input method interface.
When a user inputs a first sentence on an intelligent terminal interface, the user firstly enters the input method interface, and the user writes the first sentence in the input method interface in a handwriting mode, wherein the first sentence can be a continuous writing sentence or a superposed writing sentence. The intelligent terminal receives input of a first sentence input by a user in the input method interface, and determines an input track of the first sentence so as to identify characters required to be output by the user for the user to select. Wherein the input track is a combination of strokes of the first sentence handwritten by the user in sequence.
And S120, segmenting the first sentence through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character.
The preset segmentation model is a pre-trained segmentation model, and the segmentation model can identify the initial track of characters in the sentence according to the input track of the sentence, and segment the sentence according to the initial track of the characters to obtain the segmentation track of at least one character.
After the intelligent terminal receives an input track of a first sentence input by a user, a pre-trained segmentation model is started, the segmentation model identifies a starting track of characters in the first sentence, and the first sentence is segmented according to the starting track of the characters in the first sentence to obtain a segmentation track of at least one character.
Specifically, according to the input track of the first sentence, the first sentence is segmented through a preset segmentation model to obtain a segmentation track of at least one character, and the segmentation track comprises:
and acquiring a probability value of the input track of the first sentence as a starting track through a preset segmentation model according to the input of the first sentence.
And inputting the input track corresponding to each stroke of the first sentence as a preset segmentation model once according to the input receiving sequence, and outputting the probability value of taking the input track corresponding to each stroke in the first sentence as the starting track by the segmentation model. If the input track corresponding to a certain stroke of the first sentence is the initial track, the probability value is 1, and if the input track corresponding to a certain stroke of the first sentence is the non-initial track, the probability value is 0.
And when the probability value is greater than a preset threshold value, segmenting the first sentence through a preset segmentation model to obtain a segmentation track of at least one character.
When the probability value of the input track corresponding to a certain stroke is larger than a preset threshold value, the stroke is indicated as an initial stroke, and when the probability value of the input track corresponding to a certain stroke is smaller than or equal to the preset threshold value, the stroke is indicated as a non-initial stroke. The preset threshold may be set to any value less than 1, and is not limited herein.
When a stroke is determined to be the initial stroke, segmentation is performed before the stroke. And the segmentation model segments the first sentence according to the segmentation rule to obtain a segmentation track of at least one character. For example, a user writes 'safety' in an input method interface by hand, the intelligent terminal receives the 'safety' input track, the input track corresponding to each stroke of the 'safety' is input into the segmentation model according to the sequence of receiving the input track, the segmentation model outputs the probability value of the input track corresponding to the first stroke 'horizontal' to be 1, the probability value of the input track corresponding to the sixth stroke 'point' to be 1, and the probability values of the input tracks corresponding to other strokes to be 0. At the moment, the input trajectory of the 'safety' is divided into two character dividing trajectories of 'safety' and 'safety', wherein the character dividing trajectory is divided before the first stroke of 'horizontal', the character dividing trajectory is divided before the fifth stroke of 'vertical', and the character dividing trajectory is divided before the sixth stroke of 'point'.
S130, recognizing the segmentation track of at least one character through a preset character recognition model to obtain at least one recognized character.
And taking the segmentation track of at least one character obtained by segmenting the first sentence through the preset segmentation model as the input of the preset character recognition model, and outputting the recognition character corresponding to the segmentation track of the character through the preset character recognition model.
Specifically, the method includes the steps of recognizing a segmentation track of at least one character through a preset character recognition model to obtain at least one recognized character, and includes the following steps:
identifying a segmentation track of at least one character through a preset character identification model to obtain at least one first identification character of the segmentation track of the at least one character, wherein each first identification character in the at least one first identification character corresponds to a segmentation track of a characteristic character and a probability value of the preset character in an identification character library being the same character;
when the segmentation track of one character is input into a preset character recognition model, the preset character recognition model outputs at least one first recognition character. The first recognition characters are characters possibly corresponding to the segmentation tracks of the characters in the recognition character library, the number of the first recognition characters is multiple, each first recognition character corresponds to a probability value, and the probability value represents the possibility that the segmentation tracks of the characters and the preset characters in the recognition character library are the same characters.
And determining that the first recognition character corresponding to the maximum probability value in the probability values of the at least one first recognition character of the segmentation track of the at least one character is the at least one recognition character.
After the probability value of each first recognition character of the input track of one character is obtained, the first recognition character corresponding to the maximum probability value is determined as the recognition character. And inputting the input track of the at least one character segmented by the first sentence into a preset character recognition model to obtain the at least one recognized character.
Although the fonts of the first sentence handwritten by the user are various, the preset segmentation model performs segmentation according to the input track of the initial stroke of the characters in the first sentence, the input track is not influenced by the font shape, the font interval and the like, the segmentation accuracy of the first sentence is ensured, then the input track of the segmented characters is identified through the preset character identification model, the first identification character with the maximum probability value is selected as the identification character, and the character identification accuracy is ensured.
S140, combining at least one recognition character through a preset language model to obtain a second sentence.
The preset language model is a pre-trained language model which can combine characters into sentences. After obtaining the at least one recognized word, the at least one recognized word is used as an input of a preset language model, and the preset language model outputs a second sentence which is in the candidate column of the input method according to the input.
Specifically, combining at least one recognition character through a preset language model to obtain a second sentence, including:
and combining at least one recognition character through a preset language model to obtain at least one combined statement.
Calculating a score value for each of the at least one combined sentence;
the language model inquires a first probability of a first character in the combined sentence, a second probability of a second character under the condition that the first character is determined, a third probability of a third character under the condition that the first character and the second character are determined, and the like until an Nth probability of a last character in the most combined sentence is searched. And multiplying the first probability, the second probability, the third probability, · and the Nth probability to obtain a score value of the combined statement.
For example, the user inputs "congratulations and prosperities" by handwriting, at this time, the preset character recognition model recognizes "congratulations", "happiness", "hair" and "wealth" corresponding to the maximum probability value for the segmentation track of each character in the "congratulations and prosperities", and inputs the "congratulations", "happiness", "hair" and "wealth" into the preset language model to obtain the combined sentences of "congratulations and prosperities", "wealth and prosperity". At this time, the probabilities PA1 and PA2 that the first word is "May" and "wealth" are respectively searched in the preset language model, and the probability PA121 that the first word is "May" and the second word is "good" or the probability PA122 that the first word is "May" and the second word is "good" or the probability PA22 that the first word is "wealth" and the second word is "good" are continuously searched. According to the rule, a probability PA131 of "you get out" and a probability PA141 of "you get out", a probability PA132 of "you get out" and a probability PA142 of "you get out", a probability PA23 of "you get out" and a probability PA24 of "you get out", respectively. The point values of the respective combination sentences, i.e., the point value S1 of "congratulations" is PA1 PA121 PA131 PA141, the point value S2 of "congratulations" is PA1 PA122 PA132 PA142, and the point value S3 of "congratulations" is PA2 PA22 PA23 PA24, respectively, are calculated.
And determining the combined sentence with the largest score value in the at least one combined sentence as the second sentence.
The larger the score value of the combined sentence is, the more likely the combined sentence is to be the first sentence input by the user, and the more accurate the recognition result is. For example, if the above-described relationship of S1, S2, S3 is S1> S2> S3, "prefecture" is determined to be the second sentence.
In the embodiment of the application, the input of a first sentence input by a user in an input method interface is received, the first sentence is segmented through a preset segmentation model according to the input of the first sentence, a segmentation track of at least one character is obtained, the segmentation model can segment any interval between the characters in the sentence, and the sentence segmentation accuracy is guaranteed; the segmentation track of at least one character is identified through a preset character identification model to obtain at least one identified character, and the accuracy of the identified character is further ensured based on the accuracy of the segmentation track of the character to be identified; and combining at least one recognition character through a preset language model to obtain a second sentence with higher accuracy. By combining the segmentation model, the character recognition model and the combination model to recognize the handwritten sentences of the user, the recognition accuracy of the handwritten sentences of the user is improved, the sentence input speed of the user is improved, and the user experience is improved.
In some embodiments, before segmenting the first sentence according to the input of the first sentence by the preset segmentation model to obtain the segmentation track of the at least one character, the method further includes:
acquiring a training sample image, wherein the training sample image comprises an input image containing sample sentences and an output image containing characters corresponding to the sample sentences;
and training the initial neural network to obtain a preset segmentation model according to the input image and the output image.
Before the first sentence is recognized, the segmentation model is trained. First, a training sample image is acquired, and the training sample image includes an input image including a sample sentence and an output image including each character corresponding to the sample sentence. The sample sentence is formed by translating the continuous hand-written characters into sequentially arranged characters, the interval between the two characters is random in a certain range, then the track sequences corresponding to all the characters are spliced, and the initial stroke of each character is marked. And training the initial neural network model according to the input image and the output image to obtain a preset segmentation model.
In some embodiments, the initial network model includes a convolutional neural network and a binary neural network, and training the initial neural network model to obtain the preset segmentation model according to the input image and the output image includes:
inputting the input image into a convolutional neural network to obtain a characteristic matrix of a sample statement in the input image;
and sequentially transmitting the track corresponding to each stroke of the characters in the sample sentence into a convolutional neural network to obtain a characteristic matrix related to the current track, wherein the characteristic matrix comprises the initial stroke of each character in the sample sentence.
And training a binary neural network to obtain a preset segmentation model according to the characteristic matrix and the output image.
And taking the characteristic matrix as the input of a two-classification neural network model, obtaining that the probability value of a starting pen is 1 or the probability value of a non-starting pen is 0 by the two-classification neural network model, segmenting the sample sentences according to the probability values, and outputting output images containing characters corresponding to the sample sentences. And training the convolutional neural network and the binary neural network twice to obtain a preset segmentation model.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure. As shown in fig. 2, the sentence recognition apparatus 200 may include a receiving module 210, a segmentation module 220, a recognition module 230, and a combination module 240.
The receiving module 210 is configured to receive an input of a first sentence input by a user in an input method interface;
the segmentation module 220 is configured to segment the first sentence according to the input of the first sentence through a preset segmentation model to obtain a segmentation track of at least one character;
the recognition module 230 is configured to recognize a segmentation track of at least one character through a preset character recognition model to obtain at least one recognized character;
and the combining module 240 is configured to combine at least one recognition word through a preset language model to obtain a second sentence.
In the embodiment of the application, the handwritten sentences of the user are identified by combining the segmentation model, the character identification model and the combination model, so that the identification accuracy of the handwritten sentences of the user is improved, the speed of inputting the sentences by the user is improved, and the use experience of the user is improved.
In some embodiments, the segmentation module 220 is specifically configured to obtain, according to the input of the first sentence, a probability value that an input trajectory of the first sentence is a starting trajectory through a preset segmentation model;
and when the probability value is greater than a preset threshold value, segmenting the first sentence through a preset segmentation model to obtain a segmentation track of at least one character.
In some embodiments, the identifying module 230 is specifically configured to identify a segmentation track of at least one character through a preset character identification model, to obtain at least one first identification character of the segmentation track of the at least one character, where each first identification character in the at least one first identification character corresponds to a probability value that the segmentation track of a representative character and a preset character in an identification character library are the same character;
and determining that the first recognition character corresponding to the maximum probability value in the probability values of the at least one first recognition character of the segmentation track of the at least one character is the at least one recognition character.
In some embodiments, the combining module 240 is specifically configured to combine at least one recognition word through a preset language model to obtain at least one combined sentence;
calculating a score value for each of the at least one combined sentence;
and determining the combined sentence with the largest score value in the at least one combined sentence as the second sentence.
In some embodiments, before segmenting the first sentence according to the input of the first sentence by the preset segmentation model to obtain the segmentation track of the at least one character, the apparatus further includes:
an obtaining module 250, configured to obtain a training sample image, where the training sample image includes an input image including a sample sentence and an output image including each character corresponding to the sample sentence;
and the training module 260 is configured to train the initial neural network model to obtain a preset segmentation model according to the input image and the output image.
In some embodiments, the initial network model includes a convolutional neural network and a binary neural network, and the training module 260 is specifically configured to
Inputting the input image into a convolutional neural network to obtain a characteristic matrix of a sample statement in the input image;
and training a binary neural network to obtain a preset segmentation model according to the characteristic matrix and the output image.
Each module in the apparatus shown in fig. 2 has a function of implementing each step in fig. 1, and can achieve the corresponding technical effect, and for brevity, is not described again here.
Fig. 3 shows a hardware structure diagram of a sentence recognition device provided in an embodiment of the present application.
The sentence recognition apparatus may comprise a processor 301 and a memory 302 in which computer program instructions are stored.
Specifically, the processor 301 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Memory 302 may include mass storage for data or instructions. By way of example, and not limitation, memory 302 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. In one example, memory 302 can include removable or non-removable (or fixed) media, or memory 302 is non-volatile solid-state memory. The memory 302 may be internal or external to the integrated gateway disaster recovery device.
In one example, memory 302 may include Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory 302 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to a method according to an aspect of the present application.
The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement steps S110 to S140 in the embodiment shown in fig. 1, and achieve the corresponding technical effect achieved by executing the steps in the example shown in fig. 1, which is not described herein again for brevity.
In one example, the sentence recognition device may also include a communication interface 303 and a bus 310. As shown in fig. 3, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 to complete communication therebetween.
The communication interface 303 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiment of the present application.
Bus 310 comprises hardware, software, or both coupling the components of the statement identification device to each other. By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus, FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) Bus, an infiniband interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a video electronics standards association local (VLB) Bus, or other suitable Bus or a combination of two or more of these. Bus 310 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The sentence recognition device can execute the sentence recognition method in the embodiment of the application based on the sentence handwritten by the user and the preset model, so that the sentence recognition method described in conjunction with fig. 1 is realized.
In addition, in combination with the sentence recognition method in the foregoing embodiment, the embodiment of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the sentence recognition methods in the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic Circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (10)

1. A method of sentence recognition, comprising:
receiving input of a first sentence input by a user in an input method interface;
segmenting the first sentence through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character;
recognizing the segmentation track of the at least one character through a preset character recognition model to obtain at least one recognized character;
and combining the at least one recognition character through a preset language model to obtain a second sentence.
2. The method of claim 1, wherein the segmenting the first sentence according to the input of the first sentence by a preset segmentation model to obtain a segmentation track of at least one word comprises:
acquiring a probability value of the input track of the first sentence as a starting track through the preset segmentation model according to the input track of the first sentence;
and when the probability value is larger than a preset threshold value, segmenting the first sentence through the preset segmentation model to obtain a segmentation track of the at least one character.
3. The method according to claim 1, wherein the identifying the segmentation track of the at least one character through a preset character recognition model to obtain the at least one recognized character comprises:
identifying the segmentation track of the at least one character through the preset character identification model to obtain at least one first identification character of the segmentation track of the at least one character, wherein each first identification character corresponds to a target probability value, and the target probability value is a probability value representing that the segmentation track of the character and the preset character in an identification character library are the same character;
and determining the first identification character corresponding to the maximum probability value in the probability values of the at least one first identification character of the segmentation track of the at least one character as the at least one identification character.
4. The method of claim 1, wherein combining the at least one recognized word through a predetermined language model to obtain a second sentence comprises:
combining the at least one recognition character through the preset language model to obtain at least one combined statement;
calculating a score value for each of the at least one combined sentence;
and determining the combined sentence with the largest score value in the at least one combined sentence as the second sentence.
5. The method of claim 1, wherein before segmenting the first sentence according to the input of the first sentence by a preset segmentation model to obtain a segmentation track of at least one word, the method further comprises:
acquiring a training sample image, wherein the training sample image comprises an input image containing a sample sentence and an output image containing each character corresponding to the sample sentence;
and training an initial neural network model according to the input image and the output image to obtain the preset segmentation model.
6. The method of claim 5, wherein the initial network model comprises a convolutional neural network and a binary neural network, and wherein training the initial neural network model to obtain the preset segmentation model according to the input image and the output image comprises:
inputting the input image into the convolutional neural network to obtain a feature matrix of a sample statement in the input image;
and training the two-classification neural network to obtain the preset segmentation model according to the feature matrix and the output image.
7. An apparatus for sentence recognition, the apparatus comprising:
the receiving module is used for receiving the input of a first statement input by a user in the input method interface;
the segmentation module is used for segmenting the first sentence through a preset segmentation model according to the input of the first sentence to obtain a segmentation track of at least one character;
the recognition module is used for recognizing the segmentation track of the at least one character through a preset character recognition model to obtain at least one recognition character;
and the combination module is used for combining the at least one recognition character through a preset language model to obtain a second sentence.
8. The apparatus according to claim 7, wherein the segmentation module is specifically configured to:
according to the input of the first sentence, obtaining a probability value of taking the input track of the first sentence as a starting track through the preset segmentation model;
and when the probability value is larger than a preset threshold value, segmenting the first sentence through the preset segmentation model to obtain a segmentation track of the at least one character.
9. A sentence recognition apparatus characterized by comprising: a processor, and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the method of statement identification as claimed in any of claims 1-6.
10. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement the method of sentence recognition of any of claims 1-6.
CN202110310856.9A 2021-03-23 2021-03-23 Statement identification method, device, equipment and computer storage medium Pending CN113064497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110310856.9A CN113064497A (en) 2021-03-23 2021-03-23 Statement identification method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110310856.9A CN113064497A (en) 2021-03-23 2021-03-23 Statement identification method, device, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN113064497A true CN113064497A (en) 2021-07-02

Family

ID=76563247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110310856.9A Pending CN113064497A (en) 2021-03-23 2021-03-23 Statement identification method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN113064497A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114399772A (en) * 2021-12-20 2022-04-26 北京百度网讯科技有限公司 Sample generation, model training and trajectory recognition methods, devices, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260524A (en) * 1999-01-13 2000-07-19 国际商业机器公司 Method for automatically cutting and identiying hand written Chinese characters and system for using said method
CN102063620A (en) * 2010-12-31 2011-05-18 北京捷通华声语音技术有限公司 Handwriting identification method, system and terminal
CN102750552A (en) * 2012-06-18 2012-10-24 北京捷通华声语音技术有限公司 Handwriting recognition method and system as well as handwriting recognition terminal
CN109344830A (en) * 2018-08-17 2019-02-15 平安科技(深圳)有限公司 Sentence output, model training method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260524A (en) * 1999-01-13 2000-07-19 国际商业机器公司 Method for automatically cutting and identiying hand written Chinese characters and system for using said method
CN102063620A (en) * 2010-12-31 2011-05-18 北京捷通华声语音技术有限公司 Handwriting identification method, system and terminal
CN102750552A (en) * 2012-06-18 2012-10-24 北京捷通华声语音技术有限公司 Handwriting recognition method and system as well as handwriting recognition terminal
CN109344830A (en) * 2018-08-17 2019-02-15 平安科技(深圳)有限公司 Sentence output, model training method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114399772A (en) * 2021-12-20 2022-04-26 北京百度网讯科技有限公司 Sample generation, model training and trajectory recognition methods, devices, equipment and medium
CN114399772B (en) * 2021-12-20 2024-02-27 北京百度网讯科技有限公司 Sample generation, model training and track recognition methods, devices, equipment and media

Similar Documents

Publication Publication Date Title
CN109522558B (en) Deep learning-based Chinese character-staggering correction method
US20080008387A1 (en) Method and apparatus for recognition of handwritten symbols
CN113254654B (en) Model training method, text recognition method, device, equipment and medium
CN112527992B (en) Long text processing method, related device and readable storage medium
CN108280173B (en) Key information mining method, medium and equipment for unstructured text
CN112580643A (en) License plate recognition method and device based on deep learning and storage medium
CN111695539A (en) Evaluation method and device for handwritten Chinese characters and electronic equipment
CN111046971A (en) Image recognition method, device, equipment and computer readable storage medium
CN112883968A (en) Image character recognition method, device, medium and electronic equipment
CN113064497A (en) Statement identification method, device, equipment and computer storage medium
CN112699780A (en) Object identification method, device, equipment and storage medium
CN112149678A (en) Character recognition method and device for special language and recognition model training method and device
CN108021918B (en) Character recognition method and device
US9251412B2 (en) Segmentation of devanagari-script handwriting for recognition
CN115984876A (en) Text recognition method and device, electronic equipment, vehicle and storage medium
CN114863574A (en) Handwritten signature recognition method, device, equipment, medium and program product
CN116798044A (en) Text recognition method and device and electronic equipment
CN115294581A (en) Method and device for identifying error characters, electronic equipment and storage medium
CN115273103A (en) Text recognition method and device, electronic equipment and storage medium
CN114117031A (en) List screening method, device, equipment and computer storage medium
CN114298054A (en) Text recognition method and device, electronic equipment and readable storage medium
CN112818132A (en) Method and system for complementing knowledge point relevance based on cognitive map
CN112633243B (en) Information identification method, device, equipment and computer storage medium
CN114139541B (en) Named entity identification method, device, equipment and medium
CN116306631A (en) Text information ordering method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210702

WD01 Invention patent application deemed withdrawn after publication