WO2021114928A1 - Error correction word sorting method and apparatus, terminal device and storage medium - Google Patents

Error correction word sorting method and apparatus, terminal device and storage medium Download PDF

Info

Publication number
WO2021114928A1
WO2021114928A1 PCT/CN2020/124484 CN2020124484W WO2021114928A1 WO 2021114928 A1 WO2021114928 A1 WO 2021114928A1 CN 2020124484 W CN2020124484 W CN 2020124484W WO 2021114928 A1 WO2021114928 A1 WO 2021114928A1
Authority
WO
WIPO (PCT)
Prior art keywords
error correction
word
words
type
types
Prior art date
Application number
PCT/CN2020/124484
Other languages
French (fr)
Chinese (zh)
Inventor
沈金明
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021114928A1 publication Critical patent/WO2021114928A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • 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
    • 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
    • G06F3/0237Character input methods using prediction or retrieval techniques

Definitions

  • This application relates to the technical field of input methods, and in particular to a method, device, terminal device, and storage medium for sorting error correction words.
  • the pinyin input method suitable for Chinese input is that after the user inputs a string of pinyin, the system converts the input pinyin into a string of Chinese characters. Since it does not require special memory and conforms to the way of thinking of people, as long as you know Pinyin, you can input.
  • the Pinyin input method has become the most widely used input method at present.
  • the embodiments of the present application provide a method, device, terminal device, and storage medium for sorting error correction words, which can improve the error correction rate of the Pinyin input method, so that the error correction words finally presented to the user can better match the actual needs of the user.
  • an embodiment of the present application provides a method for sorting error correction words, including:
  • the weight value of each error correction word may be determined according to the initial weight value of each error correction word and the word order weight of the corresponding error correction type.
  • the number of error correction words corresponding to various error correction types can also be counted separately; the error correction words that exceed the threshold of the number of error correction words are deleted, and then according to the remaining The weight value of each error correction word is used to sort each error correction word.
  • the error correction words with a relatively small order weight may be deleted according to the order weight of the error correction type, so as to reduce the number of error correction words.
  • an embodiment of the present application provides a device for sorting error correction words, including:
  • the error correction word acquisition module is used to obtain multiple error correction words matching the character string when receiving the character string input by the user, and determine the error correction type to which each error correction word belongs and the error correction type Corresponding word order weight;
  • a weight value determining module configured to determine the weight value of each error correction word according to the word order weight of the error correction type
  • the error correction word ordering module is used for ordering the multiple error correction words according to the weight value of each error correction word.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, The method for sorting error correction words according to any one of the foregoing first aspect is implemented.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor of a terminal device, any one of the above-mentioned first aspects is implemented.
  • the method for sorting error correction words described in the item is implemented.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the error correction word ordering method described in any one of the above-mentioned first aspects.
  • the embodiments of the present application include the following beneficial effects:
  • each error correction word when a character string input by a user is received, each error correction word can be re-determined by obtaining an error correction word matching the character string, and then according to the word order weight of the error correction type corresponding to the error correction word After sorting each error correction word according to the re-determined weight value, each error correction word can be displayed to the user.
  • the error correction type with higher word order weight is the error correction for the input errors that occur more frequently when the user is input.
  • the weight value of the error correction word can be re-determined according to the error correction type, and the more common input errors can be corrected.
  • Corresponding error correction words are first displayed to users, which improves the error correction efficiency of the input method, and can be applied to fields such as artificial intelligence and natural language processing, which helps improve input efficiency.
  • FIG. 1 is a schematic diagram of the hardware structure of a mobile phone to which the method for sorting error correction words provided by an embodiment of the present application is applicable;
  • FIG. 2 is a schematic diagram of the software structure of a mobile phone to which the method for sorting error correction words provided by an embodiment of the present application is applicable;
  • FIG. 3 is a schematic step flow chart of a method for sorting error correction words according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of an input method architecture provided by an embodiment of the present application.
  • FIG. 5 is a schematic step flowchart of a method for sorting error correction words provided by another embodiment of the present application.
  • FIG. 6 is a schematic step flowchart of a method for sorting error correction words according to another embodiment of the present application.
  • FIG. 7 is a structural block diagram of a device for sorting error correction words according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the automatic error correction function of the input method will add it to "lang", “leng” or “ling” according to the preset error correction strategy, and then find the corresponding Chinese characters are provided to users.
  • the input method will search for other adjacent letters around the letter “i” to form the string "you”, and then provide the Chinese characters corresponding to the string "you” to the user .
  • the error correction words provided by the input method after automatic error correction are not necessarily the words that the user really wants. There are situations where the correcting words are incorrect, or there are too many correcting words, which affects the normal use of users.
  • the input method detects the user input string "daohng"
  • the string cannot directly match the corresponding Chinese character.
  • the input method will correct the errors, get “daohang”, “daohong” and “daoheng”, and give the corresponding error correction words.
  • the user may just want to enter "daohang-navigation”, according to the above error correction will lead to too many error correction words.
  • the input method provides all the correcting words to the user, it will take some time for the user to find the word they really want to input.
  • the embodiments of the present application provide a method for sorting error correction words.
  • the error correction rate of the pinyin input method is improved, and the final presentation is
  • the error correction words given to the user can better match the actual needs of the user, and reduce the operation event that the user chooses the word that he really wants to input from the excessive error correction words.
  • the method for sorting error correction words provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobiles.
  • AR augmented reality
  • VR virtual reality
  • terminal devices such as ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (personal digital assistants, PDAs)
  • UMPC ultra-mobile personal computers
  • PDAs personal digital assistants
  • Fig. 1 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a processing Adapter 180, power supply 190 and other components.
  • RF radio frequency
  • the RF circuit 110 can be used for receiving and sending signals during information transmission or communication. In particular, after receiving the downlink information of the base station, it is processed by the processor 180; in addition, the designed uplink data is sent to the base station.
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the RF circuit 110 can also communicate with the network and other devices through wireless communication.
  • the above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), Email, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile Communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • Email Short Messaging Service
  • the memory 120 may be used to store software programs and modules.
  • the processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 130 may be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 100.
  • the input unit 130 may include a touch panel 131 and other input devices 132.
  • the touch panel 131 also known as a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 180, and can receive and execute the commands sent by the processor 180.
  • the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 130 may also include other input devices 132.
  • the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
  • the display unit 140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 180 responds to the touch event. The type provides corresponding visual output on the display panel 141.
  • the touch panel 131 and the display panel 141 are used as two independent components to realize the input and input functions of the mobile phone, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated. Realize the input and output functions of the mobile phone.
  • the mobile phone 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 141 and/or when the mobile phone is moved to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone.
  • the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, and the audio circuit 160 After being received, it is converted into audio data, and then processed by the audio data output processor 180, and sent to, for example, another mobile phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.
  • Wi-Fi is a short-distance wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170. It provides users with wireless broadband Internet access.
  • FIG. 1 shows the Wi-Fi module 170, it is understandable that it is not a necessary component of the mobile phone 100, and can be omitted as needed without changing the essence of the invention.
  • the processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole.
  • the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 180.
  • the mobile phone 100 also includes a power source 190 (such as a battery) for supplying power to various components.
  • a power source 190 such as a battery
  • the power source can be logically connected to the processor 180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
  • the mobile phone 100 may also include a camera.
  • the position of the camera on the mobile phone 100 may be front-mounted or rear-mounted, which is not limited in the embodiment of the present application.
  • the mobile phone 100 may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
  • the mobile phone 100 may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
  • the multiple cameras may be all front-mounted, or all rear-mounted, or partly front-mounted and some rear-mounted, which is not limited in the embodiment of the present application.
  • the mobile phone 100 may also include a Bluetooth module, etc., which will not be repeated here.
  • FIG. 2 is a schematic diagram of the software structure of the mobile phone 100 according to an embodiment of the present application.
  • the Android system is divided into four layers, namely the application layer, the application framework layer (framework, FWK), the system layer, and the hardware abstraction layer. Communication between the layers through software interface.
  • the application layer may include a series of application packages, which may include applications such as short message, calendar, camera, video, navigation, gallery, and call.
  • applications such as short message, calendar, camera, video, navigation, gallery, and call.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer may include some predefined functions, such as functions for receiving events sent by the application framework layer.
  • the application framework layer can include a window manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • the application framework layer can also include:
  • a view system which includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the mobile phone 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the system layer can include multiple functional modules. For example: sensor service module, physical state recognition module, 3D graphics processing library (for example: OpenGL ES), etc.
  • the sensor service module is used to monitor the sensor data uploaded by various sensors at the hardware layer and determine the physical state of the mobile phone 100;
  • Physical state recognition module used to analyze and recognize user gestures, faces, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the system layer can also include:
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the hardware abstraction layer is the layer between hardware and software.
  • the hardware abstraction layer can include display drivers, camera drivers, sensor drivers, etc., used to drive related hardware at the hardware layer, such as display screens, cameras, sensors, and so on.
  • the following embodiments can be implemented on the mobile phone 100 having the above hardware structure/software structure.
  • the following embodiment will take the mobile phone 100 as an example to describe the error correction word ordering method provided in the embodiment of the present application.
  • FIG. 3 a schematic step flow chart of a method for sorting error correction words provided by an embodiment of the present application is shown.
  • the method may be applied to the above-mentioned mobile phone 100, and the method may specifically include the following steps:
  • the character string input by the user may be a pinyin character string. That is, the user inputs a pinyin character string when using the pinyin input method, and then outputs corresponding Chinese characters through matching and searching of the input method.
  • FIG. 4 it is a schematic diagram of the input method architecture of this embodiment.
  • the method for sorting error correction words provided in this embodiment can be implemented in the input method architecture shown in FIG. 4.
  • the input method architecture shown in Figure 4 mainly includes four core units: input, engine, thesaurus, and display.
  • the input unit can provide the user with keyboard input input methods, including pinyin full key, pinyin nine keys, etc.
  • the core processing of the input unit is to prevent accidental touch, so that the user can input the correct character string as much as possible.
  • the input unit can also provide users with input methods in other languages, as well as various types of input methods such as strokes, handwriting, and voice.
  • the engine unit for the pinyin input method, it mainly provides the N-gram language model and Viterbi pinyin decoding, which can be combined with the vocabulary to achieve specific word generation, association and error correction functions.
  • the vocabulary in the input method includes basic vocabulary, internet hot words, user-defined phrases, etc., and each vocabulary can be updated at a certain frequency.
  • the display unit of the input method can be presented to the user through the display interface of the terminal device.
  • it can also include other information or service recommendation information.
  • the candidate word ranking process is improved, and a new error correction word ranking method is proposed.
  • the following is a specific introduction.
  • an input error may occur.
  • the input method can automatically correct the wrong character string. For example, if the user enters the string "yiu”, the input method automatically corrects it to the string "you".
  • the input method After the input method corrects the incorrectly input pinyin character string, it can output an error correction word that matches the corrected character string. For example, for the character string "yiu" input by the user, the input method can output error-correcting words such as " ⁇ ", " ⁇ ", and " ⁇ " that match the corrected character string "you".
  • the above-mentioned error correction words can all be regarded as obtained after correcting an erroneous character string according to a certain type of error correction. Also take the string “yiu” as an example. After the input method corrects its errors, the outputted error correction words such as " ⁇ ", " ⁇ ", “ ⁇ ” can be regarded as correcting the "yiu” according to the adjacent key. The result of error correction. That is, the letter “i” in the character string "yiu” that has been entered incorrectly is replaced with the letter "o" adjacent to it.
  • the adjacent key error correction provided above is only an example, and the error correction methods provided by the input method may include many kinds, which are not limited in this embodiment.
  • a corresponding word order weight can be configured for it, so that after error correction is performed on the pinyin character string, the error correction words can be sorted according to the above word order weight.
  • the word order weights of various error correction types in this embodiment may be calculated based on a large amount of statistical data and error correction cases.
  • the word order weights of various error correction types are calculated by analyzing the correspondence between a large number of input wrong character strings and the Chinese characters finally input by the user, which can reflect the most common input error types of the user. Therefore, the word order weight of the error correction type corresponding to the most common input error of the user is usually larger. For example, ambiguous tone error correction, less input character error correction at the end, and so on.
  • the pinyin character string entered by the user may not be an incorrect character string.
  • the input method can also correct the error to "zhai” according to the corresponding error correction method, and provide the user with the Chinese characters matching the string "zhai” at the same time.
  • each Chinese character matching the character string "zai” is a non-error correcting word
  • the Chinese character matching the character string "zhai” is an error correcting word.
  • S302 Determine the weight value of each error correction word according to the word order weight of the error correction type
  • various error correction types can be divided into different error correction classes in advance, and for any error correction class, a word order weight is set for each error correction class.
  • multiple types of error correction can be divided into four categories: one type of error correction, two types of error correction, three types of error correction, and four types of error correction, and then set each type separately A word order weight. For example, you can set the word order weight of the error correction type 1 to be equal to the word order weight of the error correction type 2, set the word order weight of the error correction type 2 to be greater than the word order weight of the error correction category 3, and set the word order weight of the error correction category 3 to be greater than Correct the four types of word order weights, and so on.
  • the word order weight of the error correction type can be directly assigned to the corresponding error correction word. That is, the word order weight of the error correction class is directly used as the weight value of the error correction word obtained after the error correction is performed according to the error correction class. It is also possible to use the word order weight of the error correction class as an additional value, and add the word order weight to the original weight value of the error correction word. For example, if the word order weight of a certain error correction type is 60%, the original weight value of a certain error correction word obtained by the error correction according to the error correction type can be multiplied by 60%, as the new error correction word The weight value of is not limited in this embodiment.
  • the error correction words can be sorted according to the size of the weight value. Generally, the larger the weight value, the higher the ranking; otherwise, the lower the ranking.
  • each error correction word when a character string input by a user is received, each error correction word can be re-determined by obtaining an error correction word that matches the character string, and then according to the word order weight of the error correction type corresponding to the error correction word.
  • the weight value of the wrong word can be displayed to the user after sorting the error correction words according to the re-determined weight value.
  • the error correction type with higher word order weight is the error correction for the input errors that occur more frequently when the user is input.
  • the weight value of the error correction word can be re-determined according to the error correction type, and the more common input errors can be corrected.
  • the corresponding error correction words are first displayed to users, which improves the error correction efficiency of the input method, and can be widely used in artificial intelligence (AI) and natural language processing fields, which helps improve input efficiency.
  • AI artificial intelligence
  • FIG. 5 there is shown a schematic step flowchart of a method for sorting error correction words according to another embodiment of the present application.
  • the method may specifically include the following steps:
  • this method can be applied to terminal devices, such as mobile phones, tablet computers, and so on. That is, the execution subject of this embodiment is the terminal device.
  • the terminal device Taking the terminal device as a mobile phone as an example, when the user uses the pinyin input method on the mobile phone, if the pinyin character string input by the user is a wrong character string, the wrong character string can be corrected and corrected according to the method provided in this embodiment. Reorder the error-corrected words obtained after error correction, so that the error-corrected words ranked higher have a greater probability that they belong to the words that the user really wants to input.
  • the multiple error correction types provided by the input method can be classified first.
  • the various error correction types are divided into error correction type 1, error correction type two, error correction type three, or error correction type four, etc., so that each error correction type includes at least one specific error correction type.
  • the types of error correction provided by input methods include user-configured fuzzy sound error correction, end-of-character error correction, adjacent key error correction, default fuzzy sound error correction, multi-input character error correction, and middle character error correction and exchange Character error correction and so on.
  • the user-configured fuzzy tone error correction may refer to the type of error correction manually configured by the user.
  • the input method can provide the user with the function of manually configuring the error correction. For example, if the user often confuses the letters "f" and "h” during the input process, he can manually choose to configure the above two letters as an error correction pair, and subsequently, when inputting, it can firstly detect whether the above two letters are entered incorrectly Case.
  • the error correction of fewer input characters at the end can mean that the pinyin has not been input completely.
  • the corresponding error correction word can be obtained. For example, for the input string "pe”, by adding other letters at the end, legal pinyin such as “pei”, “pen” or “peng” can be obtained.
  • the adjacent key error correction can refer to the letters pressed to the adjacent key position during input. When the adjacent key error correction is performed, the offset letter needs to be corrected back. Under normal circumstances, adjacent key error correction should be limited to not more than one key position.
  • the default fuzzy sound error correction may refer to some fuzzy sound error correction supported by the input method by default when the user does not configure the fuzzy sound error correction by himself.
  • the difference between default fuzzy sound correction and manual fuzzy sound is that the number of error correction words is limited, and the word order weight is relatively small.
  • Error correction for multiple input characters can mean that the user has an extra letter in the input pinyin string.
  • the multiple input character can be a repeated letter.
  • the error correction of missing characters in the middle can mean that a letter is missed in the middle of the pinyin string. It should be noted that the error correction for missing characters in the middle is only for the case where a letter is missed in the middle of the character string, not for the case where a letter is missed before or after the character string.
  • Swap character error correction can mean that in the string, the adjacent letter sequence has an exchange error, and the error correction can be completed by just turning the order of the two letters.
  • the threshold for the number of error correction words may be the maximum number of error correction words of this type that are allowed to be displayed to the user when performing error correction according to a certain error correction type. For example, if the threshold of the number of error correction words corresponding to a certain error correction type is 5, it means that when the pinyin field string is corrected according to the type, the maximum number of error correction words provided to the user is not more than 5.
  • the number threshold of the number of error correction words of the first type of error correction can be set to be greater than the first number threshold
  • the second type of error correction can be set
  • the threshold for the number of error correction words is less than or equal to the second number threshold
  • the threshold for the number of error correction words for the three types of error correction is less than or equal to the third number threshold
  • the threshold for the number of error correction words for the four types of error correction is less than or equal to the third number threshold.
  • the first number threshold can be greater than the second number threshold
  • the second number threshold can be greater than the third number threshold
  • the third number threshold can be greater than the fourth number threshold.
  • the first number threshold can be set to infinity, which means that when performing error correction according to the error correction type belonging to the error correction category, it is not limited by the number of error correction words, and all error correction words are displayed to the user.
  • the second number threshold can be set to 5
  • the third number threshold can be set to 2
  • the fourth number threshold can be set to 1, and so on.
  • the above is only an example of this embodiment, and those skilled in the art can specifically select the threshold for the number of error correction words according to actual needs, which is not limited in this embodiment.
  • the word order weight in this embodiment may refer to a discount value that discounts the weight value of the error correction word. For example, if the word order weight is 1, it means that the weight value of the error correction words obtained by this error correction type is not discounted; if the word order weight of a certain error correction type is 80%, it means that the error correction type obtained according to the error correction type is 80%. The weight value of the wrong word needs to be discounted by 20%, thereby reducing the weight value of the error-correcting word.
  • the pinyin character string input by the user when the pinyin character string input by the user is received, it can be corrected first according to the above-mentioned various error correction types. If the error correction is successful, the target character corresponding to the error correction type can be obtained. string.
  • the target character strings “pang”, “peng” and “ping” corresponding to this error correction type can be obtained by performing error correction according to the above-mentioned various error correction types. ",and many more.
  • the input method can perform error correction on the character string according to multiple different error correction types, which is not limited in this embodiment.
  • the input method can provide error correction words matching each target character string according to the existing word output method.
  • the initial weight value of each error correction word is the weight value of each word obtained according to the existing sorting strategy of the input method, and the initial weight value reflects the sort position of each error correction word before processing.
  • the initial weight value when the initial weight value of each error correction word is obtained, and the word order weight of the error correction type corresponding to the error correction word is obtained, the initial weight value may be compared with the word order weight of the corresponding error correction type. Multiply to get the final weight value of each error correction word.
  • the initial weight value can be multiplied by 60%, so that after processing, its final weight value will be Will be less than the initial weight value.
  • the ranking position of the error correction word among all candidate words may move backward.
  • the error correction words can be sorted according to the size of the weight value. Generally, the larger the weight value, the higher the ranking.
  • counting the number of error-corrected words obtained by error correction according to manual fuzzy sound counting the number of error-corrected words obtained by error correction according to neighbor keys, and so on.
  • the number of error-corrected words obtained by manual fuzzy tone error correction is not limited, and all the error-corrected words obtained according to this type of error correction can be kept in the candidate words; for less input, this For one type of error correction, only 5 error correction words are allowed to be retained. If 7 error correction words are obtained for error correction according to less input, the more than 2 error correction words need to be deleted; for other types of error correction Word processing can also be performed in the above-mentioned manner, which will not be repeated in this embodiment.
  • S507 Sort the remaining error correction words according to the weight values of the remaining error correction words.
  • two error-correcting words with a relatively small weight value can be deleted, and the remaining five error-correcting words with a relatively large weight value are retained.
  • the input pinyin character string can be compared according to various error correction types. After error correction, the weight value of each error correction word is re-determined according to the word order weight, and the error correction words exceeding the number threshold are deleted to obtain the candidate error correction words that are finally presented to the user.
  • this embodiment solves the problems of error correction, error correction failure, and excessive error correction during the input method error correction, and can present the user with the most likely words that the user really wants to input, and reduce The negative influence brought by the automatic error correction function of the input method is improved, and the error correction efficiency of the Pinyin input method is improved.
  • FIG. 6 there is shown a schematic step flow chart of a method for sorting error correction words according to another embodiment of the present application.
  • the method may specifically include the following steps:
  • S601 When a character string input by a user is received, obtain multiple error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the word order weight corresponding to the error correction type;
  • S602 Determine the weight value of each error correction word according to the word order weight of the error correction type
  • S603 Sort the multiple error correction words according to the weight value of each error correction word.
  • steps S601-S603 in this embodiment are similar to steps S301-S303 and S501-S507 in the foregoing embodiment, reference may be made to the description of the foregoing embodiment, which will not be repeated in this embodiment.
  • each error correction word when sorting each error correction word, it can also be judged whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship.
  • the above-mentioned mutually exclusive relationship may refer to certain two mutually exclusive relationships.
  • the error correction words of two types of error correction cannot appear at the same time, but only one of them can appear.
  • the three types of error correction and the four types of error correction in the foregoing embodiment have a mutually exclusive relationship. That is, the error correction words obtained by performing error correction according to the three types of error correction will reject the error correction words obtained by performing the error correction according to the four types of error correction.
  • the error-correcting words contained in the error correction types with relatively small word order weights can be deleted.
  • the word order weights of the error correction types with the mutually exclusive relationship can be compared first, and then the error correction types with the mutually exclusive relationship are determined
  • the error correction type corresponding to the minimum word order weight is the error correction type to be deleted.
  • the word order weights of the four types of error correction are smaller than the word order weights of the three types of error correction. Therefore, when there are error correction words that are obtained by performing error correction according to the error correction types belonging to the three types of error correction and the four types of error correction, each error correction word corresponding to the four types of error correction needs to be deleted.
  • the candidate words obtained after error correction and sorting according to the error correction word ordering method provided in this embodiment are not only accurate in error correction, but the number of candidate words obtained is also relatively moderate, which conforms to the user's requirements. Actual use requirements.
  • the error correction rate has increased by 40%, and the error correction rate has dropped by 30%.
  • the method for sorting error correction words provided in this embodiment can be applied to the field of artificial intelligence, especially in the sub-field of natural language processing corresponding to the field of artificial intelligence. By applying the method for sorting error correction words provided by this embodiment, it can effectively improve Input efficiency and error correction efficiency.
  • FIG. 7 shows a structural block diagram of an error correction word ordering device provided by an embodiment of the present application. part.
  • the device can be applied to terminal equipment, and specifically can include the following modules:
  • the error correction word acquisition module 701 is configured to, when a character string input by the user is received, obtain multiple error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the error correction The word order weight corresponding to the type;
  • the weight value determining module 702 is configured to determine the weight value of each error correction word according to the word order weight of the error correction type
  • the error correction word ranking module 703 is configured to rank the multiple error correction words according to the weight value of each error correction word.
  • the error correction word acquisition module 701 may specifically include the following sub-modules:
  • the character string error correction sub-module is used to perform error correction on the character string according to multiple preset error correction types when the character string input by the user is received;
  • the target character string generation sub-module is configured to generate a target character string corresponding to the target error correction type if the error correction of the character string according to the target error correction type is successful, and the target error correction type is the multiple Any one of the types of error correction;
  • the error correction word acquisition sub-module is used to acquire multiple error correction words that match the target character string.
  • the weight value determining module 702 may specifically include the following sub-modules:
  • the initial weight value acquisition sub-module is used to acquire the initial weight value of each error correction word
  • the weight value determining sub-module is configured to determine the weight value of each error correction word according to the initial weight value of each error correction word and the word order weight of the error correction type corresponding to each error correction word.
  • the various error correction types also have corresponding thresholds for the number of error correction words
  • the error correction word ranking module 703 may specifically include the following sub-modules:
  • An error correction word count statistics sub-module which is used to separately count the number of error correction words corresponding to the various error correction types
  • the error correction word deletion submodule is configured to delete error correction words that are more than the error correction word number threshold if the number of error correction words is more than the threshold value of the number of error correction words corresponding to the error correction type;
  • the error-correcting word ordering sub-module is used to order the remaining error-correcting words according to the weight value of each of the remaining error-correcting words.
  • the device may further include the following modules:
  • Mutually exclusive relationship judgment module used to judge whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship
  • a type determination module to be deleted configured to determine the error correction type to be deleted if the error correction types corresponding to any two error correction words have a mutually exclusive relationship
  • the error correction word deletion module is used to delete each error correction word matching the error correction type to be deleted.
  • the module for determining the type to be deleted may specifically include the following submodules:
  • the order weight comparison sub-module is used to compare the word order weights of the error correction types with the mutually exclusive relationship if the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
  • the to-be-deleted type determining sub-module is configured to determine that the error correction type corresponding to the minimum word order weight is the error correction type to be deleted among the error correction types having a mutually exclusive relationship.
  • the error correction type may include at least one of the first type of error correction, the second type of error correction, the third type of error correction, and the four types of error correction.
  • the word order weights of the two types of error correction are equal, the word order weights of the two types of error correction are greater than the word order weights of the three types of error correction, and the word order weights of the three types of error correction are greater than the word order weights of the four types of error correction.
  • the threshold of the number of error correction words of the first type of error correction is greater than the first number threshold, and the threshold of the number of error correction words of the second type of error correction is less than or equal to the second number threshold,
  • the error correction word count threshold of the three types of error correction is less than or equal to the third number threshold, the error correction word number threshold of the four types of error correction is less than or equal to the fourth number threshold, and the first number threshold is greater than the A second number threshold, the second number threshold is greater than the third number threshold, and the third number threshold is greater than the fourth number threshold.
  • the three types of error correction and the four types of error correction have a mutually exclusive relationship.
  • the first type of error correction may include user-configured fuzzy tone error correction
  • the second type of error correction may include end-of-input character error correction
  • the third type of error correction may include adjacent key error correction and At least one of the default fuzzy sound error correction
  • the four types of error correction may include at least one of error correction for multiple input characters, error correction for fewer input characters in the middle, and error correction for exchange characters.
  • the description is relatively simple, and for related parts, please refer to the description of the method embodiment.
  • the terminal device 800 of this embodiment includes a processor 810, a memory 820, and a computer program 821 that is stored in the memory 820 and can run on the processor 810.
  • the processor 810 executes the computer program 821
  • the steps in each embodiment of the above-mentioned error correction word ordering method are implemented, for example, steps S301 to S303 shown in FIG. 3.
  • the processor 810 executes the computer program 821
  • the functions of the modules/units in the foregoing device embodiments for example, the functions of the modules 701 to 703 shown in FIG. 7 are realized.
  • the computer program 821 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 820 and executed by the processor 810 to complete This application.
  • the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments may be used to describe the execution process of the computer program 821 in the terminal device 800.
  • the computer program 821 can be divided into an error correction word acquisition module, a weight value determination module, and an error correction word ranking module.
  • the specific functions of each module are as follows:
  • the error correction word acquisition module is used to obtain multiple error correction words matching the character string when receiving the character string input by the user, and determine the error correction type to which each error correction word belongs and the error correction type Corresponding word order weight;
  • a weight value determining module configured to determine the weight value of each error correction word according to the word order weight of the error correction type
  • the error correction word ordering module is used for ordering the multiple error correction words according to the weight value of each error correction word.
  • the terminal device 800 may be a computing device such as a desktop computer, a notebook, or a palmtop computer.
  • the terminal device 800 may include, but is not limited to, a processor 810 and a memory 820.
  • FIG. 8 is only an example of the terminal device 800, and does not constitute a limitation on the terminal device 800. It may include more or less components than shown in the figure, or combine certain components, or different components.
  • the terminal device 800 may also include input and output devices, network access devices, buses, and so on.
  • the processor 810 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 820 may be an internal storage unit of the terminal device 800, such as a hard disk or memory of the terminal device 800.
  • the memory 820 may also be an external storage device of the terminal device 800, such as a plug-in hard disk equipped on the terminal device 800, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 820 may also include both an internal storage unit of the terminal device 800 and an external storage device.
  • the memory 820 is used to store the computer program 821 and other programs and data required by the terminal device 800.
  • the memory 820 can also be used to temporarily store data that has been output or will be output.
  • the disclosed error correction word ordering method, device, terminal device, and storage medium may be implemented in other ways.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation.
  • multiple units or components can be combined or integrated into another system, or some features can be ignored. Or not.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may at least include: any entity or device capable of carrying computer program code to the error correction word sorting device, terminal equipment, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random Access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, and software distribution medium.
  • ROM read-only memory
  • RAM random Access memory
  • electric carrier signal telecommunications signal
  • software distribution medium for example, U disk, mobile hard disk, floppy disk or CD-ROM, etc.
  • computer-readable media cannot be electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiments of the present application are applicable to the technical field of input methods. Provided are an error correction word sorting method and apparatus, a terminal device and a storage medium. The method comprises: when a character string input by a user is received, acquiring a plurality of error correction words matching the character string, and determining error correction types of all the error correction words and word order weights corresponding to the error correction types; determining weight values of all the error correction words according to the word order weights of the error correction types; and sorting the plurality of error correction words according to the weight values of all the error correction words. In the method, weight values of error correction words are re-determined according to word order weights of error correction types, such that an error correction word corresponding to an input error that more frequently appears can be preferentially presented to a user, thereby improving the error correction efficiency of an input method; and the method can be applied to the fields of artificial intelligence, natural language processing, etc., and is conducive to improving input efficiency.

Description

纠错词排序方法、装置、终端设备和存储介质Error correction word sorting method, device, terminal equipment and storage medium
本申请要求于2019年12月13日提交国家知识产权局、申请号为201911279538.X、申请名称为“纠错词排序方法、装置、终端设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application filed with the State Intellectual Property Office, the application number is 201911279538.X, and the application name is "error correction word sequencing method, device, terminal equipment, and storage medium" on December 13, 2019. The entire content is incorporated into this application by reference.
技术领域Technical field
本申请涉及输入法技术领域,尤其涉及一种纠错词排序方法、装置、终端设备和存储介质。This application relates to the technical field of input methods, and in particular to a method, device, terminal device, and storage medium for sorting error correction words.
背景技术Background technique
适用于中文输入的拼音输入法,是在用户输入一串拼音后,系统将输入的拼音转换为一串中文字符。由于不需要特殊记忆,符合人的思维方式,只要会拼音就可以进行输入,拼音输入法越来越成为了目前应用最广泛的一种输入方式。The pinyin input method suitable for Chinese input is that after the user inputs a string of pinyin, the system converts the input pinyin into a string of Chinese characters. Since it does not require special memory and conforms to the way of thinking of people, as long as you know Pinyin, you can input. The Pinyin input method has become the most widely used input method at present.
随着移动设备的普及,用户在面积较小的手机、平板电脑上使用拼音输入法时,非常容易把拼音敲错。例如,用户想输入“you”,因为键盘上字母“i”和字母“o”是相邻的,在输入时就非常容易按错,结果就输入成了“yiu”,这样就会导致出来的中文字符不是用户想要的。用户需要花费较大的代价去重新输入或者修改拼音,才能得到想要的词语。With the popularization of mobile devices, it is very easy for users to type the pinyin incorrectly when using the pinyin input method on small mobile phones and tablets. For example, if the user wants to input "you", because the letter "i" and the letter "o" on the keyboard are adjacent, it is very easy to make a mistake when inputting, the result is "yiu", which will cause the output Chinese characters are not what users want. The user needs to re-enter or modify the pinyin at a relatively high cost to get the desired words.
目前,各个输入法厂商都提供了针对拼音输入法的自动纠错功能。当用户输入了错误的拼音时,输入法将会尝试自动将错误的拼音纠正为正确的拼音,然后按照纠正后的拼音给出对应的中文词语。但是,针对错误输入的拼音,按照不同的纠错方法可能就会得到多种不同的纠错结果。当纠错结果过多时,用户也需要经过繁琐的操作才能从中找出自己真正想要的词语。Currently, various input method manufacturers provide automatic error correction functions for the Pinyin input method. When the user enters the wrong pinyin, the input method will try to automatically correct the wrong pinyin to the correct pinyin, and then give the corresponding Chinese words according to the corrected pinyin. However, for incorrectly input pinyin, according to different error correction methods, a variety of different error correction results may be obtained. When there are too many error correction results, users also need to go through tedious operations to find out the words they really want.
发明内容Summary of the invention
本申请实施例提供了一种纠错词排序方法、装置、终端设备和存储介质,可以提高拼音输入法的纠错率,使得最终呈现给用户的纠错词更能匹配用户的实际需求。The embodiments of the present application provide a method, device, terminal device, and storage medium for sorting error correction words, which can improve the error correction rate of the Pinyin input method, so that the error correction words finally presented to the user can better match the actual needs of the user.
第一方面,本申请实施例提供了一种纠错词排序方法,包括:In the first aspect, an embodiment of the present application provides a method for sorting error correction words, including:
当接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;When receiving the character string input by the user, obtain a plurality of error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the word order weight corresponding to the error correction type;
根据所述纠错类型的词序权重,确定各个纠错词的权重值;Determine the weight value of each error correction word according to the word order weight of the error correction type;
根据所述各个纠错词的权重值,对所述多个纠错词进行排序。Sort the plurality of error correction words according to the weight value of each error correction word.
示例性的,各个纠错词的权重值可以根据各个纠错词的初始权重值与相应的纠错类型的词序权重确定。Exemplarily, the weight value of each error correction word may be determined according to the initial weight value of each error correction word and the word order weight of the corresponding error correction type.
示例性的,在对纠错词进行排序时,还可以分别统计各种纠错类型对应的纠错词个数;将多于纠错词个数阈值的纠错词删除,然后再根据剩余的各个纠错词的权重值,对各个纠错词进行排序。Exemplarily, when sorting the error correction words, the number of error correction words corresponding to various error correction types can also be counted separately; the error correction words that exceed the threshold of the number of error correction words are deleted, and then according to the remaining The weight value of each error correction word is used to sort each error correction word.
示例性的,对于具有互斥关系的纠错词,可以根据纠错类型的次序权重,将次序权重相对较小的纠错词删除,减少纠错词个数。Exemplarily, for error correction words having a mutually exclusive relationship, the error correction words with a relatively small order weight may be deleted according to the order weight of the error correction type, so as to reduce the number of error correction words.
第二方面,本申请实施例提供了一种纠错词排序装置,包括:In the second aspect, an embodiment of the present application provides a device for sorting error correction words, including:
纠错词获取模块,用于在接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;The error correction word acquisition module is used to obtain multiple error correction words matching the character string when receiving the character string input by the user, and determine the error correction type to which each error correction word belongs and the error correction type Corresponding word order weight;
权重值确定模块,用于根据所述纠错类型的词序权重,确定各个纠错词的权重值;A weight value determining module, configured to determine the weight value of each error correction word according to the word order weight of the error correction type;
纠错词排序模块,用于根据所述各个纠错词的权重值,对所述多个纠错词进行排序。The error correction word ordering module is used for ordering the multiple error correction words according to the weight value of each error correction word.
第三方面,本申请实施例提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面中任一项所述的纠错词排序方法。In the third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The method for sorting error correction words according to any one of the foregoing first aspect is implemented.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被终端设备的处理器执行时实现上述第一方面中任一项所述的纠错词排序方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor of a terminal device, any one of the above-mentioned first aspects is implemented. The method for sorting error correction words described in the item.
第五方面,本申请实施例提供了一种计算机程序产品,当所述计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述的纠错词排序方法。In a fifth aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the error correction word ordering method described in any one of the above-mentioned first aspects.
与现有技术相比,本申请实施例包括以下有益效果:Compared with the prior art, the embodiments of the present application include the following beneficial effects:
本申请实施例,在接收到用户输入的字符串时,通过获取与该字符串相匹配的纠错词,然后按照该纠错词对应的纠错类型的词序权重,可以重新确定各个纠错词的权重值,在按照重新确定的权重值对各个纠错词进行排序后,可以将各个纠错词展现给用户。通常,具有较高词序权重的纠错类型是针对用户在输入时较常出现的输入错误所进行的纠错,按照纠错类型重新确定纠错词的权重值,可以将较常出现的输入错误对应的纠错词优先展现给用户,提高了输入法的纠错效率,可以应用于人工智能及自然语言处理等领域,有助于提高输入效率。In the embodiment of the present application, when a character string input by a user is received, each error correction word can be re-determined by obtaining an error correction word matching the character string, and then according to the word order weight of the error correction type corresponding to the error correction word After sorting each error correction word according to the re-determined weight value, each error correction word can be displayed to the user. Generally, the error correction type with higher word order weight is the error correction for the input errors that occur more frequently when the user is input. The weight value of the error correction word can be re-determined according to the error correction type, and the more common input errors can be corrected. Corresponding error correction words are first displayed to users, which improves the error correction efficiency of the input method, and can be applied to fields such as artificial intelligence and natural language processing, which helps improve input efficiency.
附图说明Description of the drawings
图1是本申请一实施例提供的纠错词排序方法所适用于的手机的硬件结构示意图;FIG. 1 is a schematic diagram of the hardware structure of a mobile phone to which the method for sorting error correction words provided by an embodiment of the present application is applicable;
图2是本申请一实施例提供的纠错词排序方法所适用于的手机的软件结构示意图;2 is a schematic diagram of the software structure of a mobile phone to which the method for sorting error correction words provided by an embodiment of the present application is applicable;
图3是本申请一实施例提供的纠错词排序方法的示意性步骤流程图;FIG. 3 is a schematic step flow chart of a method for sorting error correction words according to an embodiment of the present application;
图4是本申请一实施例提供的输入法架构示意图;FIG. 4 is a schematic diagram of an input method architecture provided by an embodiment of the present application;
图5是本申请另一实施例提供的纠错词排序方法的示意性步骤流程图;FIG. 5 is a schematic step flowchart of a method for sorting error correction words provided by another embodiment of the present application;
图6是本申请又一实施例提供的纠错词排序方法的示意性步骤流程图;FIG. 6 is a schematic step flowchart of a method for sorting error correction words according to another embodiment of the present application;
图7是本申请一实施例提供的纠错词排序装置的结构框图;FIG. 7 is a structural block diagram of a device for sorting error correction words according to an embodiment of the present application;
图8是本申请一实施例提供的终端设备的结构示意图。FIG. 8 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域技术人员应当清楚,在没有这些具体细节的其他实施例中也可以实现本申请。在其他情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一 个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also This includes expressions such as "one or more" unless the context clearly indicates to the contrary. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two, or more than two; "and/or" describes the association relationship of associated objects, indicating that there may be three relationships; for example, A and/or B can mean the situation where A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
目前,各个品牌的输入法都提供了相应的纠错功能。以拼音输入法为例,其基本原理是,通过预置一些固定的纠错列表或者策略,当检测到用户输入的拼音字符串与上述纠错列表或策略相匹配时,从系统词库中查找出与输入的拼音字符串对应的纠错字符串,然后向用户显示与纠错字符串相匹配的候选词。Currently, input methods of various brands provide corresponding error correction functions. Take the Pinyin input method as an example. The basic principle is to preset some fixed error correction lists or strategies. When it is detected that the pinyin character string input by the user matches the above error correction lists or strategies, it is searched from the system lexicon. The error correction character string corresponding to the input pinyin character string is output, and then candidate words that match the error correction character string are displayed to the user.
例如,若用户输入拼音字符串“lng”,输入法的自动纠错功能将会按照预置的纠错策略,将其补充为“lang”、“leng”或者“ling”,然后再查找出对应的汉字提供给用户。For example, if the user enters the pinyin string "lng", the automatic error correction function of the input method will add it to "lang", "leng" or "ling" according to the preset error correction strategy, and then find the corresponding Chinese characters are provided to users.
又例如,若用户输入拼音字符串“yiu”,输入法将会查找字母“i”周围相邻的其他字母,组成字符串“you”,然后再将字符串“you”对应的汉字提供给用户。For another example, if the user enters the pinyin string "yiu", the input method will search for other adjacent letters around the letter "i" to form the string "you", and then provide the Chinese characters corresponding to the string "you" to the user .
但是,输入法自动纠错后所提供的纠错词并不一定是用户真正想要的词语。存在纠错词不对,或者纠错词过多的情况,影响用户的正常使用。However, the error correction words provided by the input method after automatic error correction are not necessarily the words that the user really wants. There are situations where the correcting words are incorrect, or there are too many correcting words, which affects the normal use of users.
例如,若输入法检测到用户输入字符串“daohng”,该字符串无法直接匹配出相应的汉字。此时,输入法将会对其进行纠错,得到“daohang”、“daohong”以及“daoheng”,并给出相应的纠错词。其实用户可能只是想要输入“daohang-导航”,按照上述纠错就会导致纠错词过多。当输入法将全部纠错词均提供给用户时,用户想要从中找到自己真正想要输入的那个词语,则会耗费一些时间。For example, if the input method detects the user input string "daohng", the string cannot directly match the corresponding Chinese character. At this time, the input method will correct the errors, get "daohang", "daohong" and "daoheng", and give the corresponding error correction words. In fact, the user may just want to enter "daohang-navigation", according to the above error correction will lead to too many error correction words. When the input method provides all the correcting words to the user, it will take some time for the user to find the word they really want to input.
因此,针对上述问题,本申请实施例提供了一种纠错词的排序方法,通过对纠错得到的各个纠错词进行科学、合理地排序,提高拼音输入法的纠错率,使得最终呈现给用户的纠错词更能匹配用户的实际需求,减少用户从过多的纠错词中选择真正想要输入的那个词语的操作事件。Therefore, in response to the above problems, the embodiments of the present application provide a method for sorting error correction words. By scientifically and reasonably sorting each error correction word obtained by error correction, the error correction rate of the pinyin input method is improved, and the final presentation is The error correction words given to the user can better match the actual needs of the user, and reduce the operation event that the user chooses the word that he really wants to input from the excessive error correction words.
下面结合具体的技术方案对本申请实施例提供的纠错词排序方法进行介绍。The following describes the error correction word ordering method provided in the embodiments of the present application in combination with specific technical solutions.
本申请实施例提供的纠错词排序方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备上,本申请实施例对终端设备的具体类型不作任何限制。The method for sorting error correction words provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobiles. For terminal devices such as ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (personal digital assistants, PDAs), the embodiments of this application do not impose any restrictions on the specific types of terminal devices.
以终端设备为手机为例。图1示出的是与本申请实施例提供的手机的部分结构的框图。参考图1,手机包括:射频(Radio Frequency,RF)电路110、存储器120、输入单元130、显示单元140、传感器150、音频电路160、无线保真(wireless fidelity,Wi-Fi)模块170、处理器180、以及电源190等部件。本领域技术人员可以理解,图1中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Take the terminal device as a mobile phone as an example. Fig. 1 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application. 1, the mobile phone includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a processing Adapter 180, power supply 190 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 1 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of some components, or different component arrangements.
下面结合图1对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to Figure 1:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站 的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 110 can be used for receiving and sending signals during information transmission or communication. In particular, after receiving the downlink information of the base station, it is processed by the processor 180; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 110 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), Email, Short Messaging Service (SMS), etc.
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 120 may be used to store software programs and modules. The processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元130可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 130 may be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 100. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 180, and can receive and execute the commands sent by the processor 180. In addition, the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 131, the input unit 130 may also include other input devices 132. Specifically, the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现手机的输入和输出功能。The display unit 140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 180 responds to the touch event. The type provides corresponding visual output on the display panel 141. Although in FIG. 1, the touch panel 131 and the display panel 141 are used as two independent components to realize the input and input functions of the mobile phone, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated. Realize the input and output functions of the mobile phone.
手机100还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可 根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile phone 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light. The proximity sensor can close the display panel 141 and/or when the mobile phone is moved to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary. It can be used to identify mobile phone posture applications (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, percussion), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can also be configured in mobile phones, I will not here Go into details.
音频电路160、扬声器161,传声器162可提供用户与手机之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一手机,或者将音频数据输出至存储器120以便进一步处理。The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, and the audio circuit 160 After being received, it is converted into audio data, and then processed by the audio data output processor 180, and sent to, for example, another mobile phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.
Wi-Fi属于短距离无线传输技术,手机通过Wi-Fi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了Wi-Fi模块170,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wi-Fi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170. It provides users with wireless broadband Internet access. Although FIG. 1 shows the Wi-Fi module 170, it is understandable that it is not a necessary component of the mobile phone 100, and can be omitted as needed without changing the essence of the invention.
处理器180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。The processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 180.
手机100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 100 also includes a power source 190 (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor 180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
尽管未示出,手机100还可以包括摄像头。可选地,摄像头在手机100的上的位置可以为前置的,也可以为后置的,本申请实施例对此不作限定。Although not shown, the mobile phone 100 may also include a camera. Optionally, the position of the camera on the mobile phone 100 may be front-mounted or rear-mounted, which is not limited in the embodiment of the present application.
可选地,手机100可以包括单摄像头、双摄像头或三摄像头等,本申请实施例对此不作限定。Optionally, the mobile phone 100 may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
例如,手机100可以包括三摄像头,其中,一个为主摄像头、一个为广角摄像头、一个为长焦摄像头。For example, the mobile phone 100 may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
可选地,当手机100包括多个摄像头时,这多个摄像头可以全部前置,或者全部后置,或者一部分前置、另一部分后置,本申请实施例对此不作限定。Optionally, when the mobile phone 100 includes multiple cameras, the multiple cameras may be all front-mounted, or all rear-mounted, or partly front-mounted and some rear-mounted, which is not limited in the embodiment of the present application.
另外,尽管未示出,手机100还可以包括蓝牙模块等,在此不再赘述。In addition, although not shown, the mobile phone 100 may also include a Bluetooth module, etc., which will not be repeated here.
图2是本申请实施例的手机100的软件结构示意图。以手机100操作系统为Android系统为例,在一些实施例中,将Android系统分为四层,分别为应用程序层、应用程序框架层(framework,FWK)、系统层以及硬件抽象层,层与层之间通过软件接口通信。FIG. 2 is a schematic diagram of the software structure of the mobile phone 100 according to an embodiment of the present application. Taking the mobile phone 100 operating system as the Android system as an example, in some embodiments, the Android system is divided into four layers, namely the application layer, the application framework layer (framework, FWK), the system layer, and the hardware abstraction layer. Communication between the layers through software interface.
如图2所示,所述应用程序层可以包括一系列应用程序包,应用程序包可以包括 短信息,日历,相机,视频,导航,图库,通话等应用程序。As shown in Figure 2, the application layer may include a series of application packages, which may include applications such as short message, calendar, camera, video, navigation, gallery, and call.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数,例如用于接收应用程序框架层所发送的事件的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer may include some predefined functions, such as functions for receiving events sent by the application framework layer.
如图2所示,应用程序框架层可以包括窗口管理器、资源管理器以及通知管理器等。As shown in Figure 2, the application framework layer can include a window manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc. The content provider is used to store and retrieve data and make these data accessible to applications. The data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
应用程序框架层还可以包括:The application framework layer can also include:
视图系统,所述视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。A view system, which includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供手机100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the mobile phone 100. For example, the management of the call status (including connecting, hanging up, etc.).
系统层可以包括多个功能模块。例如:传感器服务模块,物理状态识别模块,三维图形处理库(例如:OpenGL ES)等。The system layer can include multiple functional modules. For example: sensor service module, physical state recognition module, 3D graphics processing library (for example: OpenGL ES), etc.
传感器服务模块,用于对硬件层各类传感器上传的传感器数据进行监测,确定手机100的物理状态;The sensor service module is used to monitor the sensor data uploaded by various sensors at the hardware layer and determine the physical state of the mobile phone 100;
物理状态识别模块,用于对用户手势、人脸等进行分析和识别;Physical state recognition module, used to analyze and recognize user gestures, faces, etc.;
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
系统层还可以包括:The system layer can also include:
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
硬件抽象层是硬件和软件之间的层。硬件抽象层可以包括显示驱动,摄像头驱动,传感器驱动等,用于驱动硬件层的相关硬件,如显示屏、摄像头、传感器等。The hardware abstraction layer is the layer between hardware and software. The hardware abstraction layer can include display drivers, camera drivers, sensor drivers, etc., used to drive related hardware at the hardware layer, such as display screens, cameras, sensors, and so on.
以下实施例可以在具有上述硬件结构/软件结构的手机100上实现。以下实施例将以手机100为例,对本申请实施例提供的纠错词排序方法进行说明。The following embodiments can be implemented on the mobile phone 100 having the above hardware structure/software structure. The following embodiment will take the mobile phone 100 as an example to describe the error correction word ordering method provided in the embodiment of the present application.
参照图3,示出了本申请一实施例提供的纠错词排序方法的示意性步骤流程图,作为示例而非限定,该方法可以应用于上述手机100中,该方法具体可以包括如下步骤:Referring to FIG. 3, a schematic step flow chart of a method for sorting error correction words provided by an embodiment of the present application is shown. As an example and not a limitation, the method may be applied to the above-mentioned mobile phone 100, and the method may specifically include the following steps:
S301、当接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;S301: When a character string input by a user is received, obtain a plurality of error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the word order weight corresponding to the error correction type;
在本实施例中,用户输入的字符串可以是拼音字符串。即,用户在使用拼音输入法时输入拼音字符串,然后通过输入法的匹配和查找,输出相应的汉字。In this embodiment, the character string input by the user may be a pinyin character string. That is, the user inputs a pinyin character string when using the pinyin input method, and then outputs corresponding Chinese characters through matching and searching of the input method.
如图4所示,是本实施例的输入法架构示意图。本实施例提供的纠错词排序方法可以在图4所示的输入法架构中实现。图4所示的输入法架构主要包括输入、引擎、词库和展示四个核心单元。输入单元可以向用户提供键盘输入的输入方式,包括拼音全键、拼音九键等等,输入单元的核心处理是防误触,使得用户尽可能地输入正确的字符串。当然,在输入单元还可以为用户提供其他语言的输入方式,以及笔画、手写、语音等各种类型的输入方式。As shown in FIG. 4, it is a schematic diagram of the input method architecture of this embodiment. The method for sorting error correction words provided in this embodiment can be implemented in the input method architecture shown in FIG. 4. The input method architecture shown in Figure 4 mainly includes four core units: input, engine, thesaurus, and display. The input unit can provide the user with keyboard input input methods, including pinyin full key, pinyin nine keys, etc. The core processing of the input unit is to prevent accidental touch, so that the user can input the correct character string as much as possible. Of course, the input unit can also provide users with input methods in other languages, as well as various types of input methods such as strokes, handwriting, and voice.
对于引擎单元,针对拼音输入法,主要提供了N-gram语言模型和维特比(Viterbi)拼音解码,从而可以结合词库实现具体出词、联想以及纠错功能。输入法中的词库包括有基础词库、网络热词以及用户自定义词组等等,各个词库均可以按照一定的频率进行更新。For the engine unit, for the pinyin input method, it mainly provides the N-gram language model and Viterbi pinyin decoding, which can be combined with the vocabulary to achieve specific word generation, association and error correction functions. The vocabulary in the input method includes basic vocabulary, internet hot words, user-defined phrases, etc., and each vocabulary can be updated at a certain frequency.
输入法的展示单元可以通过终端设备的显示界面呈现给用户,除了基础的候选词输出外,还可以包括其他信息或服务类的推荐信息。The display unit of the input method can be presented to the user through the display interface of the terminal device. In addition to the basic candidate word output, it can also include other information or service recommendation information.
本实施例在上述输入法架构的基础上,对候选词的排序过程进行了改进,提出了一种新的纠错词排序方法。下面具体介绍。In this embodiment, based on the aforementioned input method architecture, the candidate word ranking process is improved, and a new error correction word ranking method is proposed. The following is a specific introduction.
通常,用户在输入拼音字符串时,可能出现输入错误的情况。此时,输入法可以对输入错误的字符串进行自动纠正。例如,用户输入字符串“yiu”,输入法自动将其纠正为字符串“you”。Generally, when a user enters a pinyin character string, an input error may occur. At this time, the input method can automatically correct the wrong character string. For example, if the user enters the string "yiu", the input method automatically corrects it to the string "you".
输入法在对错误输入的拼音字符串进行纠正后,可以输出与纠正后的字符串相匹配的纠错词。例如,对于用户输入的字符串“yiu”,输入法可以输出与纠正后的字符串“you”相匹配的“有”、“又”、“由”等纠错词。After the input method corrects the incorrectly input pinyin character string, it can output an error correction word that matches the corrected character string. For example, for the character string "yiu" input by the user, the input method can output error-correcting words such as "有", "又", and "由" that match the corrected character string "you".
上述纠错词均可以看作是按照某种纠错类型对错误的字符串进行纠正后得到的。同样以字符串“yiu”为例,输入法在对其进行纠错后,输出的“有”、“又”、“由”等纠错词可以看作是按照邻键纠错对“yiu”进行纠错所得到的。即,将输入错误的字符串“yiu”中的字母“i”替换为与之相邻的字母“o”。The above-mentioned error correction words can all be regarded as obtained after correcting an erroneous character string according to a certain type of error correction. Also take the string "yiu" as an example. After the input method corrects its errors, the outputted error correction words such as "有", "又", "由" can be regarded as correcting the "yiu" according to the adjacent key. The result of error correction. That is, the letter "i" in the character string "yiu" that has been entered incorrectly is replaced with the letter "o" adjacent to it.
当然,上述提供的邻键纠错仅仅是一种示例,输入法所提供的纠错方式可以包括很多种,本实施例对此不作限定。Of course, the adjacent key error correction provided above is only an example, and the error correction methods provided by the input method may include many kinds, which are not limited in this embodiment.
在本实施例中,针对任一纠错类型,可以为其配置出相应的词序权重,使得在对拼音字符串进行纠错后,可以按照上述词序权重对纠错词进行排序。In this embodiment, for any error correction type, a corresponding word order weight can be configured for it, so that after error correction is performed on the pinyin character string, the error correction words can be sorted according to the above word order weight.
本实施例中各种纠错类型的词序权重可以是根据大量统计数据和纠错案例进行计算得到的。本实施例通过分析大量的输入错误的字符串与用户最终输入的汉字之间的对应关系,计算得出的各种纠错类型的词序权重,可以体现出用户最常见的输入错误类型。因此,用户最常见的输入错误对应的纠错类型的词序权重通常较大。如,模糊 音纠错,末尾少输入字符纠错等等。The word order weights of various error correction types in this embodiment may be calculated based on a large amount of statistical data and error correction cases. In this embodiment, the word order weights of various error correction types are calculated by analyzing the correspondence between a large number of input wrong character strings and the Chinese characters finally input by the user, which can reflect the most common input error types of the user. Therefore, the word order weight of the error correction type corresponding to the most common input error of the user is usually larger. For example, ambiguous tone error correction, less input character error correction at the end, and so on.
需要说明的是,用户输入的拼音字符串也可能并非是错误的字符串。例如,在用户输入字符串“zai”时,可能表示用户确实是希望输入“zai”并获得与该字符串相匹配的汉字。另一方面,输入法也可以按照相应的纠错方式,将其纠错为“zhai”,同时将与字符串“zhai”相匹配的汉字一并提供给用户。此时,与字符串“zai”相匹配的各个汉字即是非纠错词,而与字符串“zhai”相匹配的汉字则为纠错词。It should be noted that the pinyin character string entered by the user may not be an incorrect character string. For example, when the user inputs the character string "zai", it may indicate that the user really wants to input "zai" and obtain Chinese characters that match the character string. On the other hand, the input method can also correct the error to "zhai" according to the corresponding error correction method, and provide the user with the Chinese characters matching the string "zhai" at the same time. At this time, each Chinese character matching the character string "zai" is a non-error correcting word, and the Chinese character matching the character string "zhai" is an error correcting word.
S302、根据所述纠错类型的词序权重,确定各个纠错词的权重值;S302: Determine the weight value of each error correction word according to the word order weight of the error correction type;
在本实施例中,可以预先将各种纠错类型划分为不同的纠错类,针对任一纠错类,分别为其设定一个词序权重。In this embodiment, various error correction types can be divided into different error correction classes in advance, and for any error correction class, a word order weight is set for each error correction class.
作为本实施例的一种示例,可以将多种纠错类型划分为纠错一类、纠错二类、纠错三类和纠错四类共四大类,然后分别为每一类设定一个词序权重。例如,可以设定纠错一类的词序权重与纠错二类的词序权重相等,设定纠错二类的词序权重大于纠错三类的词序权重,设定纠错三类的词序权重大于纠错四类的词序权重,等等。As an example of this embodiment, multiple types of error correction can be divided into four categories: one type of error correction, two types of error correction, three types of error correction, and four types of error correction, and then set each type separately A word order weight. For example, you can set the word order weight of the error correction type 1 to be equal to the word order weight of the error correction type 2, set the word order weight of the error correction type 2 to be greater than the word order weight of the error correction category 3, and set the word order weight of the error correction category 3 to be greater than Correct the four types of word order weights, and so on.
在根据纠错类型的词序权重确定各个纠错词的权重值时,可以直接将该纠错类的词序权重赋予给对应的纠错词。即,直接将纠错类的词序权重作为按照该纠错类进行纠错后获得的纠错词的权重值。也可以将纠错类的词序权重作为一个附加值,将该词序权重附加在纠错词原有的权重值之上。例如,若某一纠错类型的词序权重为60%,则可以将该按照该纠错类型进行纠错得到的某个纠错词原有的权重值乘以60%,作为该纠错词新的权重值,本实施例对此不作限定。When the weight value of each error correction word is determined according to the word order weight of the error correction type, the word order weight of the error correction type can be directly assigned to the corresponding error correction word. That is, the word order weight of the error correction class is directly used as the weight value of the error correction word obtained after the error correction is performed according to the error correction class. It is also possible to use the word order weight of the error correction class as an additional value, and add the word order weight to the original weight value of the error correction word. For example, if the word order weight of a certain error correction type is 60%, the original weight value of a certain error correction word obtained by the error correction according to the error correction type can be multiplied by 60%, as the new error correction word The weight value of is not limited in this embodiment.
S303、根据所述各个纠错词的权重值,对所述多个纠错词进行排序。S303. Sort the multiple error correction words according to the weight value of each error correction word.
在确定出各个纠错词的权重值之后,可以按照权重值的大小对各个纠错词进行排序。一般地,权重值越大,排序越靠前;反之则排序越靠后。After the weight value of each error correction word is determined, the error correction words can be sorted according to the size of the weight value. Generally, the larger the weight value, the higher the ranking; otherwise, the lower the ranking.
在本申请实施例中,在接收到用户输入的字符串时,通过获取与该字符串相匹配的纠错词,然后按照该纠错词对应的纠错类型的词序权重,可以重新确定各个纠错词的权重值,在按照重新确定的权重值对各个纠错词进行排序后,可以将各个纠错词展现给用户。通常,具有较高词序权重的纠错类型是针对用户在输入时较常出现的输入错误所进行的纠错,按照纠错类型重新确定纠错词的权重值,可以将较常出现的输入错误对应的纠错词优先展现给用户,提高了输入法的纠错效率,可以广泛应用于人工智能(Artificial Intelligence,AI)及自然语言处理等领域,有助于提高输入效率。In the embodiment of the present application, when a character string input by a user is received, each error correction word can be re-determined by obtaining an error correction word that matches the character string, and then according to the word order weight of the error correction type corresponding to the error correction word. The weight value of the wrong word can be displayed to the user after sorting the error correction words according to the re-determined weight value. Generally, the error correction type with higher word order weight is the error correction for the input errors that occur more frequently when the user is input. The weight value of the error correction word can be re-determined according to the error correction type, and the more common input errors can be corrected. The corresponding error correction words are first displayed to users, which improves the error correction efficiency of the input method, and can be widely used in artificial intelligence (AI) and natural language processing fields, which helps improve input efficiency.
参照图5,示出了本申请另一实施例提供的纠错词排序方法的示意性步骤流程图,该方法具体可以包括如下步骤:Referring to FIG. 5, there is shown a schematic step flowchart of a method for sorting error correction words according to another embodiment of the present application. The method may specifically include the following steps:
S501、当接收到用户输入的字符串时,按照预设的多种纠错类型分别对所述字符串进行纠错,并确定各种纠错类型对应的词序权重;S501: When a character string input by a user is received, error correction is performed on the character string according to multiple preset error correction types, and the word order weights corresponding to the various error correction types are determined;
需要说明的是,本方法可以应用于终端设备中,如手机、平板电脑等等。即,本实施例的执行主体为终端设备。以终端设备为手机为例,当用户在手机上使用拼音输入法时,若用户输入的拼音字符串为错误的字符串,则可以按照本实施例提供的方法对错误的字符串进行纠错并对纠错后得到的各个纠错词进行重新排序,使得排序靠前的纠错词有更大概率属于用户真正想要输入的词语。It should be noted that this method can be applied to terminal devices, such as mobile phones, tablet computers, and so on. That is, the execution subject of this embodiment is the terminal device. Taking the terminal device as a mobile phone as an example, when the user uses the pinyin input method on the mobile phone, if the pinyin character string input by the user is a wrong character string, the wrong character string can be corrected and corrected according to the method provided in this embodiment. Reorder the error-corrected words obtained after error correction, so that the error-corrected words ranked higher have a greater probability that they belong to the words that the user really wants to input.
在本实施例中,可以首先对输入法提供的多种纠错类型进行分类。例如,将各种 纠错类型划分为纠错一类、纠错二类、纠错三类或纠错四类等等,使得每一纠错类中均至少包括一项具体的纠错类型。In this embodiment, the multiple error correction types provided by the input method can be classified first. For example, the various error correction types are divided into error correction type 1, error correction type two, error correction type three, or error correction type four, etc., so that each error correction type includes at least one specific error correction type.
通常,输入法提供的纠错类型包括有用户配置模糊音纠错、末尾少输入字符纠错、邻键纠错、默认模糊音纠错、多输入字符纠错、中间少输入字符纠错和交换字符纠错等等。其中,用户配置模糊音纠错可以是指用户手动配置的纠错类型。对于用户在输入过程中较常出现的错误,输入法可以向用户提供手动配置纠错的功能。例如,若用户在输入过程中经常混淆字母“f”和“h”,则可以手动选择将上述两个字母配置为纠错对,后续在输入时,可以优先检测是否存在上述两个字母输错的情况。Generally, the types of error correction provided by input methods include user-configured fuzzy sound error correction, end-of-character error correction, adjacent key error correction, default fuzzy sound error correction, multi-input character error correction, and middle character error correction and exchange Character error correction and so on. The user-configured fuzzy tone error correction may refer to the type of error correction manually configured by the user. For the errors that occur frequently in the input process of the user, the input method can provide the user with the function of manually configuring the error correction. For example, if the user often confuses the letters "f" and "h" during the input process, he can manually choose to configure the above two letters as an error correction pair, and subsequently, when inputting, it can firstly detect whether the above two letters are entered incorrectly Case.
末尾少输入字符纠错可以是指拼音未输入完全,通过自动补齐后面的所有可能的合法拼音,便可以得到相应的纠错词。例如,对于输入的字符串“pe”,通过在末尾补齐其他字母,可以得到“pei”、“pen”或“peng”等合法拼音。The error correction of fewer input characters at the end can mean that the pinyin has not been input completely. By automatically filling in all possible legal pinyins at the end, the corresponding error correction word can be obtained. For example, for the input string "pe", by adding other letters at the end, legal pinyin such as "pei", "pen" or "peng" can be obtained.
邻键纠错可以是指在输入时按到相邻键位的字母,在执行邻键纠错时,需要把按偏的字母纠正回来。通常情况下,邻键纠错应当限定为偏的键位不能超过一个。The adjacent key error correction can refer to the letters pressed to the adjacent key position during input. When the adjacent key error correction is performed, the offset letter needs to be corrected back. Under normal circumstances, adjacent key error correction should be limited to not more than one key position.
默认模糊音纠错可以是指在用户未自行配置模糊音纠错的情况下,输入法默认支持的一些模糊音纠错。默认模糊音纠错与手动模糊音之间的区别是,纠错词数量有限,其词序权重相对较小。The default fuzzy sound error correction may refer to some fuzzy sound error correction supported by the input method by default when the user does not configure the fuzzy sound error correction by himself. The difference between default fuzzy sound correction and manual fuzzy sound is that the number of error correction words is limited, and the word order weight is relatively small.
多输入字符纠错可以是指用户在输入的拼音字符串中多了一个额外的字母。多输入的字符可以是重复的某个字母。Error correction for multiple input characters can mean that the user has an extra letter in the input pinyin string. The multiple input character can be a repeated letter.
中间少输入字符纠错可以是指在拼音字符串的中间位置漏输入了某个字母。需要说明的是,中间少输入字符纠错仅仅针对在字符串的中间位置漏输入了字母这一种情况,而非针对字符串的前面或后面漏输字母的情况。The error correction of missing characters in the middle can mean that a letter is missed in the middle of the pinyin string. It should be noted that the error correction for missing characters in the middle is only for the case where a letter is missed in the middle of the character string, not for the case where a letter is missed before or after the character string.
交换字符纠错可以是指在字符串中,相邻的字母顺序发生交换错误,把这两个字母的顺序就只过来即可完成纠错。Swap character error correction can mean that in the string, the adjacent letter sequence has an exchange error, and the error correction can be completed by just turning the order of the two letters.
如表一所示,是本实施例的各种纠错类型的定义、范围及相应的说明。As shown in Table 1, it is the definition, scope and corresponding description of various error correction types in this embodiment.
表一:Table I:
Figure PCTCN2020124484-appb-000001
Figure PCTCN2020124484-appb-000001
Figure PCTCN2020124484-appb-000002
Figure PCTCN2020124484-appb-000002
对于上述各种纠错类型,可以将其划分为多个纠错类,并为每个纠错类设置相应的纠错词个数阈值以及词序权重。For the above-mentioned various error correction types, they can be divided into multiple error correction classes, and a corresponding error correction word number threshold and word order weight can be set for each error correction class.
在本实施例中,纠错词个数阈值可以是在按照某一纠错类型进行纠错时,允许向用户展示的该类纠错词的最大个数。例如,若某一纠错类型对应的纠错词个数阈值为5个,则表示在按照按类型对拼音字段串进行纠错时,提供给用户的纠错字最多不超过5个。In this embodiment, the threshold for the number of error correction words may be the maximum number of error correction words of this type that are allowed to be displayed to the user when performing error correction according to a certain error correction type. For example, if the threshold of the number of error correction words corresponding to a certain error correction type is 5, it means that when the pinyin field string is corrected according to the type, the maximum number of error correction words provided to the user is not more than 5.
作为本实施例的一种示例,在将纠错类型划分为四个纠错类时,可以设定纠错一类的纠错词个数阈值大于第一个数阈值,设定纠错二类的纠错词个数阈值小于等于第二个数阈值,设定纠错三类的纠错词个数阈值小于等于第三个数阈值,设定纠错四类的纠错词个数阈值小于等于第四个数阈值,上述第一个数阈值可以大于第二个数阈值,第二个数阈值可以大于第三个数阈值,第三个数阈值可以大于第四个数阈值。As an example of this embodiment, when the error correction types are divided into four error correction types, the number threshold of the number of error correction words of the first type of error correction can be set to be greater than the first number threshold, and the second type of error correction can be set The threshold for the number of error correction words is less than or equal to the second number threshold, the threshold for the number of error correction words for the three types of error correction is less than or equal to the third number threshold, and the threshold for the number of error correction words for the four types of error correction is less than or equal to the third number threshold. Equal to the fourth number threshold, the first number threshold can be greater than the second number threshold, the second number threshold can be greater than the third number threshold, and the third number threshold can be greater than the fourth number threshold.
例如,第一个数阈值可以设定为无穷大,表示按照属于纠错一类的纠错类型进行 纠错时,可以不受纠错词个数的限制,将全部纠错词均展示给用户。第二个数阈值可以设置为5个,第三个数阈值可以设置为2个,第四个数阈值可以设置为1个,等等。当然,以上仅仅是本实施例的一种示例,本领域技术人员可以根据实际需要具体选择纠错词个数阈值,本实施例对此不作限定。For example, the first number threshold can be set to infinity, which means that when performing error correction according to the error correction type belonging to the error correction category, it is not limited by the number of error correction words, and all error correction words are displayed to the user. The second number threshold can be set to 5, the third number threshold can be set to 2, the fourth number threshold can be set to 1, and so on. Of course, the above is only an example of this embodiment, and those skilled in the art can specifically select the threshold for the number of error correction words according to actual needs, which is not limited in this embodiment.
本实施例中的词序权重可以是指对纠错词的权重值进行打折的折扣数值。例如,若词序权重为1,则表示该种纠错类型获得的纠错词的权重值不打折;若某种纠错类型的词序权重为80%,则表示按该种纠错类型获得的纠错词的权重值需要打八折,从而降低了该纠错词的权重值。The word order weight in this embodiment may refer to a discount value that discounts the weight value of the error correction word. For example, if the word order weight is 1, it means that the weight value of the error correction words obtained by this error correction type is not discounted; if the word order weight of a certain error correction type is 80%, it means that the error correction type obtained according to the error correction type is 80%. The weight value of the wrong word needs to be discounted by 20%, thereby reducing the weight value of the error-correcting word.
如表二所示,是本实施例的一种纠错类型的分类示例。As shown in Table 2, it is an example of classification of error correction types in this embodiment.
表二:Table II:
Figure PCTCN2020124484-appb-000003
Figure PCTCN2020124484-appb-000003
S502、若按照目标纠错类型对所述字符串纠错成功,则生成与所述目标纠错类型相对应的目标字符串,所述目标纠错类型为所述多种纠错类型中的任意一种;S502: If the error correction of the character string according to the target error correction type is successful, a target character string corresponding to the target error correction type is generated, and the target error correction type is any of the multiple error correction types. One kind
在本实施例中,当接收到用户输入的拼音字符串时,可以首先按照上述各种纠错类型对其进行纠错,若纠错成功,则可以得到与该纠错类型相对应的目标字符串。In this embodiment, when the pinyin character string input by the user is received, it can be corrected first according to the above-mentioned various error correction types. If the error correction is successful, the target character corresponding to the error correction type can be obtained. string.
例如,对于用户输入的字符串“png”,通过按照上述各种纠错类型进行纠错,可以得到与漏输这一纠错类型相对应的目标字符串“pang”、“peng”和“ping”,等等。For example, for the character string "png" input by the user, the target character strings "pang", "peng" and "ping" corresponding to this error correction type can be obtained by performing error correction according to the above-mentioned various error correction types. ",and many more.
需要说明的是,针对用户输入的任一字符串,可能存在不止一种的纠错类型。即,输入法可以按照多种不同的纠错类型对该字符串进行纠错,本实施例对此不作限定。It should be noted that there may be more than one type of error correction for any character string input by the user. That is, the input method can perform error correction on the character string according to multiple different error correction types, which is not limited in this embodiment.
S503、获取与所述目标字符串相匹配的多个纠错词;S503. Obtain multiple error correction words that match the target character string.
对于获得的目标字符串,输入法可以按照现有的出词方式,给出与各个目标字符串相匹配的纠错词。For the obtained target character string, the input method can provide error correction words matching each target character string according to the existing word output method.
当存在多种纠错类型时,每一种纠错类型对应的纠错词均可能包括多个。When there are multiple error correction types, there may be multiple error correction words corresponding to each error correction type.
S504、获取所述各个纠错词的初始权重值,根据所述各个纠错词的初始权重值以及所述各个纠错词对应的纠错类型的词序权重,确定所述各个纠错词的权重值;S504. Obtain the initial weight value of each error correction word, and determine the weight of each error correction word according to the initial weight value of each error correction word and the word order weight of the error correction type corresponding to each error correction word value;
各个纠错词的初始权重值即是按照输入法现有的排序策略得到的各个词语的权重值,初始权重值体现的是未经处理前,各个纠错词的排序位置。The initial weight value of each error correction word is the weight value of each word obtained according to the existing sorting strategy of the input method, and the initial weight value reflects the sort position of each error correction word before processing.
在本实施例中,在获取各个纠错词的初始权重值,并得到与该纠错词对应的纠错类型的词序权重时,可以将上述初始权重值与对应的纠错类型的词序权重相乘,得到各个纠错词最终的权重值。In this embodiment, when the initial weight value of each error correction word is obtained, and the word order weight of the error correction type corresponding to the error correction word is obtained, the initial weight value may be compared with the word order weight of the corresponding error correction type. Multiply to get the final weight value of each error correction word.
例如,若某个纠错词属于按照邻键纠错给出的,在计算该纠错词最终的权重值时,可以将初始权重值乘以60%,这样处理后,其最终的权重值将会小于初始权重值。相应地,该纠错词在全部候选词中的排序位置可能会往后移动。For example, if a certain error correction word is given according to the error correction of the adjacent key, when calculating the final weight value of the error correction word, the initial weight value can be multiplied by 60%, so that after processing, its final weight value will be Will be less than the initial weight value. Correspondingly, the ranking position of the error correction word among all candidate words may move backward.
在确定出每一个纠错词的权重值后,可以按照权重值的大小对这些纠错词进行排序。一般地,权重值越大,排序越靠前。After the weight value of each error correction word is determined, the error correction words can be sorted according to the size of the weight value. Generally, the larger the weight value, the higher the ranking.
S505、分别统计所述各种纠错类型对应的纠错词个数;S505: Count the number of error correction words corresponding to the various error correction types respectively;
在本实施例中,由于不同的纠错类型均可能给出多个纠错词,为了减少一些非必要的纠错词出现在候选词列表中,还可以针对各种纠错类型分别统计按照该类型进行纠错所得到的纠错词的个数。In this embodiment, because different error correction types may give multiple error correction words, in order to reduce some unnecessary error correction words from appearing in the candidate word list, statistics can also be made for each error correction type according to the The number of error-corrected words obtained by type of error correction.
例如,统计按照手动模糊音进行纠错得到的纠错词个数,统计按照邻键纠错得到的纠错词个数,等等。For example, counting the number of error-corrected words obtained by error correction according to manual fuzzy sound, counting the number of error-corrected words obtained by error correction according to neighbor keys, and so on.
S506、若所述纠错词个数多于对应纠错类型的纠错词个数阈值,则将多于所述纠错词个数阈值的纠错词删除;S506: If the number of error correction words is more than the threshold value of the number of error correction words corresponding to the error correction type, delete error correction words that are more than the threshold value of the number of error correction words;
在本实施例中,按照纠错类型统计得到各种类型的纠错词个数后,可以按照如表二所示的纠错词个数阈值对多于的纠错词进行处理。In this embodiment, after statistics of various types of error correction words are obtained according to error correction types, the more error correction words can be processed according to the threshold value of the number of error correction words as shown in Table 2.
在具体实现中,由表二可知,手动模糊音纠错获得的纠错词个数不受限,对于按照该类型纠错获得的纠错词,可以全部保留在候选词中;对于少输这一纠错类型,则只允许最多保留5个纠错词,若按照少输进行纠错得到的纠错词为7个,则需要删除多于的2个纠错词;对于其他类型的纠错词的处理,也可以按照上述方式进行,本实施例对此不再赘述。In the specific implementation, it can be seen from Table 2 that the number of error-corrected words obtained by manual fuzzy tone error correction is not limited, and all the error-corrected words obtained according to this type of error correction can be kept in the candidate words; for less input, this For one type of error correction, only 5 error correction words are allowed to be retained. If 7 error correction words are obtained for error correction according to less input, the more than 2 error correction words need to be deleted; for other types of error correction Word processing can also be performed in the above-mentioned manner, which will not be repeated in this embodiment.
S507、根据剩余的各个纠错词的权重值,对所述剩余的各个纠错词进行排序。S507: Sort the remaining error correction words according to the weight values of the remaining error correction words.
以按照上述少输进行纠错得到的纠错词为7个为例,由于其超过了少输之一纠错类型允许的最大纠错词个数,应当将其中2个纠错词删除。Taking the 7 error correction words obtained by performing error correction according to the above-mentioned less input as an example, since it exceeds the maximum number of error correction words allowed by the error correction type of the less input one, two of the error correction words should be deleted.
在具体实现中,可以删除权重值相对较小的2个纠错词,保留其余5个权重值相对较大的纠错词。In a specific implementation, two error-correcting words with a relatively small weight value can be deleted, and the remaining five error-correcting words with a relatively large weight value are retained.
在本申请实施例中,通过将各种纠错类型进行分类,并设置每一纠错类对应的纠错词个数阈值及词序权重,可以在按照各种纠错类型对输入的拼音字符串进行纠错后,根据词序权重重新确定每一个纠错词的权重值,并删除超过个数阈值的纠错词,得到最终呈现给用户的候选纠错词。本实施例通过对纠错类型进行细分,解决了输入法纠错时纠错错误、纠错失败以及过度纠错的问题,能够将最可能匹配用户真正想要输入的词语呈现给用户,降低了输入法自动纠错功能带来的负面影响,提高了拼音输入法的纠错效率。In the embodiment of this application, by classifying various error correction types, and setting the number of error correction word thresholds and word order weights corresponding to each error correction type, the input pinyin character string can be compared according to various error correction types. After error correction, the weight value of each error correction word is re-determined according to the word order weight, and the error correction words exceeding the number threshold are deleted to obtain the candidate error correction words that are finally presented to the user. By subdividing the error correction types, this embodiment solves the problems of error correction, error correction failure, and excessive error correction during the input method error correction, and can present the user with the most likely words that the user really wants to input, and reduce The negative influence brought by the automatic error correction function of the input method is improved, and the error correction efficiency of the Pinyin input method is improved.
参照图6,示出了本申请又一实施例提供的纠错词排序方法的示意性步骤流程图,该方法具体可以包括如下步骤:Referring to FIG. 6, there is shown a schematic step flow chart of a method for sorting error correction words according to another embodiment of the present application. The method may specifically include the following steps:
S601、当接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;S601: When a character string input by a user is received, obtain multiple error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the word order weight corresponding to the error correction type;
S602、根据所述纠错类型的词序权重,确定各个纠错词的权重值;S602: Determine the weight value of each error correction word according to the word order weight of the error correction type;
S603、根据所述各个纠错词的权重值,对所述多个纠错词进行排序;S603: Sort the multiple error correction words according to the weight value of each error correction word.
由于本实施例步骤S601-S603与前述实施例中步骤S301-S303以及S501-S507类似,可以参见前述实施例的描述,本实施例对此不再赘述。Since steps S601-S603 in this embodiment are similar to steps S301-S303 and S501-S507 in the foregoing embodiment, reference may be made to the description of the foregoing embodiment, which will not be repeated in this embodiment.
S604、判断任意两个纠错词对应的纠错类型是否具有互斥关系;S604: Determine whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
在本实施例中,在对各个纠错词进行排序时,还可以判断任意两个纠错词对应的纠错类型是否具有互斥关系,上述互斥关系可以是指具有互斥关系的某两种纠错类型的纠错词不能同时出现,而只能出现其中一种。In this embodiment, when sorting each error correction word, it can also be judged whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship. The above-mentioned mutually exclusive relationship may refer to certain two mutually exclusive relationships. The error correction words of two types of error correction cannot appear at the same time, but only one of them can appear.
在具体实现中,根据大量的统计数据分析,可以设定前述实施例中的纠错三类和纠错四类具有互斥关系。即,按照纠错三类进行纠错得到的纠错词将会排斥按照纠错四类进行纠错得到的纠错词。In a specific implementation, based on a large amount of statistical data analysis, it can be set that the three types of error correction and the four types of error correction in the foregoing embodiment have a mutually exclusive relationship. That is, the error correction words obtained by performing error correction according to the three types of error correction will reject the error correction words obtained by performing the error correction according to the four types of error correction.
S605、若所述任意两个纠错词对应的纠错类型具有互斥关系,则确定待删除的纠错类型;S605: If the error correction types corresponding to any two error correction words have a mutually exclusive relationship, determine the error correction type to be deleted;
在本实施例中,当两个纠错词对应的纠错类型具有互斥关系时,需要删除其中某一类的纠错词。In this embodiment, when the error correction types corresponding to two error correction words have a mutually exclusive relationship, one of the error correction words needs to be deleted.
作为本实施例的一种示例,当存在具有互斥关系的纠错词时,可以删除词序权重相对较小的纠错类型所包含的纠错词。As an example of this embodiment, when there are error-correcting words that have a mutually exclusive relationship, the error-correcting words contained in the error correction types with relatively small word order weights can be deleted.
因此,若任意两个纠错词对应的纠错类型具有互斥关系,则可以首先对具有互斥关系的纠错类型的词序权重进行比较,然后在具有互斥关系的纠错类型中,确定词序权重最小值对应的纠错类型为待删除的纠错类型。Therefore, if the error correction types corresponding to any two error correction words have a mutually exclusive relationship, the word order weights of the error correction types with the mutually exclusive relationship can be compared first, and then the error correction types with the mutually exclusive relationship are determined The error correction type corresponding to the minimum word order weight is the error correction type to be deleted.
S606、删除与所述待删除的纠错类型相匹配的各个纠错词。S606. Delete each error correction word matching the error correction type to be deleted.
在本实施例中,纠错四类的词序权重小于纠错三类的词序权重。因此,在出现按照属于纠错三类和纠错四类的纠错类型进行纠错得到的纠错词时,需要将纠错四类对应的各个纠错词进行删除。In this embodiment, the word order weights of the four types of error correction are smaller than the word order weights of the three types of error correction. Therefore, when there are error correction words that are obtained by performing error correction according to the error correction types belonging to the three types of error correction and the four types of error correction, each error correction word corresponding to the four types of error correction needs to be deleted.
当然,上述互斥关系属于本实施例在对纠错词进行排序时的一种补充限定,如表三所示,还可以设置首选词纠错等其他补充限定。Of course, the foregoing mutually exclusive relationship belongs to a supplementary restriction when sorting error correction words in this embodiment. As shown in Table 3, other supplementary restrictions such as error correction of the preferred word can also be set.
表三:Table Three:
Figure PCTCN2020124484-appb-000004
Figure PCTCN2020124484-appb-000004
Figure PCTCN2020124484-appb-000005
Figure PCTCN2020124484-appb-000005
当然,以上补充限定只是一种示例,本领域技术人员可以根据实际需要,增加其他限定内容,以优化纠错词的排序顺序。Of course, the above supplementary limitation is only an example, and those skilled in the art can add other limitation content according to actual needs to optimize the sorting order of the error correction words.
如表四所示,是按照本实施例提供的纠错词排序方法,对部分输入的拼音字符串进行纠错后,所展示的部分纠错词。As shown in Table 4, according to the error-correcting word sorting method provided in this embodiment, part of the error-corrected words are displayed after error correction is performed on part of the input pinyin character string.
表四:Table Four:
输入拼音Input pinyin 纠错词及排序Error correction words and sorting
eilieili 诶里、日历、日立Eh, calendar, Hitachi
daxuedaxue 大学、大雪、大薛、大写、法学University, Daxue, Daxue, capital, law
napinapi 那批、哪里、那里、那匹That batch, where, there, that horse
zianzian 子安、自安、先Zi'an, Zi'an, Xian
zianzaizianzai 现在、先在Now, first
sznszn 十周年、始祖鸟、三、十字弩Tenth anniversary, archaeopteryx, three, crossbow
aanaan 阿安、按A'an, press
wananwanan 晚安安、万Good night, ten thousand
iyiy 一、以One, to
vlvl 绿、吕Green, Lu
liagliag Two
bingkuibingkui 并亏、冰块Combined loss, ice cube
hngdahngda 恒大Evergrande
qinrenqinren 亲人、情人、秦人Relatives, lovers, Qin people
sanghaisanghai 桑海、上海、伤害Sanghai, Shanghai, hurt
从上述示例中可以看作,按照本实施例提供的纠错词排序方法进行纠错及排序后所获得的候选词,不仅纠错准确,所获得的候选词个数也较为适中,符合用户的实际使用需求。From the above example, it can be seen that the candidate words obtained after error correction and sorting according to the error correction word ordering method provided in this embodiment are not only accurate in error correction, but the number of candidate words obtained is also relatively moderate, which conforms to the user's requirements. Actual use requirements.
通过随机选取数万个错误拼音案例,应用本实施例提供的纠错词排序方法进行纠错及排序,纠错率提升了40%,且误纠错率下降了30%,在拼音字符串的纠错、排序和出词个数上,获得了比较均衡的结果。本实施例提供的纠错词排序方法可以应用于 人工智能领域,特别是在人工智能领域对应的自然语言处理这一子领域中,通过应用本实施例提供的纠错词排序方法可以有效地提高输入效率和纠错效率。By randomly selecting tens of thousands of incorrect pinyin cases and applying the error correction word sorting method provided in this embodiment for error correction and sorting, the error correction rate has increased by 40%, and the error correction rate has dropped by 30%. In terms of error correction, sorting, and the number of words, relatively balanced results were obtained. The method for sorting error correction words provided in this embodiment can be applied to the field of artificial intelligence, especially in the sub-field of natural language processing corresponding to the field of artificial intelligence. By applying the method for sorting error correction words provided by this embodiment, it can effectively improve Input efficiency and error correction efficiency.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的纠错词排序方法,图7示出了本申请一实施例提供的纠错词排序装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the error correction word ordering method described in the above embodiment, FIG. 7 shows a structural block diagram of an error correction word ordering device provided by an embodiment of the present application. part.
参照图7,该装置可以应用于终端设备中,具体可以包括如下模块:Referring to Figure 7, the device can be applied to terminal equipment, and specifically can include the following modules:
纠错词获取模块701,用于在接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;The error correction word acquisition module 701 is configured to, when a character string input by the user is received, obtain multiple error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the error correction The word order weight corresponding to the type;
权重值确定模块702,用于根据所述纠错类型的词序权重,确定各个纠错词的权重值;The weight value determining module 702 is configured to determine the weight value of each error correction word according to the word order weight of the error correction type;
纠错词排序模块703,用于根据所述各个纠错词的权重值,对所述多个纠错词进行排序。The error correction word ranking module 703 is configured to rank the multiple error correction words according to the weight value of each error correction word.
在本申请实施例中,所述纠错词获取模块701具体可以包括如下子模块:In the embodiment of the present application, the error correction word acquisition module 701 may specifically include the following sub-modules:
字符串纠错子模块,用于在接收到用户输入的字符串时,按照预设的多种纠错类型分别对所述字符串进行纠错;The character string error correction sub-module is used to perform error correction on the character string according to multiple preset error correction types when the character string input by the user is received;
目标字符串生成子模块,用于若按照目标纠错类型对所述字符串纠错成功,则生成与所述目标纠错类型相对应的目标字符串,所述目标纠错类型为所述多种纠错类型中的任意一种;The target character string generation sub-module is configured to generate a target character string corresponding to the target error correction type if the error correction of the character string according to the target error correction type is successful, and the target error correction type is the multiple Any one of the types of error correction;
纠错词获取子模块,用于获取与所述目标字符串相匹配的多个纠错词。The error correction word acquisition sub-module is used to acquire multiple error correction words that match the target character string.
在本申请实施例中,所述权重值确定模块702具体可以包括如下子模块:In the embodiment of the present application, the weight value determining module 702 may specifically include the following sub-modules:
初始权重值获取子模块,用于获取所述各个纠错词的初始权重值;The initial weight value acquisition sub-module is used to acquire the initial weight value of each error correction word;
权重值确定子模块,用于根据所述各个纠错词的初始权重值以及所述各个纠错词对应的纠错类型的词序权重,确定所述各个纠错词的权重值。The weight value determining sub-module is configured to determine the weight value of each error correction word according to the initial weight value of each error correction word and the word order weight of the error correction type corresponding to each error correction word.
在本申请实施例中,所述各种纠错类型还分别具有相应的纠错词个数阈值,所述纠错词排序模块703具体可以包括如下子模块:In the embodiment of the present application, the various error correction types also have corresponding thresholds for the number of error correction words, and the error correction word ranking module 703 may specifically include the following sub-modules:
纠错词个数统计子模块,用于分别统计所述各种纠错类型对应的纠错词个数;An error correction word count statistics sub-module, which is used to separately count the number of error correction words corresponding to the various error correction types;
纠错词删除子模块,用于若所述纠错词个数多于对应纠错类型的纠错词个数阈值,则将多于所述纠错词个数阈值的纠错词删除;The error correction word deletion submodule is configured to delete error correction words that are more than the error correction word number threshold if the number of error correction words is more than the threshold value of the number of error correction words corresponding to the error correction type;
纠错词排序子模块,用于根据剩余的各个纠错词的权重值,对所述剩余的各个纠错词进行排序。The error-correcting word ordering sub-module is used to order the remaining error-correcting words according to the weight value of each of the remaining error-correcting words.
在本申请实施例中,该装置还可以包括如下模块:In the embodiment of the present application, the device may further include the following modules:
互斥关系判断模块,用于判断任意两个纠错词对应的纠错类型是否具有互斥关系;Mutually exclusive relationship judgment module, used to judge whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
待删除类型确定模块,用于若所述任意两个纠错词对应的纠错类型具有互斥关系,则确定待删除的纠错类型;A type determination module to be deleted, configured to determine the error correction type to be deleted if the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
纠错词删除模块,用于删除与所述待删除的纠错类型相匹配的各个纠错词。The error correction word deletion module is used to delete each error correction word matching the error correction type to be deleted.
在本申请实施例中,所述待删除类型确定模块具体可以包括如下子模块:In the embodiment of the present application, the module for determining the type to be deleted may specifically include the following submodules:
次序权重比较子模块,用于若所述任意两个纠错词对应的纠错类型具有互斥关系,则对具有互斥关系的纠错类型的词序权重进行比较;The order weight comparison sub-module is used to compare the word order weights of the error correction types with the mutually exclusive relationship if the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
待删除类型确定子模块,用于在具有互斥关系的纠错类型中,确定所述词序权重最小值对应的纠错类型为待删除的纠错类型。The to-be-deleted type determining sub-module is configured to determine that the error correction type corresponding to the minimum word order weight is the error correction type to be deleted among the error correction types having a mutually exclusive relationship.
在本申请实施例中,所述纠错类型可以包括纠错一类、纠错二类、纠错三类和纠错四类中的至少一种,所述纠错一类的词序权重与所述纠错二类的词序权重相等,所述纠错二类的词序权重大于所述纠错三类的词序权重,所述纠错三类的词序权重大于所述纠错四类的词序权重。In the embodiment of the present application, the error correction type may include at least one of the first type of error correction, the second type of error correction, the third type of error correction, and the four types of error correction. The word order weights of the two types of error correction are equal, the word order weights of the two types of error correction are greater than the word order weights of the three types of error correction, and the word order weights of the three types of error correction are greater than the word order weights of the four types of error correction.
在本申请实施例中,所述纠错一类的纠错词个数阈值大于第一个数阈值,所述纠错二类的纠错词个数阈值小于等于第二个数阈值,所述纠错三类的纠错词个数阈值小于等于第三个数阈值,所述纠错四类的纠错词个数阈值小于等于第四个数阈值,所述第一个数阈值大于所述第二个数阈值,所述第二个数阈值大于所述第三个数阈值,所述第三个数阈值大于所述第四个数阈值。In the embodiment of the present application, the threshold of the number of error correction words of the first type of error correction is greater than the first number threshold, and the threshold of the number of error correction words of the second type of error correction is less than or equal to the second number threshold, The error correction word count threshold of the three types of error correction is less than or equal to the third number threshold, the error correction word number threshold of the four types of error correction is less than or equal to the fourth number threshold, and the first number threshold is greater than the A second number threshold, the second number threshold is greater than the third number threshold, and the third number threshold is greater than the fourth number threshold.
在本申请实施例中,所述纠错三类与所述纠错四类具有互斥关系。In the embodiment of the present application, the three types of error correction and the four types of error correction have a mutually exclusive relationship.
在本申请实施例中,所述纠错一类可以包括用户配置模糊音纠错,所述纠错二类可以包括末尾少输入字符纠错,所述纠错三类可以包括邻键纠错和默认模糊音纠错中的至少一种,所述纠错四类可以包括多输入字符纠错、中间少输入字符纠错和交换字符纠错中的至少一种。In the embodiment of the present application, the first type of error correction may include user-configured fuzzy tone error correction, the second type of error correction may include end-of-input character error correction, and the third type of error correction may include adjacent key error correction and At least one of the default fuzzy sound error correction, the four types of error correction may include at least one of error correction for multiple input characters, error correction for fewer input characters in the middle, and error correction for exchange characters.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述得比较简单,相关之处参见方法实施例部分的说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the description of the method embodiment.
参照图8,示出了本申请一实施例的一种终端设备的示意图。如图8所示,本实施例的终端设备800包括:处理器810、存储器820以及存储在所述存储器820中并可在所述处理器810上运行的计算机程序821。所述处理器810执行所述计算机程序821时实现上述纠错词排序方法各个实施例中的步骤,例如图3所示的步骤S301至S303。或者,所述处理器810执行所述计算机程序821时实现上述各装置实施例中各模块/单元的功能,例如图7所示模块701至703的功能。Referring to FIG. 8, a schematic diagram of a terminal device according to an embodiment of the present application is shown. As shown in FIG. 8, the terminal device 800 of this embodiment includes a processor 810, a memory 820, and a computer program 821 that is stored in the memory 820 and can run on the processor 810. When the processor 810 executes the computer program 821, the steps in each embodiment of the above-mentioned error correction word ordering method are implemented, for example, steps S301 to S303 shown in FIG. 3. Alternatively, when the processor 810 executes the computer program 821, the functions of the modules/units in the foregoing device embodiments, for example, the functions of the modules 701 to 703 shown in FIG. 7 are realized.
示例性的,所述计算机程序821可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器820中,并由所述处理器810执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段可以用于描述所述计算机程序821在所述终端设备800中的执行过程。例如,所述计算机程序821可以被分割成纠错词获取模块、权重值确定模块、纠错词排序模块,各模块具体功能如下:Exemplarily, the computer program 821 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 820 and executed by the processor 810 to complete This application. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments may be used to describe the execution process of the computer program 821 in the terminal device 800. For example, the computer program 821 can be divided into an error correction word acquisition module, a weight value determination module, and an error correction word ranking module. The specific functions of each module are as follows:
纠错词获取模块,用于在接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;The error correction word acquisition module is used to obtain multiple error correction words matching the character string when receiving the character string input by the user, and determine the error correction type to which each error correction word belongs and the error correction type Corresponding word order weight;
权重值确定模块,用于根据所述纠错类型的词序权重,确定各个纠错词的权重值;A weight value determining module, configured to determine the weight value of each error correction word according to the word order weight of the error correction type;
纠错词排序模块,用于根据所述各个纠错词的权重值,对所述多个纠错词进行排序。The error correction word ordering module is used for ordering the multiple error correction words according to the weight value of each error correction word.
所述终端设备800可以是桌上型计算机、笔记本、掌上电脑等计算设备。所述终端设备800可包括,但不仅限于,处理器810、存储器820。本领域技术人员可以理解, 图8仅仅是终端设备800的一种示例,并不构成对终端设备800的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备800还可以包括输入输出设备、网络接入设备、总线等。The terminal device 800 may be a computing device such as a desktop computer, a notebook, or a palmtop computer. The terminal device 800 may include, but is not limited to, a processor 810 and a memory 820. Those skilled in the art can understand that FIG. 8 is only an example of the terminal device 800, and does not constitute a limitation on the terminal device 800. It may include more or less components than shown in the figure, or combine certain components, or different components. For example, the terminal device 800 may also include input and output devices, network access devices, buses, and so on.
所述处理器810可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 810 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器820可以是所述终端设备800的内部存储单元,例如终端设备800的硬盘或内存。所述存储器820也可以是所述终端设备800的外部存储设备,例如所述终端设备800上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等等。进一步地,所述存储器820还可以既包括所述终端设备800的内部存储单元也包括外部存储设备。所述存储器820用于存储所述计算机程序821以及所述终端设备800所需的其他程序和数据。所述存储器820还可以用于暂时地存储已经输出或者将要输出的数据。The memory 820 may be an internal storage unit of the terminal device 800, such as a hard disk or memory of the terminal device 800. The memory 820 may also be an external storage device of the terminal device 800, such as a plug-in hard disk equipped on the terminal device 800, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 820 may also include both an internal storage unit of the terminal device 800 and an external storage device. The memory 820 is used to store the computer program 821 and other programs and data required by the terminal device 800. The memory 820 can also be used to temporarily store data that has been output or will be output.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的纠错词排序方法、装置、终端设备和存储介质,可以通过其他的方式实现。例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其他的形式。In the embodiments provided in this application, it should be understood that the disclosed error correction word ordering method, device, terminal device, and storage medium may be implemented in other ways. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored. Or not. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计 算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到纠错词排序装置、终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the implementation of all or part of the processes in the above-mentioned embodiment methods in the present application can be accomplished by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may at least include: any entity or device capable of carrying computer program code to the error correction word sorting device, terminal equipment, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random Access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, and software distribution medium. For example, U disk, mobile hard disk, floppy disk or CD-ROM, etc. In some jurisdictions, according to legislation and patent practices, computer-readable media cannot be electrical carrier signals and telecommunication signals.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above are only specific implementations of this application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application shall be covered by this application. Within the scope of protection applied for. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (13)

  1. 一种纠错词排序方法,其特征在于,包括:A method for sorting error correction words, which is characterized in that it includes:
    当接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;When receiving the character string input by the user, obtain a plurality of error correction words matching the character string, and determine the error correction type to which each error correction word belongs and the word order weight corresponding to the error correction type;
    根据所述纠错类型的词序权重,确定各个纠错词的权重值;Determine the weight value of each error correction word according to the word order weight of the error correction type;
    根据所述各个纠错词的权重值,对所述多个纠错词进行排序。Sort the plurality of error correction words according to the weight value of each error correction word.
  2. 根据权利要求1所述的方法,其特征在于,所述当接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,包括:The method according to claim 1, wherein when a character string input by a user is received, obtaining a plurality of error correction words matching the character string comprises:
    当接收到用户输入的字符串时,按照预设的多种纠错类型分别对所述字符串进行纠错;When a character string input by the user is received, error correction is performed on the character string according to a plurality of preset error correction types;
    若按照目标纠错类型对所述字符串纠错成功,则生成与所述目标纠错类型相对应的目标字符串,所述目标纠错类型为所述多种纠错类型中的任意一种;If the error correction of the character string is successful according to the target error correction type, a target character string corresponding to the target error correction type is generated, and the target error correction type is any one of the multiple error correction types ;
    获取与所述目标字符串相匹配的多个纠错词。Acquire multiple error correction words matching the target character string.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述纠错类型的词序权重,确定各个纠错词的权重值,包括:The method according to claim 1, wherein the determining the weight value of each error correction word according to the word order weight of the error correction type comprises:
    获取所述各个纠错词的初始权重值;Acquiring the initial weight value of each error correction word;
    根据所述各个纠错词的初始权重值以及所述各个纠错词对应的纠错类型的词序权重,确定所述各个纠错词的权重值。The weight value of each error correction word is determined according to the initial weight value of each error correction word and the word order weight of the error correction type corresponding to each error correction word.
  4. 根据权利要求3所述的方法,其特征在于,所述各种纠错类型还分别具有相应的纠错词个数阈值,所述根据所述各个纠错词的权重值,对所述多个纠错词进行排序,包括:The method according to claim 3, wherein the various error correction types also have corresponding thresholds for the number of error correction words, and the plurality of error correction words are evaluated according to the weight value of each error correction word. Correction words are sorted, including:
    分别统计所述各种纠错类型对应的纠错词个数;Respectively count the number of error correction words corresponding to the various error correction types;
    若所述纠错词个数多于对应纠错类型的纠错词个数阈值,则将多于所述纠错词个数阈值的纠错词删除;If the number of error correction words is more than the threshold value of the number of error correction words corresponding to the error correction type, delete the error correction words that are more than the threshold value of the number of error correction words;
    根据剩余的各个纠错词的权重值,对所述剩余的各个纠错词进行排序。Sort the remaining error correction words according to the weight values of the remaining error correction words.
  5. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    判断任意两个纠错词对应的纠错类型是否具有互斥关系;Determine whether the error correction types corresponding to any two error correction words have a mutually exclusive relationship;
    若所述任意两个纠错词对应的纠错类型具有互斥关系,则确定待删除的纠错类型;If the error correction types corresponding to any two error correction words have a mutually exclusive relationship, determine the error correction type to be deleted;
    删除与所述待删除的纠错类型相匹配的各个纠错词。Delete each error correction word that matches the error correction type to be deleted.
  6. 根据权利要求5所述的方法,其特征在于,所述若所述任意两个纠错词对应的纠错类型具有互斥关系,则确定待删除的纠错类型,包括:The method according to claim 5, wherein if the error correction types corresponding to any two error correction words have a mutually exclusive relationship, determining the error correction type to be deleted comprises:
    若所述任意两个纠错词对应的纠错类型具有互斥关系,则对具有互斥关系的纠错类型的词序权重进行比较;If the error correction types corresponding to any two error correction words have a mutually exclusive relationship, then compare the word order weights of the error correction types that have a mutually exclusive relationship;
    在具有互斥关系的纠错类型中,确定所述词序权重最小值对应的纠错类型为待删除的纠错类型。Among the error correction types having a mutually exclusive relationship, it is determined that the error correction type corresponding to the minimum word order weight is the error correction type to be deleted.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述纠错类型包括纠错一类、纠错二类、纠错三类和纠错四类中的至少一种,所述纠错一类的词序权重与所述纠错二类的词序权重相等,所述纠错二类的词序权重大于所述纠错三类的词序权重, 所述纠错三类的词序权重大于所述纠错四类的词序权重。The method according to any one of claims 1-6, wherein the error correction type includes at least one of the first type of error correction, the second type of error correction, the third type of error correction, and the four types of error correction. The word order weight of the first type of error correction is equal to the word order weight of the second type of error correction, the word order weight of the second type of error correction is greater than the word order weight of the third type of error correction, and the word order weight of the third type of error correction is greater than The four types of word order weights for error correction.
  8. 根据权利要求7所述的方法,其特征在于,所述纠错一类的纠错词个数阈值大于第一个数阈值,所述纠错二类的纠错词个数阈值小于等于第二个数阈值,所述纠错三类的纠错词个数阈值小于等于第三个数阈值,所述纠错四类的纠错词个数阈值小于等于第四个数阈值,所述第一个数阈值大于所述第二个数阈值,所述第二个数阈值大于所述第三个数阈值,所述第三个数阈值大于所述第四个数阈值。The method according to claim 7, wherein the threshold of the number of error correction words of the first type of error correction is greater than the first number threshold, and the threshold of the number of error correction words of the second type of error correction is less than or equal to the second The number threshold of the three types of error correction words is less than or equal to the third number threshold, the number of error correction words of the four types of error correction thresholds is less than or equal to the fourth number threshold, and the first The number threshold is greater than the second number threshold, the second number threshold is greater than the third number threshold, and the third number threshold is greater than the fourth number threshold.
  9. 根据权利要求7所述的方法,其特征在于,所述纠错三类与所述纠错四类具有互斥关系。The method according to claim 7, wherein the three types of error correction and the four types of error correction have a mutually exclusive relationship.
  10. 根据权利要求7所述的方法,其特征在于,所述纠错一类包括用户配置模糊音纠错,所述纠错二类包括末尾少输入字符纠错,所述纠错三类包括邻键纠错和默认模糊音纠错中的至少一种,所述纠错四类包括多输入字符纠错、中间少输入字符纠错和交换字符纠错中的至少一种。The method according to claim 7, wherein the first type of error correction includes user-configured fuzzy tone error correction, the second type of error correction includes end-of-input character error correction, and the third type of error correction includes adjacent key At least one of error correction and default ambiguous tone error correction, and the four types of error correction include at least one of error correction for multiple input characters, error correction for middle characters and exchange characters.
  11. 一种纠错词排序装置,其特征在于,包括:A sorting device for error correction words, which is characterized in that it comprises:
    纠错词获取模块,用于在接收到用户输入的字符串时,获取与所述字符串相匹配的多个纠错词,并确定每一个纠错词所属的纠错类型以及该纠错类型对应的词序权重;The error correction word acquisition module is used to obtain multiple error correction words matching the character string when receiving the character string input by the user, and determine the error correction type to which each error correction word belongs and the error correction type Corresponding word order weight;
    权重值确定模块,用于根据所述纠错类型的词序权重,确定各个纠错词的权重值;A weight value determining module, configured to determine the weight value of each error correction word according to the word order weight of the error correction type;
    纠错词排序模块,用于根据所述各个纠错词的权重值,对所述多个纠错词进行排序。The error correction word ordering module is used for ordering the multiple error correction words according to the weight value of each error correction word.
  12. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至10任一项所述的纠错词排序方法。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 10. The method for sorting error correction words according to any one of them.
  13. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至10任一项所述的纠错词排序方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the error correction word sorting according to any one of claims 1 to 10 method.
PCT/CN2020/124484 2019-12-13 2020-10-28 Error correction word sorting method and apparatus, terminal device and storage medium WO2021114928A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911279538.XA CN112989148A (en) 2019-12-13 2019-12-13 Error correction word ordering method and device, terminal equipment and storage medium
CN201911279538.X 2019-12-13

Publications (1)

Publication Number Publication Date
WO2021114928A1 true WO2021114928A1 (en) 2021-06-17

Family

ID=76329550

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124484 WO2021114928A1 (en) 2019-12-13 2020-10-28 Error correction word sorting method and apparatus, terminal device and storage medium

Country Status (2)

Country Link
CN (1) CN112989148A (en)
WO (1) WO2021114928A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436614A (en) * 2021-07-02 2021-09-24 科大讯飞股份有限公司 Speech recognition method, apparatus, device, system and storage medium
CN113468871A (en) * 2021-08-16 2021-10-01 北京北大方正电子有限公司 Text error correction method, device and storage medium
CN113655895A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Information recommendation method and device applied to input method and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088692B (en) * 2021-11-03 2024-04-19 百度国际科技(深圳)有限公司 Method and apparatus for presenting candidate character strings and training discriminant models
CN115268664A (en) * 2022-08-01 2022-11-01 腾讯科技(深圳)有限公司 Control method, device and equipment for displaying error correction words and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677299A (en) * 2012-09-12 2014-03-26 深圳市世纪光速信息技术有限公司 Method and device for achievement of intelligent association in input method and terminal device
CN106774970A (en) * 2015-11-24 2017-05-31 北京搜狗科技发展有限公司 The method and apparatus being ranked up to the candidate item of input method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708893B (en) * 2015-11-17 2018-09-28 华为技术有限公司 Search query word error correction method and device
CN107870677B (en) * 2016-09-23 2022-02-25 北京搜狗科技发展有限公司 Input method, input device and input device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677299A (en) * 2012-09-12 2014-03-26 深圳市世纪光速信息技术有限公司 Method and device for achievement of intelligent association in input method and terminal device
CN106774970A (en) * 2015-11-24 2017-05-31 北京搜狗科技发展有限公司 The method and apparatus being ranked up to the candidate item of input method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG YONGJING: "The Research on the Automatic Proofreading Algorithm of Recognition Flow", CHINESE MASTER'S THESES FULL-TEXT DATABASE, INFORMATION SCIENCE, 1 January 2008 (2008-01-01), XP055819822 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436614A (en) * 2021-07-02 2021-09-24 科大讯飞股份有限公司 Speech recognition method, apparatus, device, system and storage medium
CN113436614B (en) * 2021-07-02 2024-02-13 中国科学技术大学 Speech recognition method, device, equipment, system and storage medium
CN113468871A (en) * 2021-08-16 2021-10-01 北京北大方正电子有限公司 Text error correction method, device and storage medium
CN113655895A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Information recommendation method and device applied to input method and electronic equipment
CN113655895B (en) * 2021-08-17 2024-06-11 北京百度网讯科技有限公司 Information recommendation method and device applied to input method and electronic equipment

Also Published As

Publication number Publication date
CN112989148A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2021114928A1 (en) Error correction word sorting method and apparatus, terminal device and storage medium
WO2021104365A1 (en) Object sharing method and electronic device
WO2021114918A1 (en) Integrity checking method and apparatus, terminal device and verification server
CN108541310B (en) Method and device for displaying candidate words and graphical user interface
US20220043544A1 (en) Display control method and terminal device
WO2021093717A1 (en) Display control method, electronic device, and computer-readable storage medium
US20170091335A1 (en) Search method, server and client
US20220353225A1 (en) Method for searching for chat information and electronic device
KR101750968B1 (en) Consistent text suggestion output
WO2020258929A1 (en) Folder interface switching method and terminal device
CN108701137A (en) Icon suggestion in keyboard
US20180188906A1 (en) Dynamically generating a subset of actions
WO2020215949A1 (en) Object processing method and terminal device
CN107832330B (en) Searching method and terminal equipment
CN111061383B (en) Text detection method and electronic equipment
WO2021129536A1 (en) Icon moving method and electronic device
US20170336969A1 (en) Predicting next letters and displaying them within keys of a graphical keyboard
WO2020181945A1 (en) Identifier displaying method and terminal device
WO2021017738A1 (en) Interface display method and electronic device
WO2021147421A1 (en) Automatic question answering method and apparatus for man-machine interaction, and intelligent device
WO2021057301A1 (en) File control method and electronic device
WO2020168882A1 (en) Interface display method and terminal device
CN110688497A (en) Resource information searching method and device, terminal equipment and storage medium
WO2021120876A1 (en) Corpus identification method, device, terminal apparatus, and medium
WO2021197264A1 (en) Interface display method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20900023

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20900023

Country of ref document: EP

Kind code of ref document: A1