IP Library › Granted Patent US 8,572,126
Granted Patent B2
US 8,572,126 · App. 13/168,338 · Granted Oct 29, 2013

Systems and methods for optimizing very large n-gram collections for speed and memory

Inventor: Michael Flor (Lawrenceville, NJ)
Assignee: Educational Testing Service
G06F17/30017
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 8,572,126
App. No.
13/168,338
Granted
Oct 29, 2013
Kind
B2
Abstract

A computer memory stores a data structure representing a ternary search tree (TST) representing multiple word n-grams for a corpus of documents. The data structure includes plural records in a first memory, each record representing a node of the TST and comprising plural fields. At least some n-grams have a sequence of units. The plurality of fields includes one for identifying a given unit of the sequence for a given node, one reserved for storing payload information for the given node, and plural child fields reserved for storing information for a first, second and third child nodes of the given node. The child fields store a null value indicating the absence of the child node or an identifier identifying a memory location of the child node. For at least one record, at least one of the child fields stores an identifier identifying a memory location of a memory different than the first memory.

Claims (37)

1. A computer memory storing a data structure representing a ternary search tree for word n-grams for a corpus of documents, the data structure comprising:

a plurality of records, each record representing a node of a ternary search tree and each record comprising a plurality of fields, the ternary search tree representing multiple word n-grams, at least some of said word n-grams comprising a sequence of units, the plurality of records being stored at said computer memory;

wherein the plurality of fields of a record for each node including a given node includes:

a first field for identifying a given unit of the sequence of units for the given node;

a second field reserved for storing payload information for the given node; and

plural child fields reserved for storing information for a first hi-child node, a second lo-child node and an third equal-child node of the given node; and

wherein the plural child fields store one of a null value indicating the absence of an associated child node or an identifier identifying a memory location of the respective child node;

wherein, for at least one record of said data structure, at least one of said plural child fields stores an identifier identifying a memory location of another computer memory different than said computer memory; and

wherein the ternary tree is configured to be searched by comparing units of a query to nodes of the ternary tree, wherein a current unit of the query is compared to the payload information of a current node of the ternary tree, and wherein i) if the current unit of the query matches the payload information, then selecting the equal-child node as the current node; ii) if the current unit of the query is less than the payload information, then selecting the lo-child node as the current node; and iii) if the current unit of the query is greater than the payload information, then selecting the hi-child node as the current node.

2. The computer memory of claim 1 , wherein the given unit is a character of a particular word n-gram.

3. The computer memory of claim 1 , wherein the given unit is a 1-byte value representing a part of a particular word n-gram.

4. The computer memory of claim 1 , wherein each record representing a node of the ternary search tree is individually compressed in serialized form.

5. The computer memory of claim 1 , wherein the data structure is configured such that new records representing new nodes of the ternary search tree can be added to the data structure to thereby update the data structure without recompiling the entire data structure.

6. The computer memory of claim 1 , wherein the data structure is configured to support wildcard searches of the data structure without the use of additional indexing designed to facilitate wildcard searches.

7. The computer memory of claim 1 , wherein the payload information comprises statistical information related to a count for a particular word n-gram.

8. A computer-implemented method of populating a data structure in a computer memory, the data structure representing a ternary search tree, the ternary search tree representing multiple word n-grams for a corpus of documents, the method comprising:

a) selecting a unit of a word n-gram with a processing system, wherein said word n-gram comprises a sequence of units;

b) creating a node of a ternary search tree based on the first unit with the processing system, wherein the node is represented by a record of the data structure, the record being stored at said computer memory;

c) selecting another unit of the word n-gram with the processing system;

d) if said another unit does not already exist as a node in the ternary search tree for said word n-gram, creating another node of the ternary search tree based on said another unit with the processing system, wherein said another node is represented by another record of the data structure; and

e) repeating steps (a)-(d) to create additional nodes of the ternary search tree for additional word n-grams;

wherein each of said records comprises a plurality of fields,

wherein the plurality of fields include:

a first field for identifying a given unit of the sequence of units for a given node;

a second field reserved for storing payload information for the given node; and

plural child fields reserved for storing information for a first hi-child node, a second lo-child node and an third equal-child node of the given node;

wherein the plural child fields store one of a null value indicating the absence of an associated child node or an identifier identifying a memory location of the respective child node;

wherein, for at least one record of said data structure, at least one of said plural child fields stores an identifier identifying a memory location of another computer memory different than said computer memory; and

wherein the ternary tree is configured to be searched by comparing units of a query to nodes of the ternary tree, wherein a current unit of the query is compared to the payload information of a current node of the ternary tree, and wherein i) if the current unit of the query matches the payload information, then selecting the equal-child node as the current node; ii) if the current unit of the query is less than the payload information, then selecting the lo-child node as the current node; and iii) if the current unit of the query is greater than the payload information, then selecting the hi-child node as the current node.

9. The method of claim 8 , wherein the given unit is a character of a particular word n-gram.

10. The method of claim 8 , wherein the given unit is a 1-byte value representing a part of a particular word n-gram.

11. The method of claim 8 , comprising individually compressing each record representing a node of the ternary search tree in serialized form.

12. The method of claim 8 , comprising adding new records representing new nodes of the ternary search tree to the data structure to thereby update the data structure without recompiling the entire data structure.

13. The method of claim 8 , wherein the data structure is configured to support wildcard searches of the data structure without the use of any additional indexing specially designed to facilitate wildcard queries.

14. The method of claim 8 , wherein the payload information comprises statistical information related to a count for a particular word n-gram.

15. An article of manufacture comprising a non-transitory computer readable storage medium comprising processing instructions, which when executed, cause a processing system to carry out the method of claim 8 .

16. A system for populating a data structure in a computer memory, the system comprising a processing system and a memory, the processing system configured to carry out the method of claim 8 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 21, 2011
From: FLOR, MICHAEL
To: EDUCATIONAL TESTING SERVICE
Reel/Frame 026627/0042 →
Continuity (3)
Provisional Application 61358698 · Jun 25, 2010
Provisional Application 61443284 · Feb 16, 2011
Related Publication 20110320498A1 · Dec 29, 2011