WO2014101577A1 - 一种用于提供输入字符串所对应的输入候选项的方法与设备 - Google Patents

一种用于提供输入字符串所对应的输入候选项的方法与设备 Download PDF

Info

Publication number
WO2014101577A1
WO2014101577A1 PCT/CN2013/086968 CN2013086968W WO2014101577A1 WO 2014101577 A1 WO2014101577 A1 WO 2014101577A1 CN 2013086968 W CN2013086968 W CN 2013086968W WO 2014101577 A1 WO2014101577 A1 WO 2014101577A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
string
candidates
context information
character string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2013/086968
Other languages
English (en)
French (fr)
Inventor
陆阳阳
孟可丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to EP13867100.3A priority Critical patent/EP2940557B1/en
Priority to US14/412,287 priority patent/US20150293972A1/en
Priority to JP2015549962A priority patent/JP6114403B2/ja
Publication of WO2014101577A1 publication Critical patent/WO2014101577A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/018Input/output arrangements for oriental characters

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a technique for providing input candidates corresponding to an input string. Background technique
  • a method for providing an input candidate corresponding to an input string includes the following steps:
  • a method for providing an input string Input device that should be entered as a candidate where the device includes:
  • a context determining device configured to determine context information of the input string
  • candidate determining means configured to determine one or more inputs corresponding to the input string according to the input string and the context information
  • the present invention determines one or more input candidates corresponding to the input string according to context information of the input string; and provides at least one of the one or more input candidates The target application corresponding to the input string is added; thereby increasing the input flexibility, matching the input requirements of the user, improving the input efficiency of the input method, and improving the user experience.
  • the present invention may further process the one or more preliminary input candidates corresponding to the input character string to obtain the one or more input candidates; further, according to the preliminary input candidate The matching relevance information corresponding to the context information, processing the one or more preliminary input candidates to obtain the one or more input candidates; further, according to the text information Analytical processing, obtaining a word segmentation relationship whose matching frequency satisfies a certain threshold, thereby establishing or updating the word matching database; thereby improving the matching accuracy of the input string and the input candidate, matching with the user's input requirement, and improving The input efficiency of the input method improves the user's body.
  • the present invention can also determine a supplementary character string including the input character string, and obtain one or more supplementary input candidates corresponding to the supplementary character string according to the supplementary character string, by adding the supplementary input
  • the candidate performs screening processing to obtain the one or more input candidates; thereby improving input flexibility, improving the matching accuracy of the input string and the input candidate, matching the input requirement of the user, and improving the input.
  • the input efficiency of the method improves the user's body.
  • the present invention may further perform natural language processing on the related text corresponding to the input character string, and extract corresponding focus words from the related text as the context; thereby improving matching of the input string with the input candidate.
  • Accuracy, with user input requirements Matching improves the input efficiency of the input method and improves the user's body.
  • the present invention can also detect whether the input string exceeds a predetermined length threshold, and if the input string exceeds the length threshold, iteratively determines and inputs according to the input string and the context information.
  • One or more input candidates corresponding to the string further, by detecting the input string, the number of words in at least one of the corresponding one or more sample input candidates in the input vocabulary is exceeding a predetermined word threshold, Determining whether the input string exceeds a predetermined length threshold; further, when the input string exceeds the length threshold, determining a partial input candidate and remaining input candidates, and determining the one or Determining the one or more input candidates by a plurality of partial input candidates, and the one or more remaining input candidates; thereby increasing input flexibility and improving matching accuracy of input strings and input candidates , matching the user's input requirements, improving the input efficiency of the input method, improving user experience.
  • FIG. 1 shows a schematic diagram of an input device for providing input candidates corresponding to an input string, in accordance with an aspect of the present invention
  • FIG. 2 shows a schematic diagram of an input device for providing input candidates corresponding to an input string according to a preferred embodiment of the present invention
  • FIG. 3 is a schematic diagram of an input device for providing input candidates corresponding to an input string according to another preferred embodiment of the present invention.
  • FIG. 4 shows a flow chart of a method for providing input candidates corresponding to an input string in accordance with another aspect of the present invention
  • Figure 5 is a flow chart showing a method for providing input candidates corresponding to an input string in accordance with a preferred embodiment of the present invention
  • Figure 6 is a flow chart showing a method for providing input candidates corresponding to an input string in accordance with another preferred embodiment of the present invention.
  • FIG. 1 shows a schematic diagram of an input device for providing input candidates corresponding to an input string according to an aspect of the present invention
  • the input device includes, but is not limited to, a network device, a user device, or a device in which the network device is integrated with the user device through a network.
  • the network device includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a plurality of servers; where the cloud is composed of a large number of computers or networks based on Cloud Computing Server composition, in which cloud computing is a type of distributed computing, a virtual supercomputer consisting of a group of loosely coupled computers.
  • the user equipment includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a remote controller, a touch pad, or a voice control device, such as a computer, a smart phone, a PDA, a game machine, or an IPTV.
  • the network includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless ad hoc network (Ad Hoc network), and the like.
  • Ad Hoc network wireless ad hoc network
  • continuous means that the above devices respectively obtain the input character string in real time or according to the set or real-time adjusted working mode requirements. , determination of context information, determination of input candidates, provision of input candidates, etc., until the input device stops acquiring the input string.
  • the obtaining means 11 acquires an input character string. Specifically, the obtaining device 11 passes The input box receives a character string input by a user, other application, or the like through input, selection, click, etc.; or according to various communication protocols (Communications Protocol), obtains input boxes from other applications through various data transmission interfaces. a string; wherein the input box is a short message edit box, a content input box, or the like.
  • the input character string includes but is not limited to a pinyin coded character or the like input by a method such as full spelling or simple spelling.
  • the context determining means 12 determines the context information of the input string. Specifically, the context determining apparatus 12 converts the text to which the current input string belongs and one or more thesaurus by using the input character string acquired by the obtaining device 11 and the character or the like to which the currently input character string belongs. Performing a match to obtain one or more matching information associated with the input string and as context information of the input string; for example, when inputting "huacao", first determining the entry of the input string
  • the text may be "flowers", and according to the matching information of "flowers" in the vocabulary, it is determined that the following information may be "tea” or the like; or, the context determining means 12 is based on the corresponding input string
  • the history information determines the context information of the input string.
  • the previous input string just before the input string is used as the pre-text information of the input string.
  • the context information includes, but is not limited to, the above information or the following information corresponding to the input string; for example, when the input is "shishi”, the phrase of the current input on the screen is “objective” "At the time, the above information corresponding to "shishi” is “objective”; if there is a phrase "plan” on the screen, and "shishi” is entered, the cursor is located before “plan”, then the corresponding information below For "plan” and so on.
  • the candidate determining means 13 determines one or more input candidates corresponding to the input character string based on the input character string and the context information. Specifically, the candidate determining means 13 directly uses one or more context information corresponding to the input character string by the input character string acquired by the obtaining means 11 and the context information determined by the context determining means 12 One or more input candidates, or the context information corresponding to the input string is processed as an input candidate, and one or more input candidates corresponding to the input string are determined. For example, in the above example, when the input string is "shishi”, the corresponding information corresponding thereto may be Can be “objective”, “I”, “talk”, etc., when the above information is "objective”, determine the input candidate by using the input string and the context information to match, etc.
  • the providing means 14 provides at least one of the one or more input candidates to the target application corresponding to the input string.
  • the providing device 14 may provide the one or more input candidates by directly providing, or according to various communication protocols (Communications Protocol), through various data transmission interfaces, by, for example, reordering or filtering. At least one is provided to the target application corresponding to the input string.
  • the target application includes, but is not limited to, the same application corresponding to the input box corresponding to the acquiring device 11, or other applications associated with the input box corresponding to the obtaining device 11, such as direct utilization. Enter a candidate to search, etc.
  • the candidate determining device 13 may further determine a supplementary character string including the input character string according to the input character string and the context information, wherein the supplementary character string further includes the a string corresponding to the context information; performing a matching query in the input lexicon according to the supplementary string to obtain one or more supplementary input candidates corresponding to the supplementary string; Context information, filtering the one or more supplemental input candidates to obtain the one or more input candidates.
  • the candidate setting device 13 may further determine, according to the input character string and the context information, by matching the input character string with the context information, for example, by inputting a vocabulary.
  • the supplementary string of the input string for example, when the input string is "xuxu”, when the context information is "form”, it is determined that the supplementary string is "rusheng”; or, when the input string is "tianan” If the context information is "Beijing", it is determined that the supplementary character string is "men”.
  • the supplementary character string includes, but is not limited to, determining one or more multi-segment characters by splicing by means of matching, and the like. string.
  • the candidate setting device 13 performs a matching query in the input vocabulary to obtain one or more supplementary input candidates corresponding to the supplementary character string; For example, when the supplementary character string is "rusheng", the supplementary input candidates such as “live”, “input”, “into”, etc., when the supplementary string is “men”, corresponds to Add input candidates such as “Tiananmen", “Gate”, etc.
  • the supplementary input candidate may directly include the context information, such as directly generating “morphological lifelike", “Beijing Tiananmen", and the like.
  • the context information is included in the supplemental input candidate, the context information in the supplemental input candidate is deleted, and the one or more input candidates are obtained, such as the supplementary input candidate Delete "Beijing" in the item "Beijing Tiananmen” and get the one or more input candidates "Tiananmen,,.
  • the context determining apparatus 12 may further extract a corresponding focus word from the related text as the context by performing natural language processing on the related text corresponding to the input character string, wherein the focus is The word is adjacent to the input location corresponding to the input string.
  • the context determining apparatus 12 may perform natural language processing on the related text corresponding to the input string by means of word segmentation or semantic analysis, wherein the related text includes but is not limited to the input string.
  • the input string is "shishi”
  • the corresponding related text is "Shanghai Metro Phase I Project”
  • the input string is located after "Shanghai Metro Phase I Project”
  • the related text is passed.
  • Perform natural language processing extract the focus words as “project”, and use "project” as the context.
  • the input device determines the input candidates as “implementation”, “real time”, “try”, etc. according to the context "project”.
  • FIG. 2 is a schematic diagram of an input device for providing input candidates corresponding to an input character string according to a preferred embodiment of the present invention; wherein the input device includes an obtaining device 11', a context determining device 12', and a candidate Item determining means 13', providing means 14', wherein the candidate determining means 13 comprises a matching unit 131, and a processing unit 132.
  • the obtaining means 1 ⁇ obtains an input character string; the context determining means 12' determines context information of the input character string; the matching unit 131 performs a matching query in the input lexicon according to the input character string, Obtaining one or more preliminary input candidates corresponding to the input string; processing unit 132, processing the one or more preliminary input candidates according to the context information, to obtain the one or more Input candidate; the providing means 14' provides at least one of the one or more input candidates to the target application corresponding to the input string.
  • the obtaining device 11, the context determining device 12, and the providing device 14 are the same as or substantially the same as the corresponding device shown in FIG. 1, and therefore are not described herein again, and are included herein by reference.
  • continuous means that the above devices respectively obtain the input character string in real time or according to the set or real-time adjusted working mode requirements. , determination of context information, acquisition of preliminary input candidates, determination of input candidates, provision of input candidates, etc. until the input device stops acquiring the input string.
  • the matching unit 131 performs a matching query in the input vocabulary according to the input character string to obtain one or more preliminary input candidates corresponding to the input character string. Specifically, the matching unit 131 matches the input character string with the words in the input vocabulary by acquiring the input character string to obtain one or more preliminary input candidates corresponding to the input character string. item. For example, when the input string is "shishi”, according to the matching query in the input lexicon, get “real time”, “try”, “implementation”, “fact”, “just in time”, “death”, etc. Initial input candidates.
  • the processing unit 132 processes the one or more preliminary input candidates according to the context information to obtain the one or more input candidates. Specifically, the processing unit 132' determines, according to the context information of the input string, the collocation probability of the context information and the preliminary input candidate according to the natural language model or the collocation database, and the like, and according to the collocation probability Enter candidates to filter or sort to get input candidates. For example, following the previous example, when the context information is "objective”, after processing, the preliminary input candidates are reordered, and the order becomes "fact”, “real time”, “try”, “implementation”, "timely” , “death” and so on.
  • the processing unit 132 may further perform a matching query in the word collocation database according to the context information, to determine collocation relevance information corresponding to the preliminary input candidate and the context information; Correlation information, processing the one or more preliminary input candidates to obtain the one or more input candidates.
  • the processing unit 132 may further perform a matching query in the word collocation database according to the context information, by matching the one or more terms in the database with the context according to the word collocation database.
  • the collocation relevance information indicates whether there is a collocation; or is a continuous variable, such as the collocation
  • the relevance information indicates how much the collocation probability is; here, the collocation relevance information may be obtained by machine learning according to a combination frequency such as a context in a word collocation database or other related database and a preliminary input candidate.
  • the one or more input candidates are obtained by performing, for example, filtering or sorting processing on the one or more preliminary input candidates according to the collocation relevance information.
  • the input device further includes a text processing device (not shown) and an establishing device (not shown); wherein the text processing device analyzes one or more pieces of text information to obtain a matching frequency that satisfies a certain Threshold collocation relationship; the establishing device establishes or updates the word collocation database according to the word segment collocation relationship.
  • the text processing apparatus acquires, for example, various types of logs, various types of articles, and the like, and performs an analysis method such as a first word segmentation on the acquired text information, and then calculates a co-occurrence frequency between adjacent words, when the co-occurrence is performed.
  • the establishing device establishes the word collocation database according to the word segment collocation relationship, or Updating the existing collocation database, etc., where the collocation database includes but is not limited to the collocation collocation relationship and the collocation probability information between the collocation collocation relationship; and the collocation database may include the existing fixed collocation database Words, such as idioms, slang, etc., can be included in the new words and expressions generated by the rapid development of existing network applications, thereby effectively improving user input efficiency.
  • FIG. 3 is a schematic diagram of an input device for providing input candidates corresponding to an input string according to another preferred embodiment of the present invention; wherein the input device includes The acquisition device 11", the context determination device 12", the candidate determination device 13", the provision device 14", wherein the candidate determination device 13" includes the detection unit 133" and the iteration unit 134".
  • the acquiring device 11", the context determining device 12", and the providing device 14" are the same as or substantially the same as the corresponding device shown in FIG. 1, so Further details are included herein and are incorporated by reference.
  • continuous means that the above devices respectively obtain the input character string in real time or according to the set or real-time adjusted working mode requirements. , determination of context information, detection of length threshold, determination of input candidates, provision of input candidates, etc., until the input device stops acquiring the input string.
  • the detecting unit 133" detects whether the input character string exceeds a predetermined length threshold. Specifically, the detecting unit 133" detects the length of the input character string by using a length threshold based on a preset or a user setting itself, It is detected whether the length of the input string exceeds a predetermined length threshold. For example, when the predetermined character length threshold is N, when the length of the input character string is N+1, the detecting unit 133" detects that the input character string exceeds a predetermined length threshold.
  • the iteration unit 134" iteratively determines one or more input candidates corresponding to the input string according to the input string and the context information. Specifically, If the input string exceeds the length threshold, the iteration unit 134" performs segmentation and the like on the input character string by, for example, according to the length threshold according to the input character string and the context information, Determining the input candidate corresponding to the input string of the first length threshold, and using the determined input candidate as context information again, thereby iteratively determining the input of the next length threshold One or more input candidates corresponding to the input character string are determined in a manner of inputting a candidate or the like corresponding to the character string.
  • the detecting unit 133" may further acquire one or more sampling input candidates corresponding to the input character string in the input vocabulary; and detect the number of words in at least one of the one or more sampling input candidates Exceeding a predetermined word count threshold to determine whether the input string exceeds a predetermined length threshold.
  • the detecting unit 133" may also perform matching by directly inputting the input string in the input vocabulary, for example.
  • the iteration unit 134" may further determine that the input string exceeds the length threshold, according to the context information, and a part of an input string of the input string adjacent to the context information.
  • One or more partial input candidates corresponding to the partial input string determining one or the corresponding input string according to the partial input string and the remaining input strings in the input string a plurality of remaining input candidates, wherein the partial input candidates are used as context information of the remaining input strings; the candidate candidates are input according to the one or more portions, and the one or more remaining Enter a candidate to determine the one or more input candidates.
  • the input string when the input string exceeds the length threshold, according to the context information, the input string is segmented or segmented by a process such as word segmentation, thereby obtaining the input string a partial input character string adjacent to the context information, by combining the partial input string with the context information, determining one or more partial input candidates corresponding to the partial input string; here, the determining The method is the same as or similar to the determination method in the candidate determining device 13 in FIG. 1, and therefore will not be described again here, and is included herein by reference.
  • the iteration unit 134" uses the partial input candidate as context information of the remaining input string, and determines it with the iterative manner One or more remaining input candidates corresponding to the input string; after iteration, one or more are determined by, for example, splicing the partial input candidates with the remaining input candidates, for example, by a relationship between the strings Enter candidates.
  • step si the input device acquires an input string; in step s2, the input device determines context information of the input string; in step S3, the input device according to the input string, and the context Information, determining one or more input candidates corresponding to the input string; in step s4, the input device provides at least one of the one or more input candidates to the target corresponding to the input string application.
  • continuous means that the above steps are respectively performed in real time or according to the set or real-time adjusted working mode requirements, and the input string is acquired. , determination of context information, determination of input candidates, provision of input candidates, etc., until the input device stops acquiring the input string.
  • step si the input device gets the input string. Specifically, in step si, the input device receives a character string input by an operation of inputting, selecting, clicking, etc. by receiving a user or other application from the input box; or passing various data according to various communication protocols (Communications Protocol)
  • the transmission interface obtains a string from an input box of another application; wherein the input box is a short message edit box, a content input box, or the like.
  • the input character string includes, but is not limited to, a pinyin code word input by a method such as full spelling or simple spelling.
  • the input device determines context information of the input string. Specifically, in step s2, the input device uses the input character string acquired according to step si, using the text or the like to which the currently input character string belongs, and the text to which the current input string belongs and one or more thesaurus. Performing a match to obtain one or more matching information associated with the input string and as context information of the input string; for example, when inputting "huacao", first determining the entry of the input string
  • the text may be "flowers”. According to the matching information of "flowers" in the vocabulary, the following information may be determined.
  • the input device determines the context information of the input string by using history information corresponding to the input string, for example, before the input string
  • the previous input string just above the screen can be used as the previous information of the input string.
  • the context information includes, but is not limited to, the above information or the following information corresponding to the input string; for example, when the input is "shishi”, the phrase of the current input on the screen is "objective”"At the time, the above information corresponding to "shishi” is “objective”; if there is a phrase "plan” on the screen, and "shishi” is entered, the cursor is located before “plan”, then the corresponding information below For “plan” and so on.
  • step S3 the input device determines one or more input candidates corresponding to the input character string based on the input character string and the context information. Specifically, in step S3, the input device directly passes one or more context information corresponding to the input string by using the input string obtained in step si and the context information determined in step si One or more input candidates corresponding to the input character string are determined as one or more input candidates, or the context information corresponding to the input character string is processed as an input candidate.
  • the above information corresponding to it may be “objective”, “I”, “talk”, etc., when the above information is “objective”
  • the input candidates are determined to be “facts”, “real time”, “implementation”, etc.; when the above information is “I”
  • the input candidates are “try”, “implement”, “try”, etc.
  • the above information is "talking”, make sure the input candidates are "current affairs", “facts", “world” Wait.
  • the input device provides at least one of the one or more input candidates to the target application corresponding to the input string. Specifically, in step s4, the input device provides the one or more by directly providing, or according to various communication protocols (Communications Protocol), through various data transmission interfaces, for example, by reordering or filtering. At least one of the input candidates is provided to the target application corresponding to the input string.
  • the target application includes, but is not limited to, the same application corresponding to the input box corresponding to the step si, or corresponds to the step si Other applications associated with the input box, such as searching directly using the input candidates.
  • the input device may further determine, according to the input character string and the context information, a supplementary character string including the input character string, wherein the supplementary character string further includes the context information.
  • Corresponding character string according to the supplementary string, performing a matching query in the input vocabulary to obtain one or more supplementary input candidates corresponding to the supplementary character string; according to the context information, Performing a screening process on the one or more supplemental input candidates to obtain the one or more input candidates.
  • the input device may further determine, according to the input string and the context information, by matching the input string with the context information, for example, by inputting a vocabulary,
  • the supplementary string of the input string for example, when the input string is "xuxu”, when the context information is "form”, it is determined that the supplementary string is "rusheng”; or, when the input string is "tianan” If the context information is "Beijing", it is determined that the supplementary character string is "men”.
  • the supplementary character string includes, but is not limited to, determining one or more multi-segment characters by splicing by means of matching, and the like. string.
  • the input device performs a matching query in the input vocabulary to obtain one or more supplementary input candidates corresponding to the supplementary character string; following the previous example, the supplementary string For the "rusheng”, the supplementary input candidates such as “ ⁇ ”, “ ⁇ ”, “ ⁇ ”, etc., when the supplementary string is “men”, the corresponding supplementary input candidates such as “Tiananmen” ", "door” and so on.
  • the supplementary input candidate may directly include the context information, such as directly generating "morphological lifelike", “Beijing Tiananmen", and the like.
  • the input device may also pass the input string
  • the corresponding related text is subjected to natural language processing, and a corresponding focus word is extracted from the related text as the context, wherein the focus word is adjacent to an input position corresponding to the input character string.
  • the input device may further perform natural language processing on the related text corresponding to the input string by means of word segmentation or semantic analysis, wherein the related text includes but is not limited to the input character.
  • the input string is "shishi”
  • the corresponding related text is "Shanghai Metro Phase I Project”
  • the input string is located after "Shanghai Metro Phase I Project”
  • the related text is passed.
  • Perform natural language processing extract the focus words as “project”, and use "project” as the context.
  • the input device determines the input candidates as “implementation”, “real time”, “try”, etc. according to the context "project”.
  • Figure 5 illustrates a flow diagram of a method for providing input candidates corresponding to an input string in accordance with a preferred embodiment of the present invention.
  • the input device acquires an input string; in step s2, the input device determines context information of the input string; in step s31, the input device is based on the input string Performing a matching query in the input lexicon to obtain one or more preliminary input candidates corresponding to the input string; in step s32, the input device inputs the one or more preliminary inputs according to the context information Waiting for processing to obtain the one or more input candidates; in step s4', the input device provides at least one of the one or more input candidates to the target application corresponding to the input string .
  • the step sl ', the step s2, and the step s4 are the same as or substantially the same as the corresponding steps shown in FIG. 4, and therefore are not described herein again, and are included herein by reference.
  • step s31' the input device performs a matching query in the input vocabulary according to the input character string to obtain one or more preliminary input candidates corresponding to the input character string. Specifically, in step s31, the input device matches the input string with the words in the input vocabulary by acquiring the input string to obtain one or more preliminary corresponding to the input string. Enter candidates. For example, when the input string is "shishi”, according to the matching query in the input lexicon, get “real time”, “try”, “implementation”, “fact”, “just in time”, “death”, etc. Initial input candidates.
  • the input device processes the one or more preliminary input candidates according to the context information to obtain the one or more input candidates. Specifically, in step s32, the input device determines, according to the context information of the input string, the collocation probability of the context information and the preliminary input candidate according to the natural language model or the collocation database, etc., and according to the collocation probability
  • the preliminary input candidates are filtered or sorted to obtain input candidates. For example, following the previous example, when the context information is "objective”, after processing, the preliminary input candidates are reordered, and the order becomes "fact”, “real time”, “try”, “implementation”, "timely” , “death” and so on.
  • the input device may further perform a matching query in the word collocation database according to the context information, to determine collocation relevance information corresponding to the preliminary input candidate and the context information;
  • the matching relevance information is processed to process the one or more preliminary input candidates to obtain the one or more input candidates.
  • the input device may further perform a matching query in the word collocation database according to the context information, by matching the one or more terms in the database with the context according to the word collocation database.
  • the collocation relevance information indicates whether there is a collocation; or is a continuous variable, such as the collocation
  • the relevance information indicates how much the collocation probability is; here, the collocation relevance information may be obtained by machine learning according to a combination frequency such as a context in a word collocation database or other related database and a preliminary input candidate.
  • the one or more input candidates are obtained by performing, for example, filtering or sorting processing on the one or more preliminary input candidates according to the collocation relevance information.
  • the method further includes a step s5, (not shown) and a step s6, (not shown); wherein, in step s5', the input device analyzes one or more pieces of text information to obtain The collocation collocation relationship with the matching frequency meeting a certain threshold value; in step s6, the input device establishes or updates the collocation database according to the word segment collocation relationship.
  • the input device obtains, for example, various types of logs, various articles, and the like, and performs an analysis method such as a first word segmentation on the acquired text information, and then statistics on co-occurrence frequencies between adjacent words.
  • the input device When the co-occurrence frequency exceeds a certain threshold, it is determined that there is a certain collocation relationship between the adjacent words, thereby obtaining a word segment collocation relationship whose matching frequency satisfies a certain threshold value; in step s6, the input device according to the word segmentation a collocation relationship, establishing a collocation database of the words, or updating an existing collocation database, etc., wherein the collocation database includes, but is not limited to, a collocation relationship between the word segmentation relationship and the word segment collocation relationship;
  • the word collocation database may include existing fixed words, such as idioms, colloquial words, etc., and through the update, new words and expressions generated by rapid development of existing network applications may be included, thereby effectively improving users. Input efficiency.
  • Figure 6 is a flow chart showing a method for providing input candidates corresponding to an input string in accordance with another preferred embodiment of the present invention.
  • the input device acquires an input character string; in step s2", the input device determines context information of the input string; in step s33", the input device detects whether the input string is Exceeding a predetermined length threshold; if the input string exceeds the length threshold, in step s34", the input device iteratively determines a one corresponding to the input string according to the input string and the context information Or a plurality of input candidates; in step s4", the input device provides at least one of the one or more input candidates to the target application corresponding to the input string.
  • the step sl ", the step s2" and the step s4" are the same as or substantially the same as the corresponding steps shown in FIG. 4, and therefore are not described herein again, and are included herein by reference.
  • continuous means that the above steps are respectively performed in real time or according to the set or real-time adjusted working mode requirements, and the input string is acquired. , determination of context information, detection of length threshold, determination of input candidates, provision of input candidates, etc., up to input device Stop getting the input string.
  • step s33" the input device detects whether the input string exceeds a predetermined length threshold. Specifically, in step s33", the input device pairs the input character by a length threshold based on a preset or user setting. The length of the string is detected to detect whether the length of the input string exceeds a predetermined length threshold. For example, when the predetermined character length threshold is N, and when the length of the input character string is N+1, then in step s33", the input device detects that the input character string exceeds a predetermined length threshold.
  • the input device iteratively determines one or more input candidates corresponding to the input string according to the input string and the context information. Specifically, if the input string exceeds the length threshold, in step s34", the input device passes the input by, for example, according to the length threshold according to the input string and the context information. The string is subjected to segmentation and the like, the input candidate corresponding to the input string of the first length threshold is determined, and the determined input candidate is used again as context information, thereby iteratively determining the input of the next length threshold.
  • One or more input candidates corresponding to the input character string are determined in a manner of input candidates or the like corresponding to the character string.
  • the input device may further acquire one or more sampling input candidates corresponding to the input character string in the input vocabulary; detecting at least one of the one or more sampling input candidates The number of words exceeds a predetermined threshold of words to determine whether the input string exceeds a predetermined length threshold.
  • the input device may also directly input the input string to the input word, for example.
  • Matching in the library obtaining one or more input candidates corresponding to all the input strings, and randomly extracting or specifying extraction (such as selecting the first input candidate, etc.) to obtain the input string Corresponding one or more sampling input candidates in the input lexicon; by detecting the one or more sampling input candidates, if at least one of the sampling input candidates exceeds a predetermined word threshold, Then it is determined whether the input string exceeds a predetermined length threshold.
  • the input device may further exceed the length threshold when the input string exceeds the context information, and the input string and the upper The part of the input string adjacent to the information below determines one or more partial input candidates corresponding to the part of the input string; determining, according to the part of the input string, and the remaining input strings in the input string, One or more remaining input candidates corresponding to the remaining input string, wherein the partial input candidate is used as context information of the remaining input string; and the one or more partial input candidates are And the one or more remaining input candidates, the one or more input candidates being determined.
  • the input string when the input string exceeds the length threshold, according to the context information, the input string is segmented or segmented by a process such as word segmentation, thereby obtaining the input string a partial input character string adjacent to the context information, by combining the partial input string with the context information, determining one or more partial input candidates corresponding to the partial input string; here, the determining The method is the same as or similar to the determination method in the step s 3 described in FIG. 4, and therefore will not be described again here, and is included herein by reference.
  • step s 34" the input device uses the partial input candidate as context information of the remaining input string, and iteratively determines one or more remaining input candidates corresponding to the remaining input string; After iteration, one or more input candidates are determined by, for example, splicing the partial input candidates with the remaining input candidates, for example, by the relationship between the strings.

Landscapes

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

Abstract

一种用于提供输入字符串所对应的输入候选项的方法与设备。该方法包括:输入设备获取输入字符串;确定所述输入字符串的上下文信息;根据所述输入字符串,以及所述上下文信息,确定与所述输入字符串对应的一个或多个输入候选项;将所述一个或多个输入候选项中至少一个提供给所述输入字符串所对应的目标应用。与现有技术相比,该方法和设备通过根据输入字符串的上下文信息,确定与所述输入字符串对应的一个或多个输入候选项;并将所述一个或多个输入候选项中至少一个提供给所述输入字符串所对应的目标应用;从而提高了输入灵活度,与用户的输入需求相匹配,还提高了输入法的输入效率,改善了用户体验。

Description

一种用于提供输入字符串所对应的输入候选项的方法与 设备
技术领域
本发明涉及互联网技术领域, 尤其涉及一种用于提供输入字符串 所对应的输入候选项的技术。 背景技术
对于中文输入而言, 存在大量的同音异义词, 而实际用户在输入 过程中仅会选择其中的一个, 当前的输入法将多个输入候选项提供给 用户, 由用户根据需求进行选择, 当输入候选项较多时, 用户进行选 择操作则会导致输入的緩慢低效。 考虑到文字的输入间具有一定的语 义或逻辑关系, 如何利用所述语义或逻辑关系, 对输入候选项进行处 理, 从而提升用户的使用体验, 成为本领域技术人员亟需解决的一个 问题。 发明内容
本发明的目的是提供一种用于提供输入字符串所对应的输入候选 项的方法与设备。
根据本发明的一个方面, 提供了一种用于提供输入字符串所对应 的输入候选项的方法, 其中, 该方法包括以下步骤:
a 获取输入字符串;
b 确定所述输入字符串的上下文信息;
c 根据所述输入字符串, 以及所述上下文信息, 确定与所述输入 字符串对应的一个或多个输入候选项;
d 将所述一个或多个输入候选项中至少一个提供给所述输入字 符串所对应的目标应用。
根据本发明的另一方面, 还提供了一种用于提供输入字符串所对 应的输入候选项的输入设备, 其中, 该设备包括:
获取装置, 用于获取输入字符串;
上下文确定装置, 用于确定所述输入字符串的上下文信息; 候选项确定装置, 用于根据所述输入字符串, 以及所述上下文信 息, 确定与所述输入字符串对应的一个或多个输入候选项;
提供装置, 用于将所述一个或多个输入候选项中至少一个提供给 所述输入字符串所对应的目标应用。
与现有技术相比, 本发明通过根据输入字符串的上下文信息, 确 定与所述输入字符串对应的一个或多个输入候选项; 并将所述一个或 多个输入候选项中至少一个提供给所述输入字符串所对应的目标应 用; 从而提高了输入灵活度, 与用户的输入需求相匹配, 还提高了输 入法的输入效率, 改善了用户体验。
而且, 本发明还可以通过对与所述输入字符串对应的一个或多个 初步输入候选项进行处理, 以获得所述一个或多个输入候选项; 进一步 地, 还可以根据所述初步输入候选项与所述上下文信息对应的搭配相关 度信息, 对所述一个或多个初步输入候选项进行处理, 以获得所述一个 或多个输入候选项; 更进一步地, 还可以根据对文本信息的分析处理, 获得搭配频度满足一定阈值的分词搭配关系, 从而建立或更新所述词语 搭配数据库; 从而提高了输入字符串与输入候选项的匹配准确度, 与 用户的输入需求相匹配,提高了输入法的输入效率,改善了用户体猃。
而且, 本发明还可以确定包含所述输入字符串的增补字符串, 并根 据所述增补字符串, 获得与所述增补字符串对应的一个或多个增补输入 候选项, 通过对所述增补输入候选项进行筛选处理, 以获得所述一个或 多个输入候选项; 从而提高了输入灵活度, 提高了输入字符串与输入候 选项的匹配准确度, 与用户的输入需求相匹配, 提高了输入法的输入 效率, 改善了用户体 ^r。
而且,本发明还可以所述输入字符串所对应的相关文本进行自然语 言处理, 从所述相关文本提取对应的焦点词语, 以作为所述上下文; 从 而提高了输入字符串与输入候选项的匹配准确度, 与用户的输入需求 相匹配, 提高了输入法的输入效率, 改善了用户体 ^r。
而且, 本发明还可以检测所述输入字符串是否超出预定的长度阈 值, 若所述输入字符串超出所述长度阈值, 根据所述输入字符串, 以及 所述上下文信息, 迭代确定与所述输入字符串对应的一个或多个输入候 选项; 进一步地, 通过检测所述输入字符串在输入词库中对应的一个或 多个抽样输入候选项中至少一个中的字数是超出预定的字数阈值, 以确 定所述输入字符串是否超出预定的长度阈值; 进一步地, 当所述输入字 符串超出所述长度阈值, 还可以确定部分输入候选项与其余输入候选 项, 并才艮据所述一个或多个部分输入候选项, 以及所述一个或多个其余 输入候选项,确定所述一个或多个输入候选项;从而提高了输入灵活度, 提高了输入字符串与输入候选项的匹配准确度, 与用户的输入需求相 匹配, 提高了输入法的输入效率, 改善了用户体验。 附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述, 本发明的其它特征、 目的和优点将会变得更明显:
图 1示出根据本发明一个方面的一种用于提供输入字符串所对应 的输入候选项的输入设备示意图;
图 2示出根据本发明一个优选实施例的一种用于提供输入字符串 所对应的输入候选项的输入设备示意图;
图 3示出根据本发明另一个优选实施例的一种用于提供输入字符 串所对应的输入候选项的输入设备示意图;
图 4示出根据本发明另一个方面的一种用于提供输入字符串所对 应的输入候选项的方法流程图;
图 5示出根据本发明一个优选实施例的一种用于提供输入字符串 所对应的输入候选项的方法流程图;
图 6示出根据本发明另一个优选实施例的一种用于提供输入字符 串所对应的输入候选项的方法流程图。
附图中相同或相似的附图标记代表相同或相似的部件。 具体实施方式
下面结合附图对本发明作进一步详细描述。
图 1示出根据本发明一个方面的一种用于提供输入字符串所对应 的输入候选项的输入设备示意图; 其中, 所述输入设备包括获取装置
11、 上下文确定装置 12、 候选项确定装置 13、 提供装置 14。 具体地, 获取装置 11获取输入字符串; 上下文确定装置 12确定所述输入字符 串的上下文信息; 候选项确定装置 13根据所述输入字符串, 以及所 述上下文信息, 确定与所述输入字符串对应的一个或多个输入候选 项; 提供装置 14将所述一个或多个输入候选项中至少一个提供给所 述输入字符串所对应的目标应用。 在此, 输入设备包括但不限于网络 设备、 用户设备、 或网络设备与用户设备通过网络相集成所构成的设 备。 其中, 所述网络设备其包括但不限于计算机、 网络主机、 单个网 络服务器、 多个网络服务器集或多个服务器构成的云; 在此, 云由基 于云计算( Cloud Computing )的大量计算机或网络服务器构成,其中, 云计算是分布式计算的一种, 由一群松散耦合的计算机集组成的一个 虚拟超级计算机。 所述用户设备其包括但不限于任何一种可与用户通 过键盘、 遥控器、 触摸板、 或声控设备进行人机交互的电子产品, 例 如计算机、 智能手机、 PDA, 游戏机、 或 IPTV等。 所述网络包括但 不限于互联网、 广域网、 城域网、 局域网、 VPN网络、 无线自组织网 络(Ad Hoc 网络) 等。 本领域技术人员应能理解, 其他的输入设备 同样适用于本发明, 也应包含在本发明保护范围以内, 并在此以引用 方式包含于此。
上述各装置之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各装置分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 输入候 选项的确定、 输入候选项的提供等, 直至输入设备停止获取输入字符 串。
获取装置 11获取输入字符串。 具体地, 所述获取装置 11通过从 输入框中接收用户或其他应用等通过输入、 选择、 点击等操作所输入 的字符串; 或者根据各种通信协议 (Communications Protocol), 通过各 种数据传输接口, 获取从其他应用的输入框中的字符串; 其中, 所述 输入框如短信编辑框、 内容输入框等。 其中, 所述输入字符串包括但不 限于通过如全拼或简拼等方式所输入的拼音编码字符等。
上下文确定装置 12确定所述输入字符串的上下文信息。 具体地, 所述上下文确定装置 12通过根据获取装置 11所获取的输入字符串, 利用当前所输入的字符串所属的文字等, 将所述当前输入字符串所属 的文字与一个或多个词库进行匹配, 获取与所述输入字符串相关联的 一种或多种匹配信息, 并作为所述输入字符串的上下文信息; 例如, 当输入 "huacao" 时, 先确定所述输入字符串所属的文字可能为 "花 草", 根据 "花草" 在所属词库中的匹配信息, 确定其下文信息可能 为 "茶" 等; 或者, 所述上下文确定装置 12通过根据与所述输入字 符串相对应的历史记录信息, 对所述输入字符串的上下文信息进行确 定, 例如, 所述输入字符串前刚刚上屏的前一个输入字符串, 则可作 为所述输入字符串的前文信息。 在此, 所述上下文信息包括但不限于 与所述输入字符串相对应的上文信息或下文信息; 例如, 当所述输入 为 "shishi"时, 当前次输入所上屏的词组为 "客观"时,则所述 "shishi" 对应的上文信息为 "客观"; 若屏幕上存在一个词组 "计划", 且输入 "shishi" 时, 光标位于 "计划" 前, 则其所对应的下文信息为 "计 划" 等。
候选项确定装置 13根据所述输入字符串, 以及所述上下文信息, 确定与所述输入字符串对应的一个或多个输入候选项。 具体地, 候选 项确定装置 13通过根据获取装置 11所获取的输入字符串, 以及上下 文确定装置 12所确定的上下文信息, 通过将与所述输入字符串相对 应的一个或多个上下文信息直接作为一个或多个输入候选项, 或者将 所述输入字符串相对应的上下文信息进行处理后作为输入候选项的 方式, 确定与所述输入字符串对应的一个或多个输入候选项。 例如, 继上例, 当所述输入字符串为 "shishi" 时, 其所对应的上文信息可 能为 "客观", "我", "谈论" 等, 当所述上文信息为 "客观" 时, 通 过利用将所述输入字符串, 以及所述上下文信息进行匹配等的方式, 确定输入候选项为 "事实"、 "实时"、 "实施" 等; 当所述上文信息为 "我" 时, 确定输入候选项为 "试试"、 "实施"、 "试试" 等; 当所述 上文信息为 "谈论" 时, 确定输入候选项为 "时事"、 "事实"、 "世事" 等。
提供装置 14将所述一个或多个输入候选项中至少一个提供给所 述输入字符串所对应的目标应用。 具体地, 提供装置 14通过直接提 供, 或才艮据各种通信协议 (Communications Protocol), 通过各种数据传 输接口, 通过例如重新排序或筛选等方式, 将所述一个或多个输入候 选项中至少一个提供给所述输入字符串所对应的目标应用。 其中, 所 述目标应用包括但不限于与所述获取装置 11 所对应的输入框相对应 的相同应用, 或者与所述获取装置 11 所对应的输入框相关联的其他 应用等, 如直接利用所述输入候选项进行搜索等。
优选地, 所述候选项确定装置 13还可以才艮据所述输入字符串, 以 及所述上下文信息, 确定包含所述输入字符串的增补字符串, 其中, 所 述增补字符串还包括所述上下文信息所对应的字符串; 才艮据所述增补字 符串, 在输入词库中进行匹配查询, 以获得与所述增补字符串对应的一 个或多个增补输入候选项; 才艮据所述上下文信息, 对所述一个或多个增 补输入候选项进行筛选处理, 以获得所述一个或多个输入候选项。 具体 地, 所述候选项定装置 13 还可以根据所述输入字符串, 以及所述上下 文信息, 通过将所述输入字符串结合所述上下文信息与例如输入词库进 行匹配等方式, 确定包含所述输入字符串的增补字符串, 例如, 当输入 字符串为 "xuxu" 时, 当上下文信息为 "形态", 则确定所述增补字符 串为 "rusheng"; 或者, 当输入字符串为" tianan", 上下文信息为 "北 京", 则确定所述增补字符串为 "men" , 在此, 所述增补字符串包括但 不限于通过匹配等方式, 确定一个或多个通过拼接而成的多段字符串。 所述候选项定装置 13 通过将所述增补字符串在输入词库中进行匹配查 询, 以获得与所述增补字符串对应的一个或多个增补输入候选项; 继前 例, 所述增补字符串为 "rusheng"时所对应的增补输入候选项如 "如生"、 "入声"、 "入胜" 等, 所述增补字符串为 "men" 时, 所对应的增补输 入候选项如 "天安门"、 "门" 等。 或者, 所述增补输入候选项还可以 直接包括所述上下文信息, 如直接生成 "形态栩栩如生"、 "北京天安门" 等。 根据所述上下文信息, 对所述一个或多个增补输入候选项进行筛选 处理, 继前例, 根据上下文信息, 分别确定输入候选项为 "栩栩如生"、 "天安门" 从而获得所述一个或多个输入候选项; 在此, 若所述增补输 入候选项中包含上下文信息, 则将所述增补输入候选项中的上下文信息 删除后, 获得所述一个或多个输入候选项, 如所述增补输入候选项 "北 京天安门" 中的 "北京" 删除, 获得所述一个或多个输入候选项 "天安 门,,。
优选地, 所述上下文确定装置 12还可以通过对所述输入字符串所 对应的相关文本进行自然语言处理, 从所述相关文本提取对应的焦点词 语, 以作为所述上下文, 其中, 所述焦点词语邻近所述输入字符串所对 应的输入位置。 具体地, 所述上下文确定装置 12还可以通过分词或语 义分析等方式, 对所述输入字符串所对应的相关文本进行自然语言处 理, 其中, 所述相关文本包括但不限于所述输入字符串本身所对应的文 本, 或者所述输入字符串所对应的输入位置前后已经上屏的相关文本; 通过对所述相关文本中经由自然语言处理, 提取对应的焦点词语以作为 所述上下文。 例如, 当所述输入字符串为 "shishi" 时, 其对应的相关文 本为 "上海地铁一期工程", 且所述输入字符串位于 "上海地铁一期工 程"之后,通过对所述相关文本进行自然语言处理,提取焦点词语为 "工 程",并将"工程"作为上下文。进一步地,因此,当输入字符串为 "shishi" 时, 该输入设备才艮据所述上下文 "工程", 确定输入候选项为 "实施"、 "实时"、 "试试" 等。
图 2示出根据本发明一个优选实施例的一种用于提供输入字符串 所对应的输入候选项的输入设备示意图; 其中, 所述输入设备包括获 取装置 11 '、上下文确定装置 12'、候选项确定装置 13'、提供装置 14' , 在此, 所述候选项确定装置 13,包括匹配单元 131,和处理单元 132,。 具体地, 获取装置 1 Γ获取输入字符串; 上下文确定装置 12'确定所述 输入字符串的上下文信息; 匹配单元 131,才艮据所述输入字符串, 在输 入词库中进行匹配查询, 以获得与所述输入字符串对应的一个或多个初 步输入候选项; 处理单元 132,根据所述上下文信息, 对所述一个或多个 初步输入候选项进行处理, 以获得所述一个或多个输入候选项; 提供装 置 14'将所述一个或多个输入候选项中至少一个提供给所述输入字符 串所对应的目标应用。其中,所述获取装置 11,、上下文确定装置 12,、 提供装置 14,与图 1所示对应装置相同或基本相同,故此处不再赘述, 并通过引用的方式包含于此。
上述各装置之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各装置分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 初步输 入候选项的获取、 输入候选项的确定、 输入候选项的提供等, 直至输 入设备停止获取输入字符串。
匹配单元 131,根据所述输入字符串, 在输入词库中进行匹配查询, 以获得与所述输入字符串对应的一个或多个初步输入候选项。 具体地, 所述匹配单元 131,通过获取所述输入字符串, 将所述输入字符串与输入 词库中的词进行匹配, 以获得与所述输入字符串对应的一个或多个初步 输入候选项。 例如, 当输入字符串为 "shishi" 时, 根据在输入词库中进 行匹配查询后, 获取 "实时"、 "试试"、 "实施"、 "事实"、 "适时"、 "逝 世" 等多个初步输入候选项。
处理单元 132,根据所述上下文信息, 对所述一个或多个初步输入候 选项进行处理, 以获得所述一个或多个输入候选项。 具体地, 处理单元 132'根据所述输入字符串的上下文信息, 通过根据自然语言模型或词语 搭配数据库等, 确定上下文信息与初步输入候选项的搭配概率, 并根据 所述搭配概率对所述初步输入候选项进行筛选或排序, 以获得输入候选 项。 例如, 继前例, 当上下文信息为 "客观", 则经处理后, 将初步输 入候选项进行重新排序, 顺序变为 "事实"、 "实时"、 "试试"、 "实施"、 "适时"、 "逝世" 等。 优选地, 所述处理单元 132,还可以根据所述上下文信息, 在词语搭 配数据库中进行匹配查询, 以确定所述初步输入候选项与所述上下文信 息对应的搭配相关度信息; 根据所述搭配相关度信息, 对所述一个或多 个初步输入候选项进行处理, 以获得所述一个或多个输入候选项。 具体 地, 所述处理单元 132,还可以根据所述上下文信息, 在词语搭配数据库 中进行匹配查询, 通过才艮据所述词语搭配数据库中的一个或多个词条与 所述上下文的匹配关系等, 确定所述初步输入候选项与所述上下文信息 对应的搭配相关度信息; 例如若或为 bull变量, 则所述搭配相关度信息 表示如是否存在搭配; 或为连续变量, 如所述搭配相关度信息表示搭配 概率为多少; 在此, 所述搭配相关度信息可根据如词语搭配数据库或其 他相关数据库中的上下文与初步输入候选项的组合频率等通过机器学 习获得。 根据所述搭配相关度信息, 通过对所述一个或多个初步输入候 选项进行如筛选或排序处理, 获得所述一个或多个输入候选项。
更优选地, 所述输入设备还包括文本处理装置 (未示出)和建立 装置 (未示出); 其中, 文本处理装置对一个或多个文本信息进行分析 处理, 以获得搭配频度满足一定阈值的分词搭配关系; 建立装置根据所 述分词搭配关系, 建立或更新所述词语搭配数据库。 具体地, 文本处理 装置例如通过对各类日志、 各类文章等进行获取, 并对所获取文本信息 进行如先分词, 后统计相邻词间的共现频率等分析方法, 当所述共现频 率超过一定阈值时, 则判断所述相邻词间存在一定的搭配关系, 从而获 得搭配频度满足一定阈值的分词搭配关系; 建立装置根据所述分词搭配 关系,建立所述词语搭配数据库,或对现有词语搭配数据库进行更新等, 在此, 所述词语搭配数据库中包括但不限于分词搭配关系以及分词搭配 关系之间的搭配概率信息; 并且, 所述词语搭配数据库中可包含现有固 定词语, 如成语、 俗语等, 同时经过所述更新, 可以将由于现有网络应 用的快速发展所产生的新的词语及表述进行包含, 从而有效提高用户的 输入效率。
图 3示出根据本发明另一个优选实施例的一种用于提供输入字符 串所对应的输入候选项的输入设备示意图; 其中, 所述输入设备包括 获取装置 11"、 上下文确定装置 12"、 候选项确定装置 13"、 提供装置 14", 在此, 所述候选项确定装置 13"包括检测单元 133"和迭代单元 134"。 具体地, 获取装置 11"获取输入字符串; 上下文确定装置 12" 确定所述输入字符串的上下文信息; 检测单元 133"检测所述输入字 符串是否超出预定的长度阈值; 若所述输入字符串超出所述长度阈值, 迭代单元 134 艮据所述输入字符串, 以及所述上下文信息,迭代确定与 所述输入字符串对应的一个或多个输入候选项; 提供装置 14"将所述一 个或多个输入候选项中至少一个提供给所述输入字符串所对应的目 标应用。 其中, 所述获取装置 11"、 上下文确定装置 12"、 提供装置 14"与图 1 所示对应装置相同或基本相同, 故此处不再赘述, 并通过 引用的方式包含于此。
上述各装置之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各装置分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 长度阈 值的检测、 输入候选项的确定、 输入候选项的提供等, 直至输入设备 停止获取输入字符串。
检测单元 133"检测所述输入字符串是否超出预定的长度阈值。 具 体地, 所述检测单元 133"通过基于预置的或用户自行设置的长度阈值, 对所述输入字符串的长度进行检测, 检测所述输入字符串的长度是否超 出了预定的长度阈值。 例如, 当预定的字符长度阈值为 N, 当所述输入 字符串的长度为 N+1时, 则检测单元 133"检测所述输入字符串超出了 预定的长度阈值。
若所述输入字符串超出所述长度阈值,迭代单元 134"根据所述输入 字符串, 以及所述上下文信息, 迭代确定与所述输入字符串对应的一个 或多个输入候选项。 具体地, 若所述输入字符串超出所述长度阈值, 迭 代单元 134"通过根据所述输入字符串, 以及所述上下文信息, 通过例 如根据所述长度阈值, 对所述输入字符串进行分段等处理, 确定与第 一个长度阈值的输入字符串所对应的所述输入候选项, 并将所确定的 输入候选项再次作为上下文信息, 从而迭代确定下一个长度阈值的输 入字符串所对应的输入候选项等的方式, 确定与所述输入字符串对应 的一个或多个输入候选项。
优选地, 所述检测单元 133"还可以获取所述输入字符串在输入词 库中对应的一个或多个抽样输入候选项; 检测所述一个或多个抽样输入 候选项中至少一个中的字数是超出预定的字数阈值, 以确定所述输入字 符串是否超出预定的长度阈值。 具体地, 所述检测单元 133"还可以通 过例如将所述输入字符串直接在所述输入词库中进行匹配, 获取与所 述全部输入字符串所对应的一个或多个输入候选项, 并从中随机抽取 或指定抽取(如选择第一个输入候选项等) 方式, 获取所述输入字符 串在输入词库中对应的一个或多个抽样输入候选项; 通过对所述一个或 多个抽样输入候选项进行检测, 如所述抽样输入候选项中的其中至少一 个字数超出预定的字数阈值, 则确定所述输入字符串是否超出预定的长 度阈值。
优选地, 所述迭代单元 134"还可以当所述输入字符串超出所述长 度阈值, 根据所述上下文信息, 以及所述输入字符串中与所述上下文信 息相邻的部分输入字符串, 确定与所述部分输入字符串对应的一个或多 个部分输入候选项; 根据所述部分输入字符串, 以及所述输入字符串中 其余输入字符串, 确定与所述其余输入字符串对应的一个或多个其余输 入候选项, 其中, 所述部分输入候选项被用作所述其余输入字符串的上 下文信息; 才艮据所述一个或多个部分输入候选项, 以及所述一个或多个 其余输入候选项, 确定所述一个或多个输入候选项。
具体地, 当所述输入字符串超出所述长度阈值, 根据所述上下文信 息, 通过例如分词等处理, 对所述输入字符串进行分词或分段等, 从而 获取所述输入字符串中与所述上下文信息相邻的部分输入字符串, 通过 将所述部分输入字符串结合所述上下文信息, 确定与所述部分输入字符 串对应的一个或多个部分输入候选项; 在此, 所述确定方法与图 1中所 述候选项确定装置 13 中的确定方法相同或相似, 故此处不再赘述, 并 通过引用的方式包含于此。 所述迭代单元 134"将所述部分输入候选项 作为其余输入字符串的上下文信息, 通过迭代的方式, 确定与所述其 余输入字符串相对应的一个或多个其余输入候选项;迭代后通过例如对 字符串之间的关系, 对所述部分输入候选项与其余输入候选项进行拼接 等方式, 确定一个或多个输入候选项。
图 4示出根据本发明另一个方面的一种用于提供输入字符串所对 应的输入候选项的方法流程图。 具体地, 在步骤 si 中, 输入设备获 取输入字符串; 在步骤 s2 中, 输入设备确定所述输入字符串的上下 文信息; 在步骤 S3 中, 输入设备根据所述输入字符串, 以及所述上 下文信息, 确定与所述输入字符串对应的一个或多个输入候选项; 在 步骤 s4 中, 输入设备将所述一个或多个输入候选项中至少一个提供 给所述输入字符串所对应的目标应用。
上述各步骤之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各步骤分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 输入候 选项的确定、 输入候选项的提供等, 直至输入设备停止获取输入字符 串。
在步骤 si中, 输入设备获取输入字符串。 具体地, 在步骤 si中, 输入设备通过从输入框中接收用户或其他应用等通过输入、 选择、 点 击等操作所输入的字符串; 或者根据各种通信协议 (Communications Protocol), 通过各种数据传输接口, 获取从其他应用的输入框中的字 符串; 其中, 所述输入框如短信编辑框、 内容输入框等。 其中, 所述输 入字符串包括但不限于通过如全拼或简拼等方式所输入的拼音编码字 付矛。
在步骤 s2 中, 输入设备确定所述输入字符串的上下文信息。 具 体地,在步骤 s2中,输入设备通过根据步骤 si所获取的输入字符串, 利用当前所输入的字符串所属的文字等, 将所述当前输入字符串所属 的文字与一个或多个词库进行匹配, 获取与所述输入字符串相关联的 一种或多种匹配信息, 并作为所述输入字符串的上下文信息; 例如, 当输入 "huacao" 时, 先确定所述输入字符串所属的文字可能为 "花 草", 根据 "花草" 在所属词库中的匹配信息, 确定其下文信息可能 为 "茶" 等; 或者, 在步骤 s2 中, 输入设备通过根据与所述输入字 符串相对应的历史记录信息, 对所述输入字符串的上下文信息进行确 定, 例如, 所述输入字符串前刚刚上屏的前一个输入字符串, 则可作 为所述输入字符串的前文信息。 在此, 所述上下文信息包括但不限于 与所述输入字符串相对应的上文信息或下文信息; 例如, 当所述输入 为 "shishi"时, 当前次输入所上屏的词组为 "客观"时,则所述 "shishi" 对应的上文信息为 "客观"; 若屏幕上存在一个词组 "计划", 且输入 "shishi" 时, 光标位于 "计划" 前, 则其所对应的下文信息为 "计 划" 等。
在步骤 S3 中, 输入设备根据所述输入字符串, 以及所述上下文 信息,确定与所述输入字符串对应的一个或多个输入候选项。具体地, 在步骤 S3中, 输入设备通过根据步骤 si中所获取的输入字符串, 以 及步骤 si 中所确定的上下文信息, 通过将与所述输入字符串相对应 的一个或多个上下文信息直接作为一个或多个输入候选项, 或者将所 述输入字符串相对应的上下文信息进行处理后作为输入候选项的方 式, 确定与所述输入字符串对应的一个或多个输入候选项。 例如, 继 上例, 当所述输入字符串为 "shishi" 时, 其所对应的上文信息可能 为 "客观", "我", "谈论" 等, 当所述上文信息为 "客观" 时, 通过 利用将所述输入字符串, 以及所述上下文信息进行匹配等的方式, 确 定输入候选项为 "事实"、 "实时"、 "实施"等; 当所述上文信息为 "我" 时, 确定输入候选项为 "试试"、 "实施"、 "试试" 等; 当所述上文信 息为 "谈论" 时, 确定输入候选项为 "时事"、 "事实"、 "世事" 等。
在步骤 s4 中, 输入设备将所述一个或多个输入候选项中至少一 个提供给所述输入字符串所对应的目标应用。 具体地, 在步骤 s4中, 输入设备通过直接提供, 或 4艮据各种通信协议(Communications Protocol), 通过各种数据传输接口,通过例如重新排序或筛选等方式, 将所述一个或多个输入候选项中至少一个提供给所述输入字符串所 对应的目标应用。 其中, 所述目标应用包括但不限于与所述步骤 si 中所对应的输入框相对应的相同应用, 或者与所述步骤 si 中所对应 的输入框相关联的其他应用等, 如直接利用所述输入候选项进行搜索 等。
优选地, 在步骤 s3中, 输入设备还可以根据所述输入字符串, 以 及所述上下文信息, 确定包含所述输入字符串的增补字符串, 其中, 所 述增补字符串还包括所述上下文信息所对应的字符串; 才 据所述增补字 符串, 在输入词库中进行匹配查询, 以获得与所述增补字符串对应的一 个或多个增补输入候选项; 才艮据所述上下文信息, 对所述一个或多个增 补输入候选项进行筛选处理, 以获得所述一个或多个输入候选项。 具体 地, 在步骤 s3中, 输入设备还可以根据所述输入字符串, 以及所述上 下文信息, 通过将所述输入字符串结合所述上下文信息与例如输入词库 进行匹配等方式, 确定包含所述输入字符串的增补字符串, 例如, 当输 入字符串为 "xuxu" 时, 当上下文信息为 "形态", 则确定所述增补字 符串为 "rusheng"; 或者, 当输入字符串为" tianan", 上下文信息为 "北 京", 则确定所述增补字符串为 "men" , 在此, 所述增补字符串包括但 不限于通过匹配等方式, 确定一个或多个通过拼接而成的多段字符串。 在步骤 s3 中, 输入设备通过将所述增补字符串在输入词库中进行匹配 查询, 以获得与所述增补字符串对应的一个或多个增补输入候选项; 继 前例, 所述增补字符串为 "rusheng"时所对应的增补输入候选项如 "如 生"、 "入声"、 "入胜" 等, 所述增补字符串为 "men" 时, 所对应的增 补输入候选项如 "天安门"、 "门" 等。 或者, 所述增补输入候选项还 可以直接包括所述上下文信息, 如直接生成 "形态栩栩如生"、 "北京天 安门" 等。 根据所述上下文信息, 对所述一个或多个增补输入候选项进 行筛选处理, 继前例, 才艮据上下文信息, 分别确定输入候选项为 "栩栩 如生"、 "天安门" 从而获得所述一个或多个输入候选项; 在此, 若所述 增补输入候选项中包含上下文信息, 则将所述增补输入候选项中的上下 文信息删除后, 获得所述一个或多个输入候选项, 如所述增补输入候选 项 "北京天安门" 中的 "北京" 删除, 获得所述一个或多个输入候选项 "天安门"。
优选地, 在步骤 s2中, 输入设备还可以通过对所述输入字符串所 对应的相关文本进行自然语言处理, 从所述相关文本提取对应的焦点词 语, 以作为所述上下文, 其中, 所述焦点词语邻近所述输入字符串所对 应的输入位置。 具体地, 在步骤 s2中, 输入设备还可以通过分词或语 义分析等方式, 对所述输入字符串所对应的相关文本进行自然语言处 理, 其中, 所述相关文本包括但不限于所述输入字符串本身所对应的文 本, 或者所述输入字符串所对应的输入位置前后已经上屏的相关文本; 通过对所述相关文本中经由自然语言处理, 提取对应的焦点词语以作为 所述上下文。 例如, 当所述输入字符串为 "shishi" 时, 其对应的相关文 本为 "上海地铁一期工程", 且所述输入字符串位于 "上海地铁一期工 程"之后,通过对所述相关文本进行自然语言处理,提取焦点词语为 "工 程",并将"工程"作为上下文。进一步地,因此,当输入字符串为 "shishi" 时, 该输入设备才艮据所述上下文 "工程", 确定输入候选项为 "实施"、 "实时"、 "试试" 等。
图 5示出根据本发明一个优选实施例的一种用于提供输入字符串 所对应的输入候选项的方法流程图。 具体地, 在步骤 sl,中, 输入设 备获取输入字符串; 在步骤 s2,中, 输入设备确定所述输入字符串的 上下文信息; 在步骤 s31,中, 输入设备根据所述输入字符串, 在输入 词库中进行匹配查询, 以获得与所述输入字符串对应的一个或多个初步 输入候选项; 在步骤 s32,中, 输入设备根据所述上下文信息, 对所述一 个或多个初步输入候选项进行处理, 以获得所述一个或多个输入候选 项; 在步骤 s4'中, 输入设备将所述一个或多个输入候选项中至少一 个提供给所述输入字符串所对应的目标应用。 其中, 所述步骤 sl '、 步骤 s2,、 步骤 s4,与图 4所示对应步骤相同或基本相同, 故此处不再 赘述, 并通过引用的方式包含于此。
上述各步骤之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各步骤分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 初步输 入候选项的获取、 输入候选项的确定、 输入候选项的提供等, 直至输 入设备停止获取输入字符串。 在步骤 s31 '中, 输入设备根据所述输入字符串, 在输入词库中进 行匹配查询, 以获得与所述输入字符串对应的一个或多个初步输入候选 项。 具体地, 在步骤 s31,中, 输入设备通过获取所述输入字符串, 将所 述输入字符串与输入词库中的词进行匹配, 以获得与所述输入字符串对 应的一个或多个初步输入候选项。 例如, 当输入字符串为 "shishi" 时, 根据在输入词库中进行匹配查询后, 获取 "实时"、 "试试"、 "实施"、 "事 实"、 "适时"、 "逝世" 等多个初步输入候选项。
在步骤 s32,中, 输入设备根据所述上下文信息, 对所述一个或多 个初步输入候选项进行处理, 以获得所述一个或多个输入候选项。 具体 地, 在步骤 s32,中, 输入设备根据所述输入字符串的上下文信息, 通过 根据自然语言模型或词语搭配数据库等, 确定上下文信息与初步输入候 选项的搭配概率, 并根据所述搭配概率对所述初步输入候选项进行筛选 或排序, 以获得输入候选项。 例如, 继前例, 当上下文信息为 "客观 ", 则经处理后, 将初步输入候选项进行重新排序, 顺序变为 "事实"、 "实 时"、 "试试"、 "实施"、 "适时"、 "逝世" 等。
优选地, 在步骤 s32,中, 输入设备还可以根据所述上下文信息, 在词语搭配数据库中进行匹配查询, 以确定所述初步输入候选项与所述 上下文信息对应的搭配相关度信息; 根据所述搭配相关度信息, 对所述 一个或多个初步输入候选项进行处理, 以获得所述一个或多个输入候选 项。 具体地, 在步骤 s32,中, 输入设备还可以根据所述上下文信息, 在 词语搭配数据库中进行匹配查询, 通过根据所述词语搭配数据库中的一 个或多个词条与所述上下文的匹配关系等, 确定所述初步输入候选项与 所述上下文信息对应的搭配相关度信息; 例如若或为 bull变量, 则所述 搭配相关度信息表示如是否存在搭配; 或为连续变量, 如所述搭配相关 度信息表示搭配概率为多少; 在此, 所述搭配相关度信息可根据如词语 搭配数据库或其他相关数据库中的上下文与初步输入候选项的组合频 率等通过机器学习获得。 根据所述搭配相关度信息, 通过对所述一个或 多个初步输入候选项进行如筛选或排序处理, 获得所述一个或多个输入 候选项。 更优选地, 所述方法还包括步骤 s5, (未示出)和步骤 s6, (未示 出); 其中, 在步骤 s5'中, 输入设备对一个或多个文本信息进行分析处 理, 以获得搭配频度满足一定阈值的分词搭配关系; 在步骤 s6,中, 输 入设备根据所述分词搭配关系, 建立或更新所述词语搭配数据库。 具体 地, 在步骤 s5'中, 输入设备例如通过对各类日志、 各类文章等进行获 取, 并对所获取文本信息进行如先分词, 后统计相邻词间的共现频率等 分析方法, 当所述共现频率超过一定阈值时, 则判断所述相邻词间存在 一定的搭配关系, 从而获得搭配频度满足一定阈值的分词搭配关系; 在 步骤 s6,中, 输入设备根据所述分词搭配关系, 建立所述词语搭配数据 库, 或对现有词语搭配数据库进行更新等, 在此, 所述词语搭配数据库 中包括但不限于分词搭配关系以及分词搭配关系之间的搭配概率信息; 并且, 所述词语搭配数据库中可包含现有固定词语, 如成语、 俗语等, 同时经过所述更新, 可以将由于现有网络应用的快速发展所产生的新的 词语及表述进行包含, 从而有效提高用户的输入效率。
图 6示出根据本发明另一个优选实施例的一种用于提供输入字符 串所对应的输入候选项的方法流程图。 具体地, 在步骤 si ',中, 输入 设备获取输入字符串; 在步骤 s2"中, 输入设备确定所述输入字符串 的上下文信息; 在步骤 s33"中, 输入设备检测所述输入字符串是否超 出预定的长度阈值; 若所述输入字符串超出所述长度阈值, 在步骤 s34" 中, 输入设备根据所述输入字符串, 以及所述上下文信息, 迭代确定与 所述输入字符串对应的一个或多个输入候选项; 在步骤 s4"中, 输入设 备将所述一个或多个输入候选项中至少一个提供给所述输入字符串 所对应的目标应用。 其中, 所述步骤 sl "、 步骤 s2"、 步骤 s4"与图 4 所示对应步骤相同或基本相同, 故此处不再赘述, 并通过引用的方式 包含于此。
上述各步骤之间是持续不断工作的, 在此, 本领域技术人员应理 解"持续"是指上述各步骤分别实时地或者按照设定的或实时调整的 工作模式要求, 进行输入字符串的获取、 上下文信息的确定、 长度阈 值的检测、 输入候选项的确定、 输入候选项的提供等, 直至输入设备 停止获取输入字符串。
在步骤 s33"中, 输入设备检测所述输入字符串是否超出预定的长 度阈值。 具体地, 在步骤 s33"中, 输入设备通过基于预置的或用户自 行设置的长度阈值, 对所述输入字符串的长度进行检测, 检测所述输入 字符串的长度是否超出了预定的长度阈值。 例如, 当预定的字符长度阈 值为 N, 当所述输入字符串的长度为 N+1时, 则在步骤 s33"中, 输入 设备检测所述输入字符串超出了预定的长度阈值。
若所述输入字符串超出所述长度阈值, 在步骤 s34"中, 输入设备 根据所述输入字符串, 以及所述上下文信息, 迭代确定与所述输入字符 串对应的一个或多个输入候选项。 具体地, 若所述输入字符串超出所述 长度阈值, 在步骤 s34"中, 输入设备通过根据所述输入字符串, 以及 所述上下文信息, 通过例如根据所述长度阈值, 对所述输入字符串进 行分段等处理, 确定与第一个长度阈值的输入字符串所对应的所述输 入候选项, 并将所确定的输入候选项再次作为上下文信息, 从而迭代 确定下一个长度阈值的输入字符串所对应的输入候选项等的方式, 确 定与所述输入字符串对应的一个或多个输入候选项。
优选地, 在步骤 s33"中, 输入设备还可以获取所述输入字符串在 输入词库中对应的一个或多个抽样输入候选项; 检测所述一个或多个抽 样输入候选项中至少一个中的字数是超出预定的字数阈值, 以确定所述 输入字符串是否超出预定的长度阈值。 具体地, 在步骤 s33"中, 输入设 备还可以通过例如将所述输入字符串直接在所述输入词库中进行匹 配, 获取与所述全部输入字符串所对应的一个或多个输入候选项, 并 从中随机抽取或指定抽取(如选择第一个输入候选项等)方式, 获取 所述输入字符串在输入词库中对应的一个或多个抽样输入候选项; 通过 对所述一个或多个抽样输入候选项进行检测, 如所述抽样输入候选项中 的其中至少一个字数超出预定的字数阈值, 则确定所述输入字符串是否 超出预定的长度阈值。
优选地, 在步骤 s34"中, 输入设备还可以当所述输入字符串超出 所述长度阈值, 根据所述上下文信息, 以及所述输入字符串中与所述上 下文信息相邻的部分输入字符串, 确定与所述部分输入字符串对应的一 个或多个部分输入候选项; 根据所述部分输入字符串, 以及所述输入字 符串中其余输入字符串, 确定与所述其余输入字符串对应的一个或多个 其余输入候选项, 其中, 所述部分输入候选项被用作所述其余输入字符 串的上下文信息; 才 据所述一个或多个部分输入候选项, 以及所述一个 或多个其余输入候选项, 确定所述一个或多个输入候选项。
具体地, 当所述输入字符串超出所述长度阈值, 根据所述上下文 信息, 通过例如分词等处理, 对所述输入字符串进行分词或分段等, 从而获取所述输入字符串中与所述上下文信息相邻的部分输入字符 串, 通过将所述部分输入字符串结合所述上下文信息, 确定与所述部 分输入字符串对应的一个或多个部分输入候选项; 在此, 所述确定方 法与图 4 中所述步骤 s 3 中的确定方法相同或相似, 故此处不再赘述, 并通过引用的方式包含于此。 在步骤 s 34"中, 输入设备将所述部分输 入候选项作为其余输入字符串的上下文信息, 通过迭代的方式, 确 定与所述其余输入字符串相对应的一个或多个其余输入候选项; 迭代 后通过例如对字符串之间的关系, 对所述部分输入候选项与其余输入 候选项进行拼接等方式, 确定一个或多个输入候选项。
对于本领域技术人员而言, 显然本发明不限于上述示范性实施例 的细节, 而且在不背离本发明的精神或基本特征的情况下, 能够以其 他的具体形式实现本发明。 因此, 无论从哪一点来看, 均应将实施例 看作是示范性的, 而且是非限制性的, 本发明的范围由所附权利要求 而不是上述说明限定, 因此旨在将落在权利要求的等同要件的含义和 范围内的所有变化涵括在本发明内。 不应将权利要求中的任何附图标 记视为限制所涉及的权利要求。 此外, 显然"包括"一词不排除其他单元 或步骤, 单数不排除复数。 装置权利要求中陈述的多个单元或装置也 可以由一个单元或装置通过软件或者硬件来实现。 第一, 第二等词语 用来表示名称, 而并不表示任何特定的顺序。

Claims

权 利 要 求 书
1. 一种用于提供输入字符串所对应的输入候选项的方法, 其中, 该 方法包括以下步骤:
a获取输入字符串;
b确定所述输入字符串的上下文信息;
c才艮据所述输入字符串, 以及所述上下文信息, 确定与所述输入字 符串对应的一个或多个输入候选项;
d 将所述一个或多个输入候选项中至少一个提供给所述输入字符 串所对应的目标应用。
2. 根据权利要求 1所述的方法, 其中, 所述步骤 c包括:
-根据所述输入字符串, 在输入词库中进行匹配查询, 以获得与所 述输入字符串对应的一个或多个初步输入候选项;
cl 根据所述上下文信息,对所述一个或多个初步输入候选项进行处 理, 以获得所述一个或多个输入候选项。
3. 根据权利要求 2所述的方法, 其中, 所述步骤 cl包括:
-根据所述上下文信息, 在词语搭配数据库中进行匹配查询, 以确 定所述初步输入候选项与所述上下文信息对应的搭配相关度信息;
-根据所述搭配相关度信息, 对所述一个或多个初步输入候选项进 行处理, 以获得所述一个或多个输入候选项。
4. 根据权利要求 3所述的方法, 其中, 该方法还包括:
-对一个或多个文本信息进行分析处理, 以获得搭配频度满足一定 阈值的分词搭配关系;
-根据所述分词搭配关系, 建立或更新所述词语搭配数据库。
5. 根据权利要求 1所述的方法, 其中, 所述步骤 c包括:
-根据所述输入字符串, 以及所述上下文信息, 确定包含所述输入 字符串的增补字符串, 其中, 所述增补字符串还包括所述上下文信息所 对应的字符串;
-根据所述增补字符串, 在输入词库中进行匹配查询, 以获得与所 述增补字符串对应的一个或多个增补输入候选项;
-才艮据所述上下文信息, 对所述一个或多个增补输入候选项进行筛 选处理, 以获得所述一个或多个输入候选项。
6. 根据权利要求 1至 5中任一项所述的方法, 其中, 所述步骤 b包 括:
- 通过对所述输入字符串所对应的相关文本进行自然语言处理, 从 所述相关文本提取对应的焦点词语, 以作为所述上下文, 其中, 所述焦 点词语邻近所述输入字符串所对应的输入位置。
7. 根据权利要求 1至 6中任一项所述的方法, 其中, 所述步骤 c包 括:
c2检测所述输入字符串是否超出预定的长度阈值;
c3 若所述输入字符串超出所述长度阈值,根据所述输入字符串, 以 及所述上下文信息, 迭代确定与所述输入字符串对应的一个或多个输入 候选项。
8. 根据权利要求 7所述的方法, 其中, 所述步骤 c2包括:
- 获取所述输入字符串在输入词库中对应的一个或多个抽样输入候 选项;
-检测所述一个或多个抽样输入候选项中至少一个中的字数是超出 预定的字数阈值, 以确定所述输入字符串是否超出预定的长度阈值。
9. 根据权利要求 7或 8所述的方法, 其中, 所述步骤 c3包括:
- 当所述输入字符串超出所述长度阈值, 根据所述上下文信息, 以 及所述输入字符串中与所述上下文信息相邻的部分输入字符串, 确定与 所述部分输入字符串对应的一个或多个部分输入候选项;
-根据所述部分输入字符串, 以及所述输入字符串中其余输入字符 串, 确定与所述其余输入字符串对应的一个或多个其余输入候选项, 其 中, 所述部分输入候选项被用作所述其余输入字符串的上下文信息;
-才艮据所述一个或多个部分输入候选项, 以及所述一个或多个其余 输入候选项, 确定所述一个或多个输入候选项。
10. 一种用于提供输入字符串所对应的输入候选项的输入设备, 其 中, 该设备包括:
获取装置, 用于获取输入字符串;
上下文确定装置, 用于确定所述输入字符串的上下文信息; 候选项确定装置,用于才艮据所述输入字符串, 以及所述上下文信息, 确定与所述输入字符串对应的一个或多个输入候选项;
提供装置, 用于将所述一个或多个输入候选项中至少一个提供给所 述输入字符串所对应的目标应用。
11. 根据权利要求 10所述的输入设备, 其中, 所述候选项确定装置 包括:
匹配单元,用于根据所述输入字符串,在输入词库中进行匹配查询, 以获得与所述输入字符串对应的一个或多个初步输入候选项;
处理单元, 用于根据所述上下文信息, 对所述一个或多个初步输入 候选项进行处理, 以获得所述一个或多个输入候选项。
12. 根据权利要求 11所述的输入设备, 其中, 所述处理单元用于:
-根据所述上下文信息, 在词语搭配数据库中进行匹配查询, 以确 定所述初步输入候选项与所述上下文信息对应的搭配相关度信息;
-根据所述搭配相关度信息, 对所述一个或多个初步输入候选项进 行处理, 以获得所述一个或多个输入候选项。
13. 根据权利要求 12所述的输入设备, 其中, 该设备还包括: 文本处理装置, 用于对一个或多个文本信息进行分析处理, 以获得 搭配频度满足一定阈值的分词搭配关系;
建立装置, 用于根据所述分词搭配关系, 建立或更新所述词语搭配 数据库。
14. 根据权利要求 10所述的输入设备, 其中, 所述候选项确定装置 用于:
-根据所述输入字符串, 以及所述上下文信息, 确定包含所述输入 字符串的增补字符串, 其中, 所述增补字符串还包括所述上下文信息所 对应的字符串;
-根据所述增补字符串, 在输入词库中进行匹配查询, 以获得与所 述增补字符串对应的一个或多个增补输入候选项;
-才艮据所述上下文信息, 对所述一个或多个增补输入候选项进行筛 选处理, 以获得所述一个或多个输入候选项。
15. 根据权利要求 10至 14中任一项所述的输入设备, 其中, 所述 上下文确定装置用于:
- 通过对所述输入字符串所对应的相关文本进行自然语言处理, 从 所述相关文本提取对应的焦点词语, 以作为所述上下文, 其中, 所述焦 点词语邻近所述输入字符串所对应的输入位置。
16. 根据权利要求 10至 15中任一项所述的输入设备, 其中, 所述 候选项确定装置包括:
检测单元, 用于检测所述输入字符串是否超出预定的长度阈值; 迭代单元, 用于若所述输入字符串超出所述长度阈值, 根据所述输 入字符串, 以及所述上下文信息, 迭代确定与所述输入字符串对应的一 个或多个输入候选项。
17. 根据权利要求 16所述的输入设备, 其中, 所述检测单元用于:
- 获取所述输入字符串在输入词库中对应的一个或多个抽样输入候 选项;
-检测所述一个或多个抽样输入候选项中至少一个中的字数是超出 预定的字数阈值, 以确定所述输入字符串是否超出预定的长度阈值。
18. 根据权利要求 16或 17所述的输入设备, 其中, 所述迭代单元 用于:
- 当所述输入字符串超出所述长度阈值, 根据所述上下文信息, 以 及所述输入字符串中与所述上下文信息相邻的部分输入字符串, 确定与 所述部分输入字符串对应的一个或多个部分输入候选项;
-根据所述部分输入字符串, 以及所述输入字符串中其余输入字符 串, 确定与所述其余输入字符串对应的一个或多个其余输入候选项, 其 中, 所述部分输入候选项被用作所述其余输入字符串的上下文信息;
-才艮据所述一个或多个部分输入候选项, 以及所述一个或多个其余 输入候选项, 确定所述一个或多个输入候选项。
PCT/CN2013/086968 2012-12-31 2013-11-12 一种用于提供输入字符串所对应的输入候选项的方法与设备 Ceased WO2014101577A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP13867100.3A EP2940557B1 (en) 2012-12-31 2013-11-12 Method and device used for providing input candidate item corresponding to input character string
US14/412,287 US20150293972A1 (en) 2012-12-31 2013-11-12 Method and device used for providing input candidate items corresponding to an input character string
JP2015549962A JP6114403B2 (ja) 2012-12-31 2013-11-12 入力文字列に対応する入力候補アイテムを提供する方法及び装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210592774.9A CN103076892B (zh) 2012-12-31 2012-12-31 一种用于提供输入字符串所对应的输入候选项的方法与设备
CN201210592774.9 2012-12-31

Publications (1)

Publication Number Publication Date
WO2014101577A1 true WO2014101577A1 (zh) 2014-07-03

Family

ID=48153448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086968 Ceased WO2014101577A1 (zh) 2012-12-31 2013-11-12 一种用于提供输入字符串所对应的输入候选项的方法与设备

Country Status (5)

Country Link
US (1) US20150293972A1 (zh)
EP (1) EP2940557B1 (zh)
JP (1) JP6114403B2 (zh)
CN (1) CN103076892B (zh)
WO (1) WO2014101577A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104808808A (zh) * 2015-03-23 2015-07-29 联想(北京)有限公司 一种信息处理方法及电子设备
CN111832310A (zh) * 2019-04-23 2020-10-27 北京嘀嘀无限科技发展有限公司 一种文本处理方法及装置
CN112684905A (zh) * 2019-10-17 2021-04-20 北京搜狗科技发展有限公司 一种学词方法、装置和电子设备

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3143771B2 (ja) 1995-03-31 2001-03-07 新日本製鐵株式会社 スクラップの予熱・溶解装置および方法
CN103076892B (zh) * 2012-12-31 2016-09-28 百度在线网络技术(北京)有限公司 一种用于提供输入字符串所对应的输入候选项的方法与设备
CN103353824B (zh) * 2013-06-17 2016-08-17 百度在线网络技术(北京)有限公司 语音输入字符串的方法、装置和终端设备
CN103440299B (zh) * 2013-08-20 2016-12-28 陈喜 一种基于焦点上下文联想词的信息快速输入方法
TW201514726A (zh) * 2013-10-14 2015-04-16 Chi-Lin Hong 一種串聯式文字輸入裝置和方法
CN104111738A (zh) * 2014-06-06 2014-10-22 珠海市魅族科技有限公司 一种字符关联方法及终端
CN105302332A (zh) * 2014-07-25 2016-02-03 中国移动通信集团公司 一种拼音输入法及其实现装置
TWI518616B (zh) * 2014-09-24 2016-01-21 國立清華大學 穿搭評選方法與電子裝置
CN104766077B (zh) * 2015-04-03 2017-04-12 北京奇虎科技有限公司 一种识别图片中的字符的方法和装置
CN104809192B (zh) * 2015-04-22 2019-06-18 北京奇虎科技有限公司 提取输入法候选项的方法以及装置
CN104917669A (zh) * 2015-05-29 2015-09-16 北京搜狗科技发展有限公司 一种信息处理方法和装置
CN105404401A (zh) * 2015-11-23 2016-03-16 小米科技有限责任公司 输入处理方法、装置及设备
CN105653061B (zh) * 2015-12-29 2020-03-31 北京京东尚科信息技术有限公司 针对拼音输入法的词条检索及错词检测的方法和系统
CN105653064A (zh) * 2016-01-07 2016-06-08 珠海市魅族科技有限公司 一种输入方法及装置
CN105511642A (zh) * 2016-01-07 2016-04-20 珠海市魅族科技有限公司 一种输入方法及装置
CN109074354B (zh) * 2016-07-22 2024-04-02 荣耀终端有限公司 展示候选项的方法和终端设备
CN107765883A (zh) * 2016-08-22 2018-03-06 富士通株式会社 输入法的候选词语的排序方法和排序设备
CN106527752B (zh) * 2016-09-23 2019-03-19 百度在线网络技术(北京)有限公司 一种用于提供输入候选项的方法与装置
CN106484135B (zh) * 2016-09-23 2019-03-19 百度在线网络技术(北京)有限公司 一种用于提供输入候选项的方法与装置
US11151130B2 (en) * 2017-02-04 2021-10-19 Tata Consultancy Services Limited Systems and methods for assessing quality of input text using recurrent neural networks
CN108509058B (zh) * 2017-02-28 2022-08-16 微软技术许可有限责任公司 输入方法与相关设备
CN108536653B (zh) * 2017-03-03 2022-09-30 北京搜狗科技发展有限公司 一种输入方法、装置和用于输入的装置
US10493798B2 (en) 2017-03-24 2019-12-03 Cnh Industrial America Llc Air strut suspension system for a self-propelled high ground clearance product applicator
CN109917927B (zh) * 2017-12-13 2022-07-08 北京搜狗科技发展有限公司 一种候选项确定方法和装置
US11132622B2 (en) * 2017-12-27 2021-09-28 International Business Machines Corporation Autonomous system for hypotheses generation
CN109976548B (zh) * 2017-12-28 2022-07-19 北京搜狗科技发展有限公司 一种输入方法及输入装置
CN109164921B (zh) * 2018-07-09 2023-04-07 北京左医科技有限公司 聊天框动态显示输入建议的控制方法及装置
CN110858099B (zh) * 2018-08-20 2024-04-12 北京搜狗科技发展有限公司 候选词生成方法及装置
CN109634436B (zh) * 2018-10-25 2023-11-10 平安科技(深圳)有限公司 输入法的联想方法、装置、设备及可读存储介质
CN112000877B (zh) * 2020-07-15 2024-10-01 北京搜狗科技发展有限公司 一种数据处理方法、装置和介质
CN112130673B (zh) * 2020-09-29 2025-07-01 上海松鼠课堂人工智能科技有限公司 基于深度强化学习的智能输入方法和系统
CN117037184A (zh) * 2023-10-10 2023-11-10 深圳牛图科技有限公司 一种基于云匹配的ocr模糊识别系统及方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246410A (zh) * 2007-02-12 2008-08-20 谷歌股份有限公司 上下文或语境输入法和系统
CN102346743A (zh) * 2010-08-02 2012-02-08 腾讯科技(深圳)有限公司 生成候选词的方法及装置
CN103076892A (zh) * 2012-12-31 2013-05-01 百度在线网络技术(北京)有限公司 一种用于提供输入字符串所对应的输入候选项的方法与设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7149550B2 (en) * 2001-11-27 2006-12-12 Nokia Corporation Communication terminal having a text editor application with a word completion feature
US9606634B2 (en) * 2005-05-18 2017-03-28 Nokia Technologies Oy Device incorporating improved text input mechanism
JP4547366B2 (ja) * 2006-11-09 2010-09-22 株式会社ソニー・コンピュータエンタテインメント 文字入力装置、その制御方法、プログラム及び情報記憶媒体
US7809719B2 (en) * 2007-02-08 2010-10-05 Microsoft Corporation Predicting textual candidates
CN100458795C (zh) * 2007-02-13 2009-02-04 北京搜狗科技发展有限公司 一种智能组词输入的方法和一种输入法系统及其更新方法
CN101266520B (zh) * 2008-04-18 2013-03-27 上海触乐信息科技有限公司 一种可实现灵活键盘布局的系统
ATE501478T1 (de) * 2008-06-11 2011-03-15 Exb Asset Man Gmbh Vorrichtung und verfahren mit verbessertem texteingabemechanismus
CN102253929A (zh) * 2011-06-03 2011-11-23 北京搜狗科技发展有限公司 一种提示用户输入字符的方法和装置
US9026429B2 (en) * 2012-12-05 2015-05-05 Facebook, Inc. Systems and methods for character string auto-suggestion based on degree of difficulty

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246410A (zh) * 2007-02-12 2008-08-20 谷歌股份有限公司 上下文或语境输入法和系统
CN102346743A (zh) * 2010-08-02 2012-02-08 腾讯科技(深圳)有限公司 生成候选词的方法及装置
CN103076892A (zh) * 2012-12-31 2013-05-01 百度在线网络技术(北京)有限公司 一种用于提供输入字符串所对应的输入候选项的方法与设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2940557A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104808808A (zh) * 2015-03-23 2015-07-29 联想(北京)有限公司 一种信息处理方法及电子设备
CN111832310A (zh) * 2019-04-23 2020-10-27 北京嘀嘀无限科技发展有限公司 一种文本处理方法及装置
CN111832310B (zh) * 2019-04-23 2024-04-16 北京嘀嘀无限科技发展有限公司 一种文本处理方法及装置
CN112684905A (zh) * 2019-10-17 2021-04-20 北京搜狗科技发展有限公司 一种学词方法、装置和电子设备

Also Published As

Publication number Publication date
EP2940557B1 (en) 2022-11-02
US20150293972A1 (en) 2015-10-15
CN103076892B (zh) 2016-09-28
CN103076892A (zh) 2013-05-01
JP2016508264A (ja) 2016-03-17
EP2940557A1 (en) 2015-11-04
JP6114403B2 (ja) 2017-04-12
EP2940557A4 (en) 2016-11-02

Similar Documents

Publication Publication Date Title
WO2014101577A1 (zh) 一种用于提供输入字符串所对应的输入候选项的方法与设备
CN110020422B (zh) 特征词的确定方法、装置和服务器
CN105786782B (zh) 一种词向量的训练方法和装置
CN101996195B (zh) 音频文件中语音信息的搜索方法、装置及设备
CN108701161B (zh) 为搜索查询提供图像
CN111967262A (zh) 实体标签的确定方法和装置
CN113342946A (zh) 客服机器人的模型训练方法、装置、电子设备及介质
CN105335348B (zh) 基于目标语句的依存句法分析方法、装置及服务器
CN114021577A (zh) 内容标签的生成方法、装置、电子设备及存储介质
WO2018205389A1 (zh) 语音识别方法、系统、电子装置及介质
US10713302B2 (en) Search processing method and device
CN103902619B (zh) 一种网络舆情监控方法及系统
WO2007143914A1 (en) Method, device and inputting system for creating word frequency database based on web information
CN112269862B (zh) 文本角色标注方法、装置、电子设备和存储介质
CN107301170A (zh) 基于人工智能的切分语句的方法和装置
CN111209439B (zh) 视频片段检索方法、装置、电子设备及存储介质
US10949418B2 (en) Method and system for retrieval of data
CN111460289A (zh) 新闻资讯的推送方法和装置
CN108628822A (zh) 无语义文本的识别方法及装置
CN111737398B (zh) 文本中的敏感词的检索方法、装置、电子设备及存储介质
CN106095912B (zh) 用于生成扩展查询词的方法和装置
CN112270173A (zh) 文本中的人物挖掘方法、装置、电子设备及存储介质
CN115994535A (zh) 文本处理方法及装置
CN111460257A (zh) 专题生成方法、装置、电子设备和存储介质
CN107291259A (zh) 一种信息显示方法、装置和用于信息显示的装置

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: 13867100

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015549962

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14412287

Country of ref document: US

Ref document number: 2013867100

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE