US 12,380,722 B2
On-device two step approximate string matching
Vasyl Pihur, Santa Monica, CA (US); and Scott Thompson, Santa Monica, CA (US)
Assigned to Snap Inc., Santa Monica, CA (US)
Filed by Snap Inc., Santa Monica, CA (US)
Filed on Dec. 28, 2021, as Appl. No. 17/563,848.
Prior Publication US 2023/0206669 A1, Jun. 29, 2023
Int. Cl. G06V 30/19 (2022.01); G06V 30/196 (2022.01)
CPC G06V 30/1983 (2022.01) [G06V 30/19113 (2022.01); G06V 30/19167 (2022.01)] 17 Claims
OG exemplary drawing
 
1. A method comprising:
receiving, from a client device, a query against a corpus of text strings, the query comprising a string of characters received via a keyboard displayed within a graphical user interface (GUI) of the client device;
responsive to the receiving the query against the corpus of text strings, causing the client device to perform operations at the client device that include:
applying a modification to the string of characters;
generating one or more bigrams based on the string of characters that include the modification;
assigning weights to each bigram among the one or more bigrams based on a keyboard type of the keyboard displayed within the GUI of the client device, and an order of the one or more bigrams;
generating a hash-map that comprises a set of values and a key, the set of values including the weights of the one or more bigrams, and the key comprising the one or more bigrams;
determining a bigram distance between each of the one or more bigrams within the hash-map and at least a bigram of a text string from the corpus of text strings;
selecting the text string from the corpus of text strings based on the bigram distance between each of the one or more bigrams within the hash-map and the bigram of the text string; and
causing display of a presentation of a set of search results at the client device, the presentation of the set of search results including at least the text string.