BACKGROUND

Online gaming provides an opportunity for player located around the world to participate together, regardless of geographical and language boundaries. Gaming platforms often enable a user to input text, such as a search query, that assists the user in interacting with games. The text inputted into online games typically has distinctive characteristics. Recognizing possible languages of the text may assist in effectively responding to the text.

Machine learning may be leveraged for natural language processing (NLP) to interpret text inputted by a user of an online gaming platform. Algorithms, e.g. predictive models, can be created to learn from empirical data via training and to perform analysis of the user input text. Such artificial intelligence requires clean and relevant data for proper training of the machine learning model in the online gaming context.

SUMMARY

Implementations of this application relate to detecting a language of a user query inputted by a user of online games, by use of a trained machine learning model. The machine learning model is trained with processed text data relevant to online gaming.

In some implementations, a method includes receiving a user query and separating the user query into a plurality of n-grams. At least one candidate language is identified by applying a machine learning model to the plurality of n-grams of the user query. The machine learning model is trained with at least one multilingual text corpus and game-related data. A respective language confidence score for each of the at least one candidate language is determined by applying the machine learning model. The at least one candidate language is used to select at least one language-specific databases to search. A response match is identified in the at least one language-specific databases and a respective match score is determined for each of the response matches. A weighted score is determined by at least the respective language confidence score and the respective match score. The weighted score is used as a basis to determine at least one query language for the user quay.

Various implementations and examples of the method are described. For example, in some implementations, the method also includes determining game information associated with the response match in the at least one language-specific game database. A search result to the user query is generated based on the game information. The game information may include webpage information for online games. The search result may include one or more user interface elements that, when activated by a user, links a webpage associated with a respective one of the online games.

In some implementations, user profile information associated with the user query is provided and the at least one query language is further based on user profile information. The respective confidence score may be further determined by identifying one or more segments of the plurality of n-grams that are relevant to the at least one candidate language. The at least one candidate language may also include an unidentified language and the language-specific game database may include a database associated with unknown languages.

In some implementations, a system is provided that includes a computing device with one or more processors for detecting language of a user query for online games. The computing device also includes logic encoded in one or more tangible media for execution by the one or more processors and when executed operable to perform operations. The operations include receiving a user query and separating the user query into a plurality of n-grams. At least one candidate language is identified by applying a machine learning model to the plurality of n-grams of the user query. The machine learning model is trained with at least one multilingual tact corpus and game-related data. A respective confidence score for each of the at least one candidate language is determined by applying the machine learning model. The at least one candidate language is used by the operations to select at least one language-specific databases to search. A response match is identified in the at least one language-specific databases and a respective match score is determined for each of the response match. A weighted score is determined by at least the respective language confidence score and the respective match score. The weighted score is used as a basis by the operations to determine at least one query language for the user query.

Various implementations and examples of the operations performed by the operations are described. For example, in some implementations, the operations also includes determining game information associated with the response match in the at least one language-specific game database. The search result to the user query is generated based on the game information. The game information may include webpage information for online games. The search result may include one or more user interface elements that, when activated by a user, links a webpage associated with a respective one of the online games.

In some implementations, user profile information associated with the user query is provided and the at least one query language is determined by the operations further based on user profile information. The respective confidence score may be further determined by the operations identifying one or more segments of the plurality of n-grams that are relevant to the at least one candidate language. The at least one candidate language may also include an unidentified language and the language-specific game database may include a database associated with unknown languages.

Various implementations and examples of a method of training a machine learning model to identify a language of a user query for online games are described. Text data is received that include at least first text data, associated language labels for the first text data and second text data unlabeled for languages. Associated language labels are determined for the second text data based on a threshold number of a plurality of non-specific language detectors identifying at least one language. Training text data are created by separating the text data into n-grams. The machine learning model is trained to generate at least one candidate language identifier of the user query and a respective language confidence score. Training text data is fed to the machine learning model for training without the associated language labels. The machine learning model outputs predicted language labels. Retraining of the machine learning model may be conducted with discrepancy information between the current predicted language labels and the associated language labels, to update the current predicted language labels. The retraining may be iteratively repeated until the discrepancy information meets a threshold of accuracy.

In some implementations creating the training text data further includes splitting word strings of the text data having a length greater than an upper threshold length, into random word lengths of a predetermined length. In some implementations creating the training text data further includes aggregating work strings of text data having a length shorter than a low threshold length, with related text to create extended strings of words. The training data set may also be created by determining the n-grams that meet a commonality threshold across languages and within languages. In some implementations, the n-grams may include at least one of: one character, two characters, or three characters.

In some implementations the text data may include at least one collection of game-related data that includes at least one of game titles, chat texts, game source data, or slang terms. In some implementations, a vector that includes respective confidence scores for multiple languages is generated and multiple-language specific databases of the at least one language-specific game database corresponding to the respective confidence scores are searched based on the user query.

