Word segmentation method, device and electronic equipment

By identifying and correcting errors in the target string, using language models and candidate word replacement, the initial word segmentation results are corrected, which solves the problem of difficulty in improving word segmentation accuracy in the existing technology and achieves higher word segmentation accuracy and practicality. .

CN110134936BActive Publication Date: 2024-09-06BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810128617.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-02-08
Publication Date
2024-09-06
Estimated Expiration
2038-02-08

AI Technical Summary

Technical Problem

Existing word segmentation technology has difficulties in improving word segmentation accuracy, especially the problem of reduced word segmentation accuracy caused by incorrect characters.

Method used

By identifying and correcting errors in the target string, using language models and candidate word replacement, we can correct the initial word segmentation results and obtain more accurate word segmentation results.

Benefits of technology

It improves the accuracy and practicality of word segmentation and effectively avoids the problem of reduced word segmentation accuracy caused by incorrect characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110134936B
    Figure CN110134936B
Patent Text Reader

Abstract

The present invention discloses a word segmentation method, device and electronic device. The word segmentation method comprises: performing word segmentation on a target character string to obtain a first word segmentation result; performing error recognition on the target character string to obtain a recognition result; if the recognition result indicates that there is an error in the target character string, performing error correction on the target character string based on the recognition result; performing word segmentation on the character string obtained by error correction to obtain a second word segmentation result; and correcting the first word segmentation result based on the second word segmentation result to obtain a corrected word segmentation result. In the above technical scheme, by correcting the error of the target character string, the word segmentation result of the correct character string is obtained to correct the word segmentation result of the target character string, which solves the technical problem that the accuracy and practicality of word segmentation are greatly reduced due to erroneous characters, and improves the accuracy and practicality of word segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software technology, and in particular to a word segmentation method, device and electronic equipment. Background Art

[0002] With the continuous development of science and technology, word segmentation technology has been widely used. In addition to the commonly used search, character matching and other fields, it has also been applied in word selection. The word segmentation function is provided for the characters selected by the user or in the clipboard, and the word segmentation results are displayed to the user, helping the user to quickly and accurately select part of the content for understanding and use.

[0003] With the widespread application of word segmentation technology, the accuracy requirements for word segmentation are getting higher and higher. In the existing technology, the optimization of word segmentation usually starts from grammar, word segmentation method, and word segmentation database. However, these aspects are already very perfect nowadays, and further optimization is difficult, and the improvement in accuracy is also very small. A new word segmentation optimization method is urgently needed to improve the accuracy of word segmentation. Summary of the invention

[0004] The embodiments of the present invention provide a word segmentation method, device and electronic device for improving the accuracy of speech recognition.

[0005] An embodiment of the present invention provides a word segmentation method, the method comprising:

[0006] Segment the target string to obtain the first segmentation result;

[0007] Performing error recognition on the target character string to obtain a recognition result;

[0008] If the recognition result indicates that the target character string has an error, based on the recognition result, correcting the target character string to obtain a corrected character string;

[0009] Performing word segmentation on the error-corrected character string to obtain a second word segmentation result;

[0010] The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.

[0011] Optionally, based on the recognition result, performing error correction on the target character string to obtain an error-corrected character string includes:

[0012] Obtaining the wrong segmented words in the recognition result, and obtaining candidate words related to the wrong segmented words;

[0013] Replacing the word segmentation in the target character string based on the candidate word to obtain a replaced candidate character string;

[0014] The candidate character strings are scored based on the language model, and the candidate character string with the highest score is obtained as the character string after error correction.

[0015] Optionally, obtaining candidate words related to the incorrect word segmentation includes:

[0016] A word having the same and / or similar pronunciation as the incorrect participle is obtained as the candidate word.

[0017] Optionally, obtaining candidate words related to the incorrect word segmentation includes:

[0018] A word with a similar shape to the incorrectly segmented word is obtained as the candidate word.

[0019] Optionally, obtaining candidate words related to the incorrect word segmentation includes:

[0020] Determining whether the incorrect segmented words contain repeated characters and / or words;

[0021] If so, removing repeated characters and / or words in the incorrect segmented words to obtain the candidate words;

[0022] Optionally, obtaining candidate words related to the incorrect word segmentation includes:

[0023] An N-gram relation word having an N-gram relation with the incorrect segmented word is obtained as the candidate word, where N is an integer greater than or equal to 2.

[0024] Optionally, replacing the segmented words in the target character string based on the candidate words to obtain the replaced candidate character string includes:

[0025] The candidate character string is obtained by replacing the incorrect segmented word in the target character string with the candidate word; or,

[0026] The candidate character string is obtained by replacing an N-gram relation word having an N-gram relation with the wrong segmented word in the target character string with the candidate word.

[0027] Optionally, the method further includes: displaying the corrected word segmentation results and providing prompts for the incorrect word segmentations.

[0028] Optionally, after displaying the corrected word segmentation result, the method further includes:

[0029] Obtaining a user's selection operation on the incorrect word segmentation;

[0030] In response to the selection operation, a correct word segmentation corresponding to the incorrect word segmentation is displayed or input.

[0031] The embodiment of the present invention further provides a word segmentation device, the device comprising:

[0032] A word segmentation unit, used to segment the target character string to obtain a first word segmentation result;

[0033] A recognition unit, used for performing error recognition on the target character string to obtain a recognition result;

[0034] An error correction unit, configured to, if the recognition result indicates that the target character string has an error, perform error correction on the target character string based on the recognition result to obtain an error-corrected character string;

[0035] The word segmentation unit is also used to segment the error-corrected character string to obtain a second word segmentation result;

[0036] The correction unit is used to correct the first word segmentation result based on the second word segmentation result to obtain a corrected word segmentation result.

[0037] Optionally, the error correction unit is used to:

[0038] Obtain the wrong word segmentation in the recognition result, and obtain the candidate word related to the wrong word segmentation; replace the word segmentation in the target character string based on the candidate word to obtain the replaced candidate character string; score the candidate character string based on the language model, and obtain the candidate character string with the highest score as the character string after error correction.

[0039] Optionally, the error correction unit is further used to: obtain a word with the same and / or similar pronunciation as the erroneous participle as the candidate word.

[0040] Optionally, the error correction unit is further used to: obtain a word with similar glyphs to the erroneous segmented word as the candidate word.

[0041] Optionally, the error correction unit is further used to: determine whether the erroneous segmentation contains repeated characters and / or words; if so, remove the repeated characters and / or words in the erroneous segmentation to obtain the candidate word;

[0042] Optionally, the error correction unit is further used to: obtain an N-gram relationship word having an N-gram relationship with the erroneous participle as the candidate word, where N is an integer greater than or equal to 2.

[0043] Optionally, the error correction unit is further used to: obtain the candidate string by replacing the erroneous participle in the target string with the candidate word; or obtain the candidate string by replacing an N-gram relationship word having an N-gram relationship with the erroneous participle in the target string with the candidate word.

[0044] Optionally, the device further includes: a display unit, configured to display the corrected word segmentation results and to provide prompts for the incorrect word segmentations.

[0045] Optionally, the device further includes: a response unit, configured to obtain a user's selection operation on the erroneous word segmentation after displaying the corrected word segmentation result; and in response to the selection operation, display or input a correct word segmentation corresponding to the erroneous word segmentation.

[0046] The embodiment of the present specification also provides an electronic device, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:

[0047] Segment the target string to obtain the first segmentation result;

[0048] Performing error recognition on the target character string to obtain a recognition result;

[0049] If the recognition result indicates that the target character string has an error, based on the recognition result, correcting the target character string to obtain a corrected character string;

[0050] Performing word segmentation on the error-corrected character string to obtain a second word segmentation result;

[0051] The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.

[0052] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:

[0053] Segment the target string to obtain the first segmentation result;

[0054] Performing error recognition on the target character string to obtain a recognition result;

[0055] If the recognition result indicates that the target character string has an error, based on the recognition result, correcting the target character string to obtain a corrected character string;

[0056] Performing word segmentation on the error-corrected character string to obtain a second word segmentation result;

[0057] The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.

[0058] The above one or more technical solutions in the embodiments of the present application have at least the following technical effects:

[0059] The embodiment of the present application provides a word segmentation method, which performs word segmentation on a target character string to obtain a first word segmentation result; based on a language model and the first word segmentation result, performs error recognition on the target character string to obtain a recognition result; if the recognition result indicates that there is an error in the target character string, the target character string is corrected based on the language model and the recognition result; the character string obtained by the error correction is segmented to obtain a second word segmentation result; the first word segmentation result is corrected based on the second word segmentation result to obtain a corrected word segmentation result. That is, by correcting the error of the target character string, the word segmentation result of the correct character string is obtained to correct the word segmentation result of the target character string, which solves the technical problem that the accuracy of word segmentation is greatly reduced due to erroneous characters, and improves the accuracy and practicality of word segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A flowchart of a word segmentation method provided in an embodiment of the present application;

[0061] Figure 2 A block diagram of a word segmentation device provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In the technical solution provided in the embodiment of the present application, by correcting the target character string and segmenting the correct character string after error correction, the segmentation result of the target character string is corrected based on the segmentation result of the correct character string, thereby solving the technical problem of greatly reduced segmentation accuracy due to erroneous characters and improving the accuracy and practicality of word segmentation.

[0064] The main implementation principles, specific implementation methods and corresponding beneficial effects of the technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0065] Example

[0066] Please refer to Figure 1 , the embodiment of the present application provides a word segmentation method, the method comprising:

[0067] S110: Segment the target character string to obtain a first segmentation result;

[0068] S120: performing error recognition on the target character string to obtain a recognition result;

[0069] S130: If the recognition result indicates that the target character string has an error, based on the recognition result, correct the target character string to obtain a corrected character string;

[0070] S140: Segmenting the corrected character string to obtain a second segmentation result;

[0071] S150: Modify the first word segmentation result based on the second word segmentation result to obtain a modified word segmentation result.

[0072] During the specific implementation process, the target string can be a search keyword of a search engine, or it can be a content selected by a user, or it can be a string in a clipboard. For search keywords, S110 can be executed to segment the search keywords when the user confirms the search. For content selected by the user or a string in a clipboard, S110 can be executed to segment the content selected by the user or the string in the clipboard when the user triggers the word segmentation function. For example: the user selects, the user completes input or copies a text such as "For example, give you canned chicken soup", and then clicks the word segmentation button, double-clicks the left mouse button, executes a preset gesture, etc. to trigger the word segmentation function, then the electronic device executes S110 to segment "For example, give you canned chicken soup" and obtains the first word segmentation result "For example / give / you / canned chicken / soup".

[0073] When executing S110, word segmentation can be performed with the minimum number of result words as the goal and the maximum probability of the word segmentation result path (including maximum probability of unigram, maximum probability of binary, etc.), or based on self-annotated hidden Markov model (HMM), conditional random field (CRF), deep learning and other word segmentation models. This embodiment does not limit the specific method of word segmentation.

[0074] After S110 performs word segmentation on the target character string to obtain the first word segmentation result, S120 is executed to perform error recognition on the target character string. Error recognition can be performed based on a language model, as well as machine learning and deep learning methods such as machine learning classification algorithms and sequence annotation methods of character annotation / word annotation. The following is a detailed description using a language model as an example. The language model describes the fluency of the text. When the language model score is poor, such as below a set threshold, it can be determined that the scored target character string has an error. Otherwise, the scored target character string is considered correct.

[0075] Specifically, when executing S120, the first word segmentation result of the target string can be input into a pre-built N-Gram language model or a pre-built neural network language model, and the target string is scored by the N-Gram language model or the neural network language model. If the score is lower than the set threshold, a recognition result indicating that the target string has an error is obtained, and vice versa, a recognition result indicating that the target string has no error is obtained. When the score output by the language model is lower than the set threshold, the scores of each word segmentation in the first word segmentation result (i.e., the conditional probability of any word segmentation co-occurring with other words segmentations) are compared, and one or more word segmentations with the lowest scores are obtained as the wrong word segmentations in the target string, and the wrong word segmentations are written into the recognition result.

[0076] For example: for the target string "for example, give you cans of chicken soup", errors are identified, and the first segmentation result of the target string "for example, give you cans of chicken soup" is input into the language model for scoring. The score of "for example, give you cans of chicken soup" is less than the set threshold. Then, the segmentation "cans of chicken" with the lowest score in the first segmentation result is further obtained as the incorrect segmentation in the target string, thereby obtaining the recognition result: there is an error in the target string "for example, give you cans of chicken soup", and the incorrect segmentation is "cans of chicken".

[0077] When the recognition result obtained in S120 indicates that there is an error in the target character string, S130 is executed to correct the target character string based on the recognition result to obtain a corrected character string, that is, a correct character string. Similarly, the correct character string can be obtained through scoring of the language model, and machine learning and deep learning methods such as machine learning classification algorithms, character annotation / word annotation sequence annotation methods. Specifically, the wrong word segmentation in the recognition result is obtained, and candidate words for replacing the wrong word segmentation are obtained; the word segmentation in the target character string is replaced based on the candidate word to obtain a replaced candidate character string; the candidate character string is scored based on the language model, and the candidate character string with the highest score is obtained as the corrected character string.

[0078] In the specific implementation process, the candidate words used to replace the wrong segmentation can be obtained by random acquisition, and the final candidate words are determined by feedback through the scoring of the language model, but the amount of calculation in this method is very large and has high requirements on the computing power of the electronic device. In order to reduce the amount of calculation, the embodiment of this specification adopts the method of obtaining words related to the wrong segmentation as candidate words. If there are errors in the target string, the following three types of errors may occur: wrong words, multiple words, and missing words. The embodiment of this specification obtains candidate words related to the wrong segmentation based on the features corresponding to each error type.

[0079] For misspelled words, during the input process, it may be due to misinputting the pronunciation when using a pinyin input method or misselecting words with the same pronunciation, resulting in inputting misspelled words with the same or similar pronunciation. It may also be because of using a Wubi input method, handwriting input, or misreading the character shape, resulting in inputting misspelled words with similar character shapes. When obtaining candidate words related to the misspelled word, words with the same or similar pronunciation as the misspelled word can be obtained as candidate words, or words with similar character shapes to the misspelled word can be obtained as candidate words. For example, for the misspelled word "guanguanji" (罐罐鸡), "guanguanji" (灌灌鸡) with the same pronunciation and "guangguaji" (观光鸡) with a similar pronunciation can be obtained as candidate words. Among them, similarity in pronunciation or character shape can be judged based on the composition of pronunciation and character shape. For example, the pronunciations "in" and "ing" can be judged as similar, and the characters "guan" (罐) and "guan" (灌) can be judged as similar. Specifically, the similarity of their composition can be calculated through methods such as edit distance and vector transformation, but the specific method of calculating similarity is not limited in this embodiment. For example, whether they are similar can be judged according to the edit distance between two pronunciations or character shapes. When the edit distance is greater than or equal to the similarity threshold, it is judged as similar, otherwise it is not similar.

[0080] For repeated words, the more common situation is the repeated input of the same character and / or word. When obtaining the misspelled word, it can be judged whether the misspelled word contains repeated characters and / or words; if the judgment result is yes, that is, the misspelled word contains repeated characters and / or words, then the repeated characters and / or words in the misspelled word are removed to obtain the candidate word. Conversely, if the answer is no, then the candidate word is obtained by other methods. For example, for the misspelled word "guanguanji" (罐罐鸡), the repeated word "guan" (罐) in "guanguanji" can be removed to obtain "guanj" (罐鸡) as the candidate word.

[0081] For missing words, it may be caused by accidental deletion or omission during the input process, and the missing words are usually words closely related to the previous word, such as words with an N-gram relationship. The N-gram relationship means that words are often associated and appear together. For example, "jin guang can can" (金光灿灿) are often used together, so there is a binary relationship between "jin guang" (金光) and "can can" (灿灿), and "jin guang" + "can can" are binary relationship words. Similarly, "shen ma dou shi fu yun" (神马都是浮云) are often used together, and "shen ma" + "dou shi" + "fu yun" are ternary relationship words. When obtaining candidate words related to the misspelled word, N-gram relationship words with an N-gram relationship with the misspelled word can be obtained as candidate words, where N is an integer greater than or equal to 2. For example, assuming the misspelled word is "shen ma dou fu yun" (神马都浮云), then the missing word "dou shi" (都是) can be obtained as the candidate word according to the ternary relationship word "shen ma dou shi fu yun" (神马都是浮云).

[0082] In the specific implementation process, the above methods for obtaining candidate word segmentations can also be combined to obtain candidate words. For example: combining the methods for obtaining candidate words of multi-word and misspelled words, for the misspelled word segmentation "guanguanji", "guanj" can be obtained as a candidate word. Of course, the methods for obtaining candidate words of misspelled words and missing words can also be combined, the methods for obtaining candidate words of multi-word and missing words can also be combined, or even all three methods can be combined. The specific combination method depends on the specific situation of the misspelled word segmentation, and this embodiment does not make specific limitations.

[0083] After obtaining the candidate words, replace the misspelled word segmentations in the target string with the candidate words, and score the replaced candidate string based on the language model to obtain the candidate string with the highest score as the correct string. Then, execute S140 to perform word segmentation on the corrected string to obtain the second word segmentation result. The second result obtained thereby is the word segmentation result of the correct string, with higher accuracy and practicality.

[0084] After S140, execute S150 to correct the first word segmentation result based on the obtained second word segmentation result to obtain the corrected word segmentation result. Specifically, correct the first word segmentation result according to the word segmentation positions of the second word segmentation result, so that the corrected word segmentation result has the same word segmentation positions as the second word segmentation result. For example: the first word segmentation result is "for example / give / you / guanguanji / soup", and the second word segmentation result of the corrected string is "for example / give / you / guanguan / chicken soup". Then, correct the first word segmentation result according to the second word segmentation result, and the corrected word segmentation result is "for example / give / you / guanguan / chicken soup". It can be seen that by correcting the target string, obtaining the word segmentation result of the correct string to correct the word segmentation result of the target string, it can effectively avoid or reduce the problem that the word segmentation accuracy is greatly reduced due to incorrect characters, thereby improving the accuracy and practicality of word segmentation.

[0085] In the specific implementation process, after S150, this embodiment can further display the corrected word segmentation result to facilitate the user's use and viewing. During the display process, it is also possible to prompt the misspelled word segmentations in the target string. Specifically, the user can be informed that the word segmentation may be incorrect by different colors, fonts, error marks, etc., to facilitate the user to make corrections or use. For example: when displaying the corrected word segmentation result "for example / give / you / guanguan / chicken soup", the misspelled word "guanguan" can be highlighted: display its color as red, which is different from the colors of other word segmentations, to prompt the user that this word may be incorrect. Correspondingly, this embodiment can also obtain the user's selection operations on the misspelled word segmentations, such as clicking, pressing again, etc., and respond to the user's selection operations to display or input the correct word corresponding to the misspelled word segmentation, or directly display the correct word corresponding to the misspelled word segmentation without the user's selection operation.

[0086] A word segmentation method is provided in the above embodiment. The present application embodiment also provides a word segmentation device. Please refer to Figure 2 , the device comprises:

[0087] A word segmentation unit 21, used to segment the target character string to obtain a first word segmentation result;

[0088] The recognition unit 22 is used to perform error recognition on the target character string to obtain a recognition result;

[0089] An error correction unit 23 is used to correct the target character string based on the recognition result to obtain a corrected character string when the recognition result indicates that the target character string has an error;

[0090] The word segmentation unit 21 is also used to segment the corrected character string to obtain a second word segmentation result;

[0091] The correction unit 24 is used to correct the first word segmentation result based on the second word segmentation result to obtain a corrected word segmentation result.

[0092] As an optional implementation, the error correction unit 23 is used to: obtain the erroneous word segmentation in the recognition result, and obtain candidate words related to the erroneous word segmentation; replace the word segmentation in the target character string based on the candidate words to obtain the replaced candidate character string; score the candidate character string based on the language model, and obtain the candidate character string with the highest score as the corrected character string.

[0093] Among them, the error correction unit 23 can obtain candidate words related to the incorrect word segmentation in any of the following ways: obtain words with the same and / or similar pronunciation as the incorrect word segmentation as the candidate words; obtain words with similar glyphs as the incorrect word segmentation as the candidate words; determine whether the incorrect word segmentation contains repeated characters and / or words, and if so, remove the repeated characters and / or words in the incorrect word segmentation to obtain the candidate words; obtain an N-ary relationship word with an N-ary relationship with the incorrect word segmentation as the candidate word, where N is an integer greater than or equal to 2.

[0094] When the error correction unit 23 replaces the segmented words in the target character string based on the candidate words, the candidate character string can be obtained by replacing the erroneous segmented words in the target character string with the candidate words; or, the candidate character string can be obtained by replacing an N-gram relationship word in the target character string that has an N-gram relationship with the erroneous segmented words with the candidate words.

[0095] As an optional implementation, the device may further include: a display unit 25, which is used to display the corrected word segmentation result and prompt the incorrect word segmentation. Further, the device may also include: a response unit 26, which is used to obtain the user's selection operation on the incorrect word segmentation after displaying the corrected word segmentation result; in response to the selection operation, display or input the correct word segmentation corresponding to the incorrect word segmentation.

[0096] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0097] Figure 3 8 is a block diagram of an electronic device 800 for implementing a word segmentation method according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0098] Reference Figure 3 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / display (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0099] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0100] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0101] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0102] The multimedia component 808 includes a screen that provides a presentation interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0103] The audio component 810 is configured to present and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for presenting audio signals.

[0104] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0105] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0106] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0107] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0108] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0109] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a word segmentation method, the method comprising: performing word segmentation on a target character string to obtain a first word segmentation result; performing error recognition on the target character string to obtain a recognition result; if the recognition result indicates that there is an error in the target character string, based on the recognition result, performing error correction on the target character string to obtain an error-corrected character string; performing word segmentation on the error-corrected character string to obtain a second word segmentation result; and correcting the first word segmentation result based on the second word segmentation result to obtain a corrected word segmentation result.

[0110] Figure 3 1 is a schematic diagram of the structure of the server in an embodiment of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0111] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input presentation interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0112] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0113] It should be understood that the present invention is not limited to the precise structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A word segmentation method, characterized in that: The method comprises: Segment the target string to obtain the first segmentation result; Performing error recognition on the target character string to obtain a recognition result; If the recognition result indicates that the target character string has an error, based on the recognition result, the target character string is corrected to obtain a corrected character string, including: obtaining an erroneous segmentation in the recognition result, and obtaining a candidate word related to the erroneous segmentation; replacing the segmentation in the target character string based on the candidate word to obtain a replaced candidate character string; scoring the candidate character string based on a language model, and obtaining the candidate character string with the highest score as the corrected character string; Performing word segmentation on the error-corrected character string to obtain a second word segmentation result; The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.

2. The method according to claim 1, characterized in that Obtain candidate words related to the incorrect word segmentation, including: A word having the same and / or similar pronunciation as the incorrect participle is obtained as the candidate word.

3. The method according to claim 1, characterized in that Obtain candidate words related to the incorrect word segmentation, including: A word with a similar shape to the incorrectly segmented word is obtained as the candidate word.

4. The method according to claim 1, characterized in that Obtain candidate words related to the incorrect word segmentation, including: Determining whether the incorrect segmented words contain repeated characters and / or words; If so, the repeated characters and / or words in the incorrect segmented words are removed to obtain the candidate words.

5. The method according to claim 1, characterized in that Obtain candidate words related to the incorrect word segmentation, including: An N-gram relation word having an N-gram relation with the incorrect segmented word is obtained as the candidate word, where N is an integer greater than or equal to 2.

6. The method according to any one of claims 1 to 5, characterized in that: Replacing the word segment in the target character string based on the candidate word to obtain a replaced candidate character string includes: The candidate character string is obtained by replacing the incorrect segmented word in the target character string with the candidate word; or, The candidate character string is obtained by replacing an N-gram relation word having an N-gram relation with the wrong segmented word in the target character string with the candidate word.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The corrected word segmentation results are displayed, and the incorrect word segmentations are prompted.

8. The method according to claim 7, characterized in that After displaying the corrected word segmentation results, the method further includes: Obtaining a user's selection operation on the incorrect word segmentation; In response to the selection operation, a correct word segmentation corresponding to the incorrect word segmentation is displayed or input.

9. A word segmentation device, characterized in that: The device comprises: A word segmentation unit, used to segment the target character string to obtain a first word segmentation result; A recognition unit, used for performing error recognition on the target character string to obtain a recognition result; The error correction unit is used to correct the target character string based on the recognition result to obtain a corrected character string when the recognition result indicates that the target character string has an error, including: obtaining an erroneous word segmentation in the recognition result and obtaining a candidate word related to the erroneous word segmentation; replacing the word segmentation in the target character string based on the candidate word to obtain a replaced candidate character string; scoring the candidate character string based on a language model, and obtaining the candidate character string with the highest score as the corrected character string; The word segmentation unit is also used to segment the error-corrected character string to obtain a second word segmentation result; The correction unit is used to correct the first word segmentation result based on the second word segmentation result to obtain a corrected word segmentation result.

10. The device according to claim 9, characterized in that The error correction unit is also used for: A word having the same and / or similar pronunciation as the incorrect participle is obtained as the candidate word.

11. The device according to claim 9, characterized in that The error correction unit is also used for: A word with a similar shape to the incorrectly segmented word is obtained as the candidate word.

12. The device according to claim 9, characterized in that The error correction unit is also used for: Determining whether the incorrect segmented words contain repeated characters and / or words; If so, the repeated characters and / or words in the incorrect segmented words are removed to obtain the candidate words.

13. The device according to claim 9, characterized in that The error correction unit is also used for: An N-gram relation word having an N-gram relation with the incorrect segmented word is obtained as the candidate word, where N is an integer greater than or equal to 2.

14. The device according to any one of claims 9 to 13, characterized in that: The error correction unit is also used for: The candidate character string is obtained by replacing the wrong segmented word in the target character string with the candidate word; or, The candidate character string is obtained by replacing an N-gram relation word having an N-gram relation with the wrong segmented word in the target character string with the candidate word.

15. The device according to any one of claims 9 to 13, characterized in that: The device also includes: The display unit is used to display the corrected word segmentation results and to prompt the incorrect word segmentation.

16. The device according to claim 15, characterized in that The device also includes: The response unit is used to obtain a user's selection operation on the incorrect word segmentation after displaying the corrected word segmentation result; and in response to the selection operation, display or input a correct word segmentation corresponding to the incorrect word segmentation.

17. An electronic device, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Segment the target string to obtain the first segmentation result; Performing error recognition on the target character string to obtain a recognition result; If the recognition result indicates that the target character string has an error, based on the recognition result, the target character string is corrected to obtain a corrected character string, including: obtaining an erroneous segmentation in the recognition result, and obtaining a candidate word related to the erroneous segmentation; replacing the segmentation in the target character string based on the candidate word to obtain a replaced candidate character string; scoring the candidate character string based on a language model, and obtaining the candidate character string with the highest score as the corrected character string; Performing word segmentation on the error-corrected character string to obtain a second word segmentation result; The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the following steps are implemented: Segment the target string to obtain the first segmentation result; Performing error recognition on the target character string to obtain a recognition result; If the recognition result indicates that the target character string has an error, based on the recognition result, the target character string is corrected to obtain a corrected character string, including: obtaining an erroneous segmentation in the recognition result, and obtaining a candidate word related to the erroneous segmentation; replacing the segmentation in the target character string based on the candidate word to obtain a replaced candidate character string; scoring the candidate character string based on a language model, and obtaining the candidate character string with the highest score as the corrected character string; Performing word segmentation on the error-corrected character string to obtain a second word segmentation result; The first word segmentation result is modified based on the second word segmentation result to obtain a modified word segmentation result.