Lexical cache
First Claim
1. A method of searching for a string in a lexical cache, comprising the computer-implemented steps of:
- generating a key based on the string;
selecting a lexical container from among a plurality of lexical containers based on a length of the key, said lexical containers associated with respective key lengths and configured to hold respective maximum numbers of entries based on the respective key lengths; and
searching the selected lexical container for an entry associated with the string based on the key,wherein at least one of the lexical containers is configured to hold a different maximum number of entries than at least another one of the lexical containers.
2 Assignments
0 Petitions
Accused Products
Abstract
A lexical cache comprises a collection of lexical containers, such as tuned hash table, that are organized according to the length of the keys to be looked up in the lexical cache. In one embodiment, the word is compressed to generate a key. Based on the length of the key and optionally a prefix, a hash table is identified from among the collection of hash tables. A hash value is computed for the key, and the hash table is searched for a slot holding a key value matching the key. If a slot having a key value matching the key was found, then the relative position of the key value within the corresponding sequence of slots is moved toward the beginning of the corresponding sequence.
-
Citations
36 Claims
-
1. A method of searching for a string in a lexical cache, comprising the computer-implemented steps of:
-
generating a key based on the string; selecting a lexical container from among a plurality of lexical containers based on a length of the key, said lexical containers associated with respective key lengths and configured to hold respective maximum numbers of entries based on the respective key lengths; and searching the selected lexical container for an entry associated with the string based on the key, wherein at least one of the lexical containers is configured to hold a different maximum number of entries than at least another one of the lexical containers. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method of searching for a string in a lexical cache, comprising the computer-implemented steps of:
-
generating a key based on the string; identifying a hash table from among a plurality of hash tables based on the length of the key, said hash table containing sequences of slots for holding entries associated with strings, each of said sequences of slots corresponding to a respective hash value, wherein at least one of the hash tables is configured to hold a different number of slots than at least another one of the hash tables; computing a hash value based on the key; and searching the hash table based on the hash value for a slot holding an entry associated with said string. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A method of searching for a string in a lexical cache, comprising the computer-implemented steps of:
-
compressing the string to generate a key; identifying a hash table from among a plurality of hash tables based on a length of the key, said hash table containing sequences of slots for holding respective key values, each of said sequences of slots corresponding to a respective hash value and a number of slots being based on a respective key length, wherein at least one of the hash tables is configured to hold a different number of slots than at least another one of the hash tables; computing a hash value based on the key; using said hash value to locate a beginning of the particular sequence of slots that correspond to said hash value; searching the particular sequence of slots for a slot holding a key value matching the key; and if a slot having a key value matching the key is found in the particular sequence of slots, but is not at the beginning of said particular sequence of slots, then moving a relative position of the key value within the particular sequence of slots toward the beginning of the particular sequence of slots.
-
-
18. A computer-readable storage medium bearing instructions for searching for a string in a lexical cache, said instructions arranged, when executed by one or more processors, to cause the one or more processors to perform the steps of:
-
generating a key based on the string; selecting a lexical container from among a plurality of lexical containers based on a length of the key, said lexical containers associated with respective key lengths and configured to hold respective maximum numbers of entries based on the respective key lengths; and searching the selected lexical container for an entry associated with the string based on the key, wherein at least one of the lexical containers is configured to hold a different maximum number of entries than at least another one of the lexical containers. - View Dependent Claims (19, 20, 21, 22)
-
-
23. A computer-readable storage medium bearing instructions for searching for a string in a lexical cache, said instructions arranged, when executed by one or more processors, to cause the one or more processors to perform the steps of:
-
generating a key based on the string; identifying a hash table from among a plurality of hash tables based on the length of the key, said hash table containing sequences of slots for holding entries associated with strings, each of said sequences of slots corresponding to a respective hash value, wherein at least one of the hash tables is configured to hold a different number of slots than at least another one of the hash tables; computing a hash value based on the key; and searching the hash table based on the hash value for a slot holding an entry associated with said string. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. A computer-readable storage medium bearing instructions for searching for a string in a lexical cache, said instructions arranged, when executed by one or more processors, to cause the one or more processors to perform the steps of:
-
compressing the string to generate a key; identifying a hash table from among a plurality of hash tables based on a length of the key, said hash table containing sequences of slots for holding respective key values, each of said sequences of slots corresponding to a respective hash value and a number of slots being based on a respective key length, wherein at least one of the hash tables is configured to hold a different number of slots than at least another one of the hash tables; computing a hash value based on the key; using said hash value to locate a beginning of the particular sequence of slots that correspond to said hash value; searching the particular sequence of slots for a slot holding a key value matching the key; and if a slot having a key value matching the key is found in the particular sequence of slots, but is not at the beginning of said particular sequence of slots, then moving a relative position of the key value within the particular sequence of slots toward the beginning of the particular sequence of slots.
-
-
33. A method of storing a string in a lexical cache, comprising the computer-implemented steps of:
-
generating a key based on the string; selecting a lexical container from among a plurality of lexical containers based on a length of the key, said lexical containers are associated with respective key lengths and configured to hold respective maximum numbers of entries based on the respective key lengths; and storing the string in an entry in the selected lexical container based on the key, wherein at least one of the lexical containers is configured to hold a different maximum number of entries than at least another one of the lexical containers. - View Dependent Claims (34)
-
-
35. A computer-readable storage medium bearing instructions for storing a string in a lexical cache, said instructions arranged, when executed by one or more processors, to cause the one or more processors to perform the steps of:
-
generating a key based on the string; selecting a lexical container from among a plurality of lexical containers based on a length of the key, wherein the lexical containers are associated with respective key lengths and configured to hold respective maximum numbers of entries based on the respective key lengths; and storing the string in an entry in the selected lexical container based on the key, wherein at least one of the lexical containers is configured to hold a different maximum number of entries than at least another one of the lexical containers.
-
-
36. A method of providing a lexical cache, comprising the computer-implemented steps of:
-
allocating a plurality of lexical containers each configured to contain a respective maximum number of entries based on a function that includes a term that is inversely proportional to a logarithm of a key length associated with the lexical containers; and searching for one of the entries associated with a string within one of the plurality of lexical containers corresponding to a key generated based on the string.
-
Specification