# US 2022/0035867 A1 · Methods and systems for search query language identification

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0035867 A1
- Document ID: US20220035867A1
- Status: Published application
- Kind: A1
- Application number: 16/944,203
- Filed: 2020-07-31
- Published: 2022-02-03
- Earliest claimed: 2020-07-31
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Ritiz TAMBI; Ajinkya KALE; Tracy Holloway KING
- Web page: https://patentgrep.com/patent/US20220035867A1

## CPC

- G06F 16/90324: {using system suggestions}
- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 16/90344: {by using string matching techniques}
- G06F 18/2155: {characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling}
- G06F 18/24147: {Distances to closest patterns, e.g. nearest neighbour classification}
- G06F 40/242: Dictionaries
- G06F 40/263: Language identification
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Systems and methods are disclosed for search query language identification. One method comprises generating a seed dictionary comprising a plurality of labeled dictionary terms and receiving a plurality of unlabeled sample query terms. The plurality of unlabeled sample query terms are compared to the plurality of labeled dictionary terms at a first time, and a first set of labeled sample query terms are generated by labeling at least a subset of the plurality of unlabeled sample query terms based on the first comparison. Remaining unlabeled sample query terms are then compared with the first set of labeled sample query terms at a second time, and a second set of labeled sample query terms are generated by labeling the remaining unlabeled sample query terms based on the second comparison. The first and second sets of labeled sample query terms are provided to a machine learning model configured for query language prediction.

## Claims

### Claim 1

A computer-implemented method for generating weak-labeled data to train a machine learning model for query language prediction, the method comprising:
generating a seed dictionary comprising a plurality of labeled dictionary terms;
receiving a plurality of unlabeled sample query terms;
comparing, at a first time, the plurality of unlabeled sample query terms to the plurality of labeled dictionary terms;
generating a first set of labeled sample query terms by labeling at least a subset of the plurality of unlabeled sample query terms based on the first comparison;
comparing, at a second time, remaining unlabeled sample query terms with the first set of labeled sample query terms;
generating a second set of labeled sample query terms by labeling the remaining unlabeled sample query terms based on the second comparison; and
providing the first and second sets of labeled sample query terms to a machine learning model configured for query language prediction.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein comparing, at a first time, the plurality of unlabeled sample query terms to the plurality of labeled dictionary terms comprises:
for each of the plurality of labeled dictionary terms, determining a predefined number of unlabeled sample query terms that are nearest to the labeled dictionary term.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein the predefined number of unlabeled sample query terms are determined using a k Nearest Neighbor (kNN) model.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, wherein labeling at least a subset of the plurality of unlabeled sample query terms based on the first comparison comprises:
for each of the plurality of labeled dictionary terms, annotating the predefined number of unlabeled sample query terms with a language associated with the labeled dictionary term.

### Claim 5 (depends on 2)

The computer-implemented method of claim 2, wherein comparing, at a second time, remaining unlabeled sample query terms with the first set of labeled sample query terms comprises:
for each of the remaining unlabeled sample query terms, determine a predefined number of labeled sample query terms that are nearest to the remaining unlabeled sample query term.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein the predefined number of labeled sample query terms are determined using a k Nearest Neighbor (kNN) model.

### Claim 7 (depends on 5)

The computer-implemented method of claim 5, wherein labeling the remaining unlabeled sample query terms based on the second comparison comprises:
for each of the remaining unlabeled sample query terms, determining a language based on languages associated with the predefined number of labeled sample query terms; and
annotating each of the remaining unlabeled sample query terms with the language determined based on the languages associated with the predefined number of labeled sample query terms.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein the language is determined based on the languages associated with the predefined number of labeled sample query terms using a voting scheme.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving a query term from a user application;
determining, using the machine learning model, a language of the query term; and
modifying at least one data element of a user interface based on the determined language.

### Claim 10

A system for generating weak-labeled data to train a machine learning model for query language prediction, the system comprising:
at least one processor; and
at least one data storage storing instructions which, when executed by the at least one processor, cause the at least one processor to perform steps comprising:
generating a seed dictionary comprising a plurality of labeled dictionary terms;
receiving a plurality of unlabeled sample query terms;
comparing, at a first time, the plurality of unlabeled sample query terms to the plurality of labeled dictionary terms;
generating a first set of labeled sample query terms by labeling at least a subset of the plurality of unlabeled sample query terms based on the first comparison;
comparing, at a second time, remaining unlabeled sample query terms with the first set of labeled sample query terms;
generating a second set of labeled sample query terms by labeling the remaining unlabeled sample query terms based on the second comparison; and
providing the first and second sets of labeled sample query terms to a machine learning model configured for query language prediction.

### Claim 11

A computer-implemented method of determining a language of a query, the method comprising:
receiving at least a portion of a query; and
using a machine learning model trained on weak-labeled data to determine a language of the received portion of the query, wherein the weak-labeled data comprises a plurality of training queries labeled with an associated language based on a seed dictionary of terms having a known language.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the machine learning model is trained on the weak-labeled data by:
obtaining a plurality of labeled dictionary terms, each of the labeled dictionary terms comprising a term and an associated language of the term;
obtaining a plurality of unlabeled sample query terms;
comparing each of the unlabeled sample query terms to the labeled dictionary terms; and
generating the weak-labeled data based on the comparison of each unlabeled sample query term to the labeled dictionary terms.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, wherein generating the weak-labeled data based on the comparison of each unlabeled sample query term with each dictionary term comprises:
determining that an unlabeled sample query term is similar to a labeled dictionary term; and
as a result of determining that the unlabeled sample query term is similar to the labeled dictionary term, labeling the unlabeled sample query term to create a labeled sample query term by assigning a language associated with the labeled dictionary term to the unlabeled sample query term.

### Claim 14 (depends on 13)

The computer-implemented method of claim 13, wherein determining that the unlabeled sample query term is similar to the labeled dictionary term comprises:
determining a first distance between the unlabeled sample query term and the labeled dictionary term;
comparing the first distance to a second distance between another unlabeled sample query term and the labeled dictionary term; and
determining that the first distance is shorter than the second distance.

### Claim 15 (depends on 13)

The computer-implemented method of claim 13, further comprising:
identifying one or more remaining unlabeled sample query terms;
determining an expanded training data set by propagating one or more labels to the remaining unlabeled sample query terms; and
training the machine learning model using the expanded training data set.

### Claim 16 (depends on 15)

The computer-implemented method of claim 15, wherein determining the expanded training data set by propagating one or more labels to the remaining unlabeled sample query terms further comprises:
comparing each of the remaining unlabeled sample query terms with each of the labeled query terms included in the training data set; and
determining the expanded training data set at least based on the comparison of each remaining unlabeled sample query term with each labeled query term included in the training data set.

### Claim 17 (depends on 16)

The computer-implemented method of claim 16, wherein determining the expanded training data set at least based on the comparison of each remaining unlabeled sample query term with each labeled query term included in the training data set comprises:
determining at least one labeled query term similar to a remaining unlabeled sample query term; and
labeling the remaining unlabeled sample query term to obtain another new labeled query term by assigning a language associated with the labeled query term to the remaining unlabeled sample query term.

### Claim 18 (depends on 16)

The computer-implemented method of claim 16, wherein determining the expanded training data set at least based on the comparison of each remaining unlabeled sample query term with each labeled query term included in the training data set comprises:
determining a first labeled query term and a second labeled query term similar to a remaining unlabeled sample query term, wherein the first labeled query term is associated with a first language and the second labeled query term is associated with a second language; and
labeling the remaining unlabeled query term to obtain another new labeled query term by assigning the first language or the second language to the remaining unlabeled sample query term.

### Claim 19 (depends on 11)

The computer-implemented method of claim 11, further comprising:
predicting a complete query at least based on the determined language of the received portion of the query.

### Claim 20 (depends on 11)

The computer-implemented method of claim 11, further comprising:
determining a user interface to display at least based on the determined language of the received portion of the query.
