# Patent

## Title
Feature-based candidate selection

## Abstract

A candidate for selection or insertion may be based on extracted candidate features and reference features. The candidate features may be scored and ranked while candidates may be removed from consideration based on criteria. The remaining candidates may be presented for selection and/or insertion.

## Background
RELATED APPLICATION
This application is a national stage application of an international patent application PCT/CN2012/080749, filed Aug. 30, 2012, which application is hereby incorporated by reference in its entirety.
TECHNICAL FIELD
This disclosure relates generally to an input method editor (IME), and more particularly, to an IME with multiple operating modes.
BACKGROUND
An input method editor (IME) is a computer functionality that assists a user to input text into a host application of a computing device. An IME may provide several suggested words and phrases based on received inputs from the user as candidates for insertion into the host application. For example, the user may input one or more initial characters of a word or phrase and an IME, based on the initial characters, may provide one or more suggested words or phrases for the user to select a desired one.
For another example, an IME may also assist the user to input non-Latin characters such as Chinese. The user inputs Latin characters through a keyboard and the IME returns one or more Chinese characters as candidates for insertion into the host application based on the Latin characters. The user may then select the proper character and insert it into the host application. As many typical keyboards support inputting Latin characters, the IME is useful for the user to input non-Latin characters using a Latin-character keyboard.
The candidates selected by the user can be inserted into various host applications, such as a chatting application, a document editing application, an email application, a drawing application, a gaming application, etc.
SUMMARY
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. The term “techniques,” for instance, may refer to device(s), system(s), method(s) and/or computer-readable instructions as permitted by the context above and throughout the present disclosure.
This disclosure describes techniques to provide alternate candidates for selection and/or insertion by a user through an input method editor (IME). In various embodiments, an IME is executable by a computing device. The IME may present candidates to a user for insertion into a host application. The IME may present different types of candidates depending on the input by the user and context of the input. The IME may provide both text candidates and alternate candidates in a form that is different from the form of the input.



BRIEF DESCRIPTION OF THE DRAWINGS
The Detailed Description is set forth with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different figures indicates similar or identical items.
FIG. 1 is a block diagram of an example configuration of an IME according to at least one embodiment.
FIG. 2 is a pictorial view of an example of a host application utilizing an IME according to at least one embodiment.
FIG. 3 shows an illustrative representative computing device and environment for implementing an IME.
FIG. 4 is a flow diagram of an example process preformed by an IME according to at least one embodiment.



DETAILED DESCRIPTION
Overview
This disclosure describes techniques to relate an input method editor (IME) that presents candidates to a user that may be selected by the user for insertion into a host application. The candidates presented to the user may be based at least in part on a user-selectable mode of the IME. The candidates may include text candidates such as non-Latin or Chinese characters, and rich candidates such as multimedia candidates, in order to provide supplemental information to a user and to enhance the user experience. Additionally or alternatively, the candidates may be based at least in part on the context of user input, which may include, but is not limited to, the host application, previous user input, adjacent user input, a combination thereof, and other contextual information. Additionally or alternatively, the candidates may, upon user selection, replace or augment the entered text.
In various embodiments, the user inputs are one or more of textual characters or symbols input by the user into a composition window of an IME. The user input may represent one or more expressions, search queries, parts thereof, or combinations thereof. For example, a user input may be a series of initial characters, an abbreviation, a spelling, and/or a translation of one or more words or phrases. The user inputs and the expressions represented by the user inputs, such as words or phrases, may be in the same or different languages. The user may input the user inputs through a variety of input methods, such as a keyboard input, a voice input, a touch screen input, a gesture, a movement, or a combination thereof.
In various embodiments, candidates are provided in alternate forms from a user input. For example, if the user inputs text, then alternate candidates may be provided in the form of image(s), video(s), audio file(s), web link(s), web page(s), map(s), other multimedia file(s), or a combination thereof.
In various embodiments, candidates are ranked according to the relevancies to the user inputs and/or the context of the user input.
Illustrative System Model
FIG. 1 shows an exemplary system model of an IME. For example, IME 100 may comprise a candidate manager 102 and an insertion manager 104. The candidate manager 102 comprises an analyzer 106 that analyzes a user input, a context of the user input, or a combination thereof. For example, the analyzer 106 may analyze the user input in the form of text to infer what the input represents. The analyzer 106 may also determine the context of the user input. For example, a context of the user input includes, but is not limited to, the host program that the IME is supporting, past and/or separate input made by the user in the same IME session, input made by a participant in the host program adjacent to the current input, location of the user, other factors, or a combination thereof.
In various embodiments, if personal information such as location information, conversation or search contents is stored or transmitted, then the user may have an opportunity to decide to allow the collection, storage, and/or transmittal, and/or an opportunity to discontinue the same. In various embodiments, if personal information is stored or transmitted, adequate security measures and features are in place to secure the personal data. Additionally or alternatively, context may comprise triggering words or phrases. For example, a user may input the phrase “photo of” directly before an input indicating that alternative candidates are sought. In this example, the phrase “photo of” may provide context that a user is interested in seeing an image or photo of the input that follows. Other illustrative triggering words or phrases may include, but are not limited to, “image”, “video”, “sound”, “hear”, “nearby”, “picture”, “let me see”, “have a look at”, “did you see”, and the like. It is understood that triggering words or phrases may be specific to a culture and/or a language.
In various embodiments, both the content and context of the user input are used to inform selection of the candidates. In a possible embodiment, the context and content of the user input is used to formulate a search to gather candidates. In one example, a user inputs the text “forbidden city” into a chat program while several lines or entries prior to entering “forbidden city,” the user or a third party previously input the term “moat.” In this example, the content of the input may be “forbidden city” and the context of the input may be a chat program and the textual input “moat.”
In this example, the candidate manager 102 may cause a search of images, videos, audio files, graphics, others, or a combination thereof to find a “moat” at, near, belonging to, or in the “forbidden city.” This example may differ from a search that does not take into account the context of the user input.
In various embodiments, the search caused by the candidate manager 102 may be facilitated by a search engine, for example, a commercial search engine on a search engine computing device capable of searching various forms of media. For example, the search engine computing device may select a search engine, such as Bing®, Google®, Yahoo®, Alibaba®, or the like, to gather candidates. The candidates may include, for example, web search results, video search results, image search results, audio file search results or dictionary and encyclopedia search results.
In various embodiments, the search caused by the candidate manager 102 may be based at least in part on content of a user input and/or context of the user input.
In various embodiments, the search caused by the candidate manager 102 may return candidates with any surrounding text, metadata associated with the candidate, or a combination thereof.
In various embodiments, the search caused by the candidate manager 102 may return candidates with results information in a ranked format. For example, the results information may include the ranked format and may provide a set of top results, a set of tail or lowest results, and/or duplicate candidates.
In various embodiments, the candidate manager 102 selects one or more references from the candidates. For example, several reference images may be selected from a set of all candidate images returned by the search engine. The reference images may be selected based at least in part on the rank and number of duplicate or similar images returned. For example, the top N candidate images returned from the search, where N is an integer greater than or equal to zero, may be considered as possible reference images. Additionally or alternatively, the bottom M candidate images or tail candidate images returned from the search, where M is an integer greater than or equal to zero, may be considered as possible images to avoid as reference images. Additionally or alternatively, the number of duplicate or similar images may be considered as possible reference images. For example, if a first candidate image has more duplicates or similar images than a second candidate image, then the first candidate image may be considered a better reference image than the second candidate image. Additionally or alternatively, the number of duplicate or similar images may be indicative of the popularity, trendiness, or similar aspect of the candidate image.
Additionally or alternatively, the candidate manager 102 may include an extractor 108. In various embodiments, the extractor 108 may extract features of the references. For example, the extractor 108 may extract features from candidate images selected to be reference images. In various embodiments, the features extracted from the reference images may comprise average features.
Additionally or alternatively, the extractor 108 may extract features from the candidate images that were not selected as reference images. In various embodiments, the extracted features from the candidate images are compared to the extracted features from the reference images. For example, a cosine distance between the features extracted from the candidate image and the features extracted from the reference image may be calculated. Additionally or alternatively, information contained in the metadata or surrounding text of the candidate image may be compared to the information contained in the metadata or surrounding text of the reference image. For example, a cosine difference is calculated between the two.
In various embodiments, each extracted feature and comparison to a reference may comprise a dimension of the candidate. Each dimension of the candidate may be used to determine its score, rank, suitability for presentation to a user, or a combination thereof. In various embodiments, the number of dimensions assembled may be large. Additionally or alternatively, a value or weight of a first dimension in comparison with a second dimension need not be evaluated or determined in this module or at the analogous stage in a related process or method.
Additionally or alternatively, the candidate manager 102 may include a classifier 110. In various embodiments, the classifier 110 may classify each candidate. For example, the classifier 110 may use the dimensions associated with a candidate image to assign a score to the candidate image. In various embodiments, the classifier may be manually programmed, seeded with initial correlations between a feature and a score where the model is expanded with subsequent searches or additions, generated by a logic engine, or a combination thereof. Additionally or alternatively, the classifier may be developed, updated, maintained offline, online, or a combination thereof. Additionally or alternatively, a regression model may be used to map a relative feature of an image reflected in a dimension to a score. In various embodiments, the score may be aggregated for each candidate image to generate a candidate score.
Additionally or alternatively, the candidate manager 102 may include a ranker 112. In various embodiments, the ranker 112 may rank each candidate. For example, the ranker 112 may rank each candidate image based at least in part on a candidate score.
Additionally or alternatively, the candidate manager 102 may include a selection process where candidates are one or more of selected, made available for selection, made unavailable for selection, removed from consideration, or a combination there of. For example, candidate manager 102 may include a reducer 114. In various embodiments, the reducer 114 may reduce the number of candidates considered. For example, the reducer 114 may remove from consideration each candidate image based at least in part on a candidate score. In various embodiments, a candidate with a candidate score below a threshold will be removed from consideration.
Additionally or alternatively, the candidate manager 102 may include a duplicate remover 116. In various embodiments, the duplicate remover 116 may be included as part of the selection process. In various embodiments, the duplicate remover 116 may reduce the number of candidates considered. For example, the duplicate remover 116 may remove duplicate images from the candidate images. Additionally or alternatively, the duplicate remover 116 may remove exact duplicates as well as candidate images that are similar to each other. For example, if the difference between a first and a second candidate image is below a threshold difference or within a similarity threshold, then the first and second candidate images may be considered sufficiently similar or duplicative of each other. In this example, the duplicate remover 116 may remove either the first or the second candidate image from consideration and/or make the candidate unavailable for selection.
For example, as discussed above, in various embodiments, the content of the user input and the context of the user input is used to inform and determine the candidates to be presented. In various embodiments, the context and content of the user input is used to formulate a search to gather candidates, extract features, classifier candidates, and/or rank candidates. For example, a user inputs the text “forbidden city” into a chat program. However, several lines or entries prior to entering the text “forbidden city,” the user and a third party input the term “moat.” In this example, the content of the input may be “forbidden city” and the context of the input may be a chat program and the textual input “moat.”
In this example, the candidate manager 102 may cause a search of images, videos, audio files, graphics, others, or a combination thereof to find a “moat” at, near, belonging to, or in the “forbidden city.” This example may differ from a search that does not take into account the context of the user input, but merely searches for the “forbidden city.” In this example, the search for “forbidden city” may or may not return an image of the Forbidden City containing its moat. Additionally or alternatively, the extractor 108 may extract features and create dimensions related to the term “moat.” Additionally or alternatively, the classifier 110 may map a higher score to an image containing a dimension related to a moat feature than to an image without a dimension related to a moat feature. Additionally or alternatively, the ranker 112 may rank a candidate image containing a moat higher than a candidate image without a moat. In this example, by taking into account the context of the input related to “forbidden city,” the previously used term “moat,” may result in a more desirable set of candidate images when, for example, the user desires an image of the moat at the Forbidden City and not an image of the Forbidden City itself.
Additionally or alternatively, IME 100 may comprise the insertion manager 104. In various embodiments, the insertion manager 104 includes an inserter 118 that may provide candidates to a user for insertion. For example, the inserter 118 may cause a subset of the candidate images to be displayed to a user based at least in part on the user input, the context of the user input, the remaining candidates, or a combination thereof. For example, if the user is inputting text into a chat program, the inserter 118 may identify the chat program as the host program for the IME and display an appropriate number of candidate images at one time. Additionally or alternatively, the inserter 118 may show all of the available candidate images at the same time.
FIG. 2 shows a pictorial view of an example of a host application utilizing an IME according to at least one embodiment. For example, FIG. 2 shows an example 200 of host application 202 utilizing an IME according to various embodiments. Host application 202 is shown here as a chat application. Host application 202 may also be document-editing application, a drawing application, an email application, or various other applications.
In the illustrated example, host application 202 includes a text insertion area, generally indicated by 204. Text insertion area 204 includes characters inserted directly into the host application by the user or via IME 206. Text insertion area 204 also includes an input indication represented by “|,” which represents an indication of where the candidates are to be inserted into host application 202 by, for example, insertion manager 104. The input indication may be, for example, a focus of a mouse. The input indication also indicates which host application 202 of a computing device among many host applications running on the computing device that is to receive the candidates inserted by IME 206. In one particular example, multiple host applications may utilize the features of IME 206 simultaneously and the user may switch between one or more of the host applications to receive the candidates by moving the input indication between the host applications.
In the illustrated example, IME 206 is operating to insert Chinese characters into host application 202 using pinyin.
IME 206 is shown as user interface 208, which includes composition window 210 for receiving user inputs, text candidate window 212 for presenting text candidates to the user, and alternate candidate window 214 for presenting alternate forms of candidates to the user. Text candidate window 212 is shown including previous and next candidate arrows 216, which the user can interact with to receive additional text candidates not currently shown in text candidate window 212. Alternate candidate window 214 is also shown including a previous and next candidate arrows 218, which the user can interactive with to receive additional alternate candidates not currently shown in alternate candidate window 214.
While various alternate candidate modes are illustrated, other alternate candidate modes may be used without departing from the scope of the present disclosure. For example, IME 206 may include an audio mode where, for example, an alternate candidate may include audio files, such as Moving Picture Experts Group (MPEG) MPEG-1 or MPEG-2 Audio Layer III (mp3) files. Additionally or alternatively, IME 206 may include a video mode where, for example, an alternate candidate may include videos. Additionally or alternatively, IME 206 may include graphical text where, for example, an alternate candidate may include graphical text. An example of a graphical text may include but is not limited to a graphics file (e.g., an image file) containing text. Additionally or alternatively, IME 206 may include animated graphical images where, for example, an alternate candidate may include an animated graphical image. By interacting with the previous and next candidate arrows 216, the user may gain access to these additional rich candidate modes at the rich candidate mode menu. Additionally or alternatively, the IME 206 may take context of the user input into account and display one type before another type, or a combination of two or all possible types.
In the illustrated example, the user has entered the text “ha'ha.” As a result of the user entering text in this context, IME 206 is in alternate candidate mode. While in alternate candidate mode, text candidate window 212 continues to translate the text “ha'ha” from pinyin into Chinese characters. On the other hand, alternate candidate window 214 presents image search results for the text “ha'ha” to the user. As illustrated, alternate candidate window 214 presents options 2-5 including images of various cartoon animals laughing.
In various embodiments, the user may cause IME 206 to insert either the Chinese characters indicated in text candidate window 212 into host application 202 at text insertion area 204 by entering “1”, or an image as shown in alternate candidate window 214 by entering “2”, “3”, “4”, or “5”. Other user selection options may be used without departing from the scope of the present disclosure.
Illustrative Computing Device and Illustrative Operational Environment
FIG. 3 illustrates a representative computing device 300 that may, but need not necessarily be used to, implement the system and methods described herein, in accordance with various embodiments. The techniques and mechanisms described herein may be implemented by multiple instances of the computing device 300, as well as by any other computing device, system, and/or environment. The computing device 300 shown in FIG. 3 is only one example of a computing device and is not intended to suggest any limitation as to the scope of use or functionality of any computing device utilized to perform the processes and/or procedures described above.
In at least one configuration, the computing device 300 includes at least one processor 302 and system memory 304. The processor(s) 302 may execute one or more modules and/or processes to cause the computing device 300 to perform a variety of functions. In some embodiments, the processor(s) 302 may include a central processing unit (CPU), a graphics processing unit (GPU), both CPU and GPU, or other processing units or components known in the art. Additionally, each of the processor(s) 302 may possess its own local memory, which also may store program modules, program data, and/or one or more operating systems.
Depending on the exact configuration and type of the computing device 300, the system memory 304 may be volatile (such as RAM), non-volatile (such as ROM, flash memory, miniature hard drive, memory card, or the like) or some combination thereof. The system memory 304 may include an operating system 306, one or more program modules 308, and may include program data 310. The operating system 306 includes a component-based framework 334 that supports components (including properties and events), objects, inheritance, polymorphism, reflection, and provides an object-oriented component-based application programming interface (API). The computing device 300 is of a very basic illustrative configuration demarcated by a dashed line 312. Again, a terminal may have fewer components but may interact with a computing device that may have such a basic configuration.
Program modules 308 may include, but are not limited to, an IME 334, applications 336, and/or other components 338. In various embodiments, the IME 334 may comprise a user interface (UI) 340, candidate manager 102, and/or insertion manager 104. In various embodiments, candidate manager 102 comprises an analyzer 106, an extractor 108, and/or a classifier 110.
The computing device 300 may have additional features and/or functionality. For example, the computing device 300 may also include additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 3 by removable storage 314 and non-removable storage 316.
The storage devices and any associated computer-readable media may provide storage of computer readable instructions, data structures, program modules, and other data. Computer-readable media includes, at least, two types of computer-readable media, namely computer storage media and communication media.
Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules, or other data.
Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that may be used to store information for access by a computing device.
In contrast, communication media may embody computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, or other transmission mechanism. As defined herein, computer storage media does not include communication media.
Moreover, the computer-readable media may include computer-executable instructions that, when executed by the processor(s) 302, perform various functions and/or operations described herein.
The computing device 300 may also have input device(s) 318 such as a keyboard, a mouse, a pen, a voice input device, a touch input device, etc. Output device(s) 320, such as a display, speakers, a printer, etc. may also be included.
The computing device 300 may also contain communication connections 322 that allow the device to communicate with other computing devices 324, such as over a network. By way of example, and not limitation, communication media and communication connections include wired media such as a wired network or direct-wired connections, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media. The communication connections 322 are some examples of communication media. Communication media may typically be embodied by computer readable instructions, data structures, program modules, etc.
FIG. 3 also shows a schematic diagram of an illustrative operating environment where an illustrative system may operate. For example, various embodiments of the system may operate on the computing device 300. The computing device 300 may interact with a user device 326 directly or indirectly. The computing device may be connected to a network 328. The network device 328 may provide access to other computing devices 324 including a server 330, mobile devices 332, and/or other connections and/or resources. Connections may be wired or wireless.
The illustrated computing device 300 is only one example of a suitable device and is not intended to suggest any limitation as to the scope of use or functionality of the various embodiments described. Other well-known computing devices, systems, environments and/or configurations that may be suitable for use with the embodiments include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, game consoles, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, implementations using field programmable gate arrays (“FPGAs”) and application specific integrated circuits (“ASICs”), and/or the like.
The implementation and administration of a shared resource computing environment on a single computing device may enable multiple computer users to concurrently collaborate on the same computing task or share in the same computing experience without reliance on networking hardware such as, but not limited to, network interface cards, hubs, routers, servers, bridges, switches, and other components commonly associated with communications over the Internet, as well without reliance on the software applications and protocols for communication over the Internet.
Additionally or alternatively, the computing device 300 implementing IME 334 may be in communication with one or more search engine computing devices 342 via, for example, network 328.
Communication connection(s) 322 are accessible by processor(s) 302 to communicate data to and from the one or more search engine computing devices 342 over a network, such as network 328. Search engine computing devices 342 may be configured to perform the search using one or more search engines 344. Search engines 344 may be a generic search engine such as Bing®, Google®, or Yahoo®, a combination of search engines, or a custom search engine configured to operate in conjunction with IME 334 (such as a translation engine). Search engines 344 may also be a specialized form of a search engine such as Bing®, Maps, or Google® image search.
It should be understood that IME 334 may be used in an environment or in a configuration of universal or specialized computer systems. Examples include a personal computer, a server computer, a handheld device or a portable device, a tablet device, a multi-processor system, a microprocessor-based system, a set-up box, a programmable customer electronic device, a network PC, and a distributed computing environment including any system or device above.
Illustrative Processes
For ease of understanding, the processes discussed in this disclosure are delineated as separate operations represented as independent blocks. However, these separately delineated operations should not be construed as necessarily order dependent in their performance. The order in which the processes are described is not intended to be construed as a limitation, and any number of the described process blocks may be combined in any order to implement the process, or an alternate process. Moreover, it is also possible that one or more of the provided operations may be modified or omitted.
The processes are illustrated as a collection of blocks in logical flowcharts, which represent a sequence of operations that may be implemented in hardware, software, or a combination of hardware and software. For discussion purposes, the processes are described with reference to the system shown in FIGS. 1-3. However, the processes may be performed using different architectures and devices.
FIG. 4 is a flowchart of an illustrative process 400 of providing one or more candidates based at least in part on an input. At 402, an input is received by an IME. This input may be from a user and may comprise text, graphics, gesture, voice, sound, motion, or a combination thereof and may be received from a keyboard, a microphone or voice input mechanism, a mouse, a touch screen and/or a combination thereof. Additionally or alternatively, the input may be received with context of the input. Context may comprise a host application that an IME is supporting. Additionally or alternatively, context may comprise words or phrases inputted by the user separate from the input, adjacent to the input, or a combination thereof.
At 404, the IME may analyze the content of the input as well as the context of the input. The content and the context may, together or separately, be used by the IME to determine whether alternate candidates should be provided. For example, if an input is directly adjacent to a trigger phrase, that context may increase the likelihood that a user is interested in an alternate candidate and alternate candidates may be provided.
At 406, the IME may gather one or more candidates. For example, the received input may be formulated into a query and sent to a search engine. Additionally or alternatively, aspects of the context may influence the query, by for example, adding additional or excluding relevant query terms. In various embodiments, the query will return results in the form of ranked results. The ranked results may include a number of top ranked results, a number of bottom or tail ranked results, and various duplicate and/or similar results. Additionally or alternatively, the results may also include any metadata associate with each candidate. Additionally or alternatively, the results may also include surrounding text of the candidate.
At 408, the IME may select one or more references from the candidates. The IME may select a reference based at least in part on the rank of a candidate returned from the query and the number of duplicate or similar candidates.
At 410, the IME may extract features from the references. The features extracted from the references may be reference features. In various embodiments, the reference features may be considered average features for the given set of candidates in light of the content and context of the input.
At 412, the IME may extract features from the candidate images. The features extracted from the candidate images may be considered candidate features. In various embodiments, the extracted candidate features are compared to the analogous extracted reference features. A difference between the analogous extracted features may be used to define a dimension associated with the candidate. In various embodiments, extracted features may include features contained in the reference itself, for example, if the reference is an image, the image may contain an image of water where the water feature may be extracted. Additionally or alternatively, the extracted features may include features contained in information associated with the candidate. For example, the image may contain metadata that may be examined and/or extracted. Additionally or alternatively, the image may have been surrounded by text that was returned as part of the query results. The surrounding text may be examined and/or extracted.
At 414, the IME may score each candidate. In various embodiments, a classifier scores each candidate based at least in part on the dimensions and extracted features. In various embodiments, the classifier may be an offline learned or trained model. Additionally or alternatively, the classifier may be manually seeded with initial settings and examples and trained by searching around the seeded material to expand the model coverage and/or increase the models accuracy. In various embodiments, emotive words are the target for replacement by or supplementation with an alternate form. Additionally or alternatively, popular terms, phrases, topics, or a combination thereof, may be mapped using the seed and search method. The IME may use the classifier to map an extracted feature to a score. The score for each feature and/or dimension may be aggregated for each candidate to create a candidate score.
At 416, the IME may rank the candidates based at least in part on the candidate scores.
At 418, the IME may remove candidates based at least in part on a first criteria. In various embodiments, the first criteria comprises whether the candidate score is greater than a threshold score. When a candidate score is lower than the threshold score, the candidate s removed from consideration.
At 420, the IME may remove candidates based at least in part on a second criteria. In various embodiments, the second criteria comprises whether the candidate is duplicative or similar to another candidate. When the candidate is duplicative of another candidate, the IME may remove either the candidate or the another candidate from consideration. Similarly, when the dissimilarity between a candidate and another candidate fails to exceed a threshold of distinction, the IME may remove either the candidate or the another candidate from consideration. In various embodiments, a comparison between a candidate and another candidate may be based at least in part on local features, global features, a pixel-level comparison, or a combination thereof.
At 422, the IME may provide one or more candidates for selection or insertion by a user into an application.
CONCLUSION
The subject matter described above can be implemented in hardware, software, or in both hardware and software. Although implementations have been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts are disclosed as example forms of implementing the claims. For example, the methodological acts need not be performed in the order or combinations described herein, and may be performed in any combination of one or more acts.

## Claims

1. A system comprising:
one or more processors; and
memory storing modules that, when executed by the one or more processors, cause the one or more processors to:
receive search criteria including at least a current user input in a user interface, the user interface associated with an input method editor (IME) interface associated with a host application, the host application selected from a plurality of host applications based at least in part on an indication from a user;
receive one or more candidates returned by a search engine based at least in part on the search criteria, the search criteria including a content of the current user input and a context of the current user input, the context of the current user input including at least a relevance of the current user input to a preceding user input in a same session of the host application, the preceding user input received at the host application prior to the current user input, the relevance of the current user input to the preceding user input based at least in part on a spatial relationship between the current user input and the preceding user input in the host application;
select one or more references from the one or more candidates returned by the search engine;
assign corresponding scores to the one or more candidates based at least in part on a comparison between one or more candidate features extracted from the one or more candidates and one or more reference features extracted from the one or more references, the corresponding scores further based in part on the context of the current user input;
rank the one or more candidates based at least in part on the corresponding scores;
remove a first candidate from the one or more candidates when a score of the corresponding scores of the first candidate is below a threshold score;
select one or more selected candidates from the one or more candidates based at least in part on the corresponding scores;
provide, in the user interface, the one or more selected candidates for user selection;
receive the user selection of a user selected candidate from the one or more selected candidates; and
provide to the host application the user selected candidate.

2. The system of claim 1, wherein the current user input comprises one or more of a textual input, a gesture, a motion, or a voice input.

3. The system of claim 1, wherein the one or more candidates returned by the search engine are returned in a ranked order.

4. The system of claim 3, wherein the one or more candidates returned by the search engine are further based in part on results information, the results information based at least in part on one or more of a set of top ranked results, a set of tail ranked results, or a set duplicate results.

5. The system of claim 1, wherein the one or more candidates comprise one or more of a candidate image, a candidate video, a candidate audio file, or a textualized graphic.

6. The system of claim 1, wherein the one or more reference features comprise average features of the one or more references.

7. The system of claim 1, wherein at least one of the corresponding scores is assigned based at least in part on a classifier, and wherein the classifier assigns the at least one of the corresponding scores based at least in part on a learned model that maps features to a score value.

8. The system of claim 1, wherein at least one of the corresponding scores is assigned based at least in part on a classifier, wherein the classifier assigns the at least one of the corresponding scores based at least in part on a regression model.

9. The system of claim 1, wherein an individual candidate of the one or more candidates with a corresponding score greater than the threshold score value is available for selection.

10. The system of claim 1, wherein the select the one or more selected candidates from the one or more candidates based at least in part on the corresponding scores comprises a comparison between a candidate and another candidate, wherein a candidate duplicative or within a similarity threshold of another candidate is made unavailable for selection.

11. The system of claim 10, wherein the comparison between the candidate and the another candidate is based at least in part on one or more of local features, global features, or pixel-level comparisons.

12. The system of claim 1, the memory storing modules that further cause the one or more processors to:
determine that a first score of the corresponding scores associated with a first candidate of the one or more selected candidates is within a similarity threshold of a second score of the corresponding scores associated with a second candidate of the one or more selected candidates; and
remove the second candidate from the one or more selected candidates.

13. A system comprising:
one or more processors;
an input method editor (IME) interface, the IME interface including a user interface, the user interface to receive a textual input and to provide an output to a host application, the host application selected from a plurality of host applications based at least in part on an indication from a user;
an analyzer executable by the one or more processors to analyze a content of the textual input and a context of the textual input, the context of the textual input including at least a relevancy of the textual input to a preceding textual input in a user conversation, the relevancy of the textual input to the preceding textual input based at least in part on a spatial relationship between the textual input and the preceding textual input in the user conversation;
a candidate manager executable by the one or more processors to gather one or more candidate images based at least in part on the content of the textual input and the context of the textual input, and to select one or more reference images from the one or more candidate images based at least in part on search results returned from a search engine;
an extractor executable by the one or more processors to extract one or more reference features from the one or more reference images and to extract one or more candidate features from the one or more candidate images;
a classifier executable by the one or more processors to:
assign one or more scores to the one or more candidate images based at least in part on a comparison between the one or more candidate features and the one or more reference features; and
rank the one or more candidate images based at least in part on the one or more scores;

a reducer executable by the one or more processors to remove a first candidate image from the one or more candidate images based at least in part on a score of a candidate compared to a threshold score value; and
an insertion manager executable by the one or more processors to provide the one or more candidate images for selection in the user interface.

14. The system of claim 13, further comprising a duplicate remover executable by the one or more processors to remove a second candidate image from the one or more candidates based at least in part on one or more of a duplicity of a candidate to another candidate or a similarity of a candidate to another candidate.

15. The system of claim 13, wherein a reference image of the one or more reference images is selected based in part on a number of duplicate images or similar images associated with the reference image.

16. A method comprising:
receiving a current textual input from a user through an input method editor (IME) interface, the IME interface including a user interface and providing output for a selected host application of a plurality of host applications, the selected host application selected based at least in part on an indication from the user;
analyzing, by a computing device, a content of the current textual input and a context of the current textual input, the context of the current textual input based at least in part on a type of the selected host application;
gathering one or more candidate images from a search engine based at least in part on the context of the current textual input and the content of the current textual input, the context of the current textual input including at least a relevancy of the current textual input to a preceding textual input in a user conversation, the preceding textual input received prior to the current textual input, the relevancy of the current textual input to the preceding textual input based at least in part on a spatial relationship between the current textual input and the preceding textual input in the user conversation;
selecting one or more reference images from the one or more candidate images based at least in part on results from the search engine;
extracting one or more reference features from the one or more reference images;
extracting one or more candidate features from the one or more candidate images; assigning a score to the one or more candidate images based at least in part on the one or more candidate features;
ranking the one or more candidate images based at least in part on the score;
removing a first candidate image from the one or more candidate images when the score of the first candidate image is below a threshold score;
removing a second candidate image from the one or more candidate images based at least in part on a comparison of features between the second candidate and another candidate;
providing a ranked subset of remaining candidate images of the one or more candidate images, to the user, for selection through the IME interface; and
in response to receiving a selection of an image of the ranked subset of remaining candidate images, providing the image to the selected host application.

17. The method of claim 16, wherein the results from the search engine comprise one or more of a set of top ranked results, a set of tail ranked results, or a set duplicate results.

18. The method of claim 16, wherein the comparison of features between the second candidate and the another candidate is based at least in part on one or more of local features, global features, or a pixel-level comparison.

19. The method of claim 16, further comprising inserting the image into the user conversation associated with the host application, the image replacing at least a portion of text included in the user conversation.