IP Library Granted Patent US 12,645,871
Granted Patent B2
US 12,645,871 · App. 18/474,962 · Granted Jun 2, 2026

Privacy-controlled generation of suggested snippets

Inventor: Ben Mackey (San Francisco, CA)
G06F40/20G06F16/335G06F40/131G06F40/166G06F40/279H04L9/3239
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,645,871
App. No.
18/474,962
Granted
Jun 2, 2026
Kind
B2
Abstract

In one embodiment, a method receives, by a computing device, a text change in a text entry which includes one or more text units. The method may access, using a data store, a record associated with a user identifier which includes one or more top N similar hash values associated with the user identifier. The method may determine one or more hash values by applying a hash function over the one or more text units of the text change. The method may compare each of the one or more hash values to the one or more top N similar hash values. In response to determining a match between at least one of the one or more hash values and the one or more top N similar hash values, the method may determine a phrase suggestion using the text change to visually present on the computing device.

Claims (75)

1 . A computer-implemented method comprising:

creating, by a computing device, a first record associated with a user identifier, the first record containing a plurality of hash values, each of the plurality of hash values corresponding to a separate one or more units of text, each of the one or more units of text having been previously input by a user;

applying, by a computing device, a similarity function to the plurality of hash values in the first record to determine a level of similarity between each pair of hash values in the plurality of hash values in the first record;

determining, by a computing device and based on a result of the applying the similarity function, a top N similar hash values among the plurality of hash values in the first record;

creating, by the computing device, a second record that contains the top N similar hash values in association with the user identifier but not all of the plurality of hash values in the first record, wherein the second record is smaller than the first record;

receiving, by the computing device, a text change in a text entry input by the user, the text change including one or more text units;

accessing, using a data store, the second record associated with a user identifier;

determining one or more hash values associated with the text change by applying a hash function over the one or more text units of the text change;

comparing each of the one or more hash values associated with the text change to the top N similar hash values in the second record associated with the user identifier; and

in response to determining a match between at least one of the one or more hash values associated with the text change and at least one of the top N similar hash values in the second record associated with the user identifier, determining a phrase suggestion for the user to add the text change to the data store for subsequent reuse and visually presenting the phrase suggestion on the computing device.

2 . The computer-implemented method of claim 1 , further comprising:

determining a plurality of levels of similarity by periodically applying the similarity function to all pairs of hash values associated with the user identifier in the data store to determine periodically an updated top N similar hash values; and

updating the second record or creating a new record in the data store, that associates the updated top N similar hash values with the user identifier.

3 . The computer-implemented method of claim 2 , further comprising ranking the plurality of levels of similarity to select the updated top N similar hash values associated with the user identifier that represent text that the user most frequently uses.

4 . The computer-implemented method of claim 2 , further comprising determining a plurality of distances for all pairs of the hash values associated with the user identifier in the data store.

5 . The computer-implemented method of claim 4 , further comprising determining that two hash values are similar when a distance is less than a predefined threshold.

6 . The computer-implemented method of claim 5 , wherein the distance includes one of a cosine distance, a Euclidean distance, or a Hamming distance.

7 . The computer-implemented method of claim 1 , further comprising:

receiving a signal to accept the phrase suggestion from the computing device; and

in response to determining the phrase suggestion is accepted, updating the data store by using the phrase suggestion.

8 . The computer-implemented method of claim 1 , further comprising calculating the one or more hash values associated with the text change by using a locality-sensitive hash (LSH) algorithm.

9 . The computer-implemented method of claim 1 , wherein the suggestion is a snippet suggestion to recommend that the computing device creates a snippet based on the phrase suggestion, the method further comprising:

sending a snippet suggestion instruction corresponding to the snippet suggestion to the computing device to present to the computing device via a user interface.

10 . A system comprising:

one or more processors; and

a memory coupled to the one or more processors comprising instructions, execution of which by the one or more processors causes the system to:

create a first record associated with a user identifier, the first record containing a plurality of hash values, each of the plurality of hash values corresponding to a separate one or more units of text, each of the one or more units of text having been previously input by a user;

apply a similarity function to the plurality of hash values in the first record to determine a level of similarity between each pair of hash values in the plurality of hash values in the first record;

determine, based on a result of applying the similarity function, a top N similar hash values among the plurality of hash values in the first record;

create a second record that contains the top N similar hash values in association with the user identifier but not all of the plurality of hash values in the first record, wherein the second record is smaller than the first record;

receive, by a computing device, a text change in a text entry input by the user, the text change including one or more text units;

access, using a data store, the second record associated with a user identifier;

determine one or more hash values associated with the text change by applying a hash function over the one or more text units of the text change;

compare each of the one or more hash values associated with the text change to the top N similar hash values in the second record associated with the user identifier; and

in response to determining a match between at least one of the one or more hash values associated with the text change and at least one of the top N similar hash values in the second record associated with the user identifier, determine a phrase suggestion for the user to add the text change to the data store for subsequent reuse and visually presenting the phrase suggestion on the computing device.

11 . The system of claim 10 , wherein execution of the instructions by the one or more processors further causes the system to:

determine a plurality of levels of similarity by periodically applying the similarity function to all pairs of hash values associated with the user identifier in the data store to determine periodically an updated top N similar hash values; and

update the second record or creating a new record in the data store, that associates the updated top N similar hash values with the user identifier.

12 . The system of claim 11 , wherein the processors are further operable when executing the instructions to rank the plurality of levels of similarity to select the updated top N similar hash values associated with the user identifier that represent text that a user associated with the user most frequently uses.

13 . The system of claim 11 , wherein execution of the instructions by the one or more processors further causes the system to implement the similarity function to calculate a plurality of distances for all pairs of the hash values associated with the user identifier in the data store.

14 . The system of claim 13 , wherein execution of the instructions by the one or more processors further causes the system to apply the similarity function to determine that two hash values are similar when a distance is less than a predefined threshold.

15 . The system of claim 14 , wherein the distance includes one of a cosine distance, a Euclidean distance, or a Hamming distance.

16 . The system of claim 10 , wherein execution of the instructions by the one or more processors further causes the system to:

receive a signal to accept the phrase suggestion from the computing device; and

in response to determining the phrase suggestion is accepted, update the data store by using the phrase suggestion.

17 . The system of claim 10 , wherein execution of the instructions by the one or more processors further causes the system to calculate the one or more hash values associated with the text change by using a locality-sensitive hash (LSH) algorithm.

18 . The system of claim 10 , wherein the suggestion is a snippet suggestion to recommend that the computing device creates a snippet based on the phrase suggestion, and wherein execution of the instructions by the one or more processors further causes the system to:

send a snippet suggestion instruction corresponding to the snippet suggestion to the computing device to present to the computing device via a user interface.

19 . One or more non-transitory computer-readable storage media storing one or more sequences of instructions, execution of which by one or more processors causes the one or more processors to execute:

creating a first record associated with a user identifier, the first record containing a plurality of hash values, each of the plurality of hash values corresponding to a separate one or more units of text, each of the one or more units of text having been previously input by a user;

applying a similarity function to the plurality of hash values in the first record to determine a level of similarity between each pair of hash values in the plurality of hash values in the first record;

determining, based on a result of the applying the similarity function, a top N similar hash values among the plurality of hash values in the first record;

creating a second record that contains the top N similar hash values in association with the user identifier but not all of the plurality of hash values in the first record, wherein the second record is smaller than the first record;

receiving a text change in a text entry input by the user, the text change including one or more text units;

accessing, using a data store, the second record associated with a user identifier,

determining one or more hash values associated with the text change by applying a hash function over the one or more text units of the text change;

comparing each of the one or more hash values associated with the text change to the top N similar hash values in the second record associated with the user identifier; and

in response to determining a match between at least one of the one or more hash values associated with the text change and at least one of the top N similar hash values in the second record associated with the user identifier, determining a phrase suggestion for the user to add the text change to the data store for subsequent reuse and visually presenting the phrase suggestion on a computing device.

20 . The one or more non-transitory computer-readable storage media of claim 19 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

determining a plurality of levels of similarity by periodically applying the similarity function to all pairs of hash values associated with the user identifier in the data store to determine periodically an updated top N similar hash values; and

updating the second record or creating a new record in the data store, that associates the updated top N similar hash values with the user identifier.

21 . The one or more non-transitory computer-readable storage media of claim 20 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

ranking the plurality of levels of similarity to select the updated top N similar hash values associated with the user identifier that represent text that the user most frequently uses.

22 . The one or more non-transitory computer-readable storage media of claim 20 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

implementing the similarity function to calculate a plurality of distances for all pairs of the hash values associated with the user identifier in the data store.

23 . The one or more non-transitory computer-readable storage media of claim 22 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

applying the similarity function to determine that two hash values are similar when a distance is less than a predefined threshold.

24 . The one or more non-transitory computer-readable storage media of claim 23 , wherein the distance includes one of a cosine distance, a Euclidean distance, or a Hamming distance.

25 . The one or more non-transitory computer-readable storage media of claim 19 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

receiving a signal to accept the phrase suggestion from the computing device; and

in response to determining the phrase suggestion is accepted, updating the data store by using the phrase suggestion.

26 . The one or more non-transitory computer-readable storage media of claim 19 , wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

calculating the one or more hash values associated with the text change by using a locality-sensitive hash (LSH) algorithm.

27 . The one or more non-transitory computer-readable storage media of claim 19 , wherein the suggestion is a snippet suggestion to recommend that the computing device creates a snippet based on the phrase suggestion, and wherein execution of the instructions by the one or more processors further causes the one or more processors to execute:

sending a snippet suggestion instruction corresponding to the snippet suggestion to the computing device to present to the computing device via a user interface.

Assignments (2)
CHANGE OF NAME Recorded Nov 21, 2025
From: GRAMMARLY, INC.
To: SUPERHUMAN PLATFORM INC.
Reel/Frame 073655/0136 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 26, 2023
From: MACKEY, BEN
To: GRAMMARLY, INC.
Reel/Frame 065036/0009 →
Continuity (2)
Provisional Application 63410972 · Sep 28, 2022
Related Publication 20240169148A1 · May 23, 2024
References Cited (15)
US 7953752B2 · Soules · 2011 [cited by examiner]
US 8122069B2 · Soules · 2012 [cited by examiner]
US 8645825B1 · Cornea · 2014 [cited by examiner]
US 9183323B1 · Shaw · 2015 [cited by examiner]
US 10210243B2 · Su · 2019 [cited by examiner]
US 11023503B2 · Satterfield · 2021 [cited by examiner]
US 11182540B2 · Satterfield · 2021 [cited by examiner]
US 11449554B2 · Juarez et al. · 2022 [cited by applicant]
US 20160125071A1 · Gabbai · 2016 [cited by applicant]
US 20170351687A1 · Su et al. · 2017 [cited by applicant]
US 20180101599A1 · Arnold · 2018 [cited by examiner]
US 20200342164A1 · Satterfield et al. · 2020 [cited by applicant]
Zhang, Yun, Zong-ze Jin, Wei-min Mu, and Wei-ping Wang, “Research of Distinct Algorithm of Short Text Based on Simhash”, Sep. 2017, 2017 International Conference on Optics, Electronics and Communications Technology (OEC… [cited by examiner]
International Search Report and Written Opinion, Application No. PCT/US2023/075124, Jan. 25, 2024, 9 pages. [cited by applicant]
International Preliminary Report on Patentability for International Application No. PCT/US2023/075124, dated Apr. 10, 2025, 6 Pages. [cited by applicant]