System and method for phrase matching with arbitrary text
First Claim
Patent Images
1. A method for phrase matching in database operations, comprising:
- storing, by a database system, a plurality of expressions in a first data structure, each expression having a plurality of words;
storing, by the database system, for each word of the plurality of expressions a corresponding key with at least one associated value into a second data structure, each associated value representing a first plurality of attributes relating to use of the corresponding word in one of the expressions in the first data structure, the first plurality of attributes including at least two of;
(i) an identification of the expression in the first data structure;
(ii) a position of the word in the expression;
(iii) a branch expression number;
(iv) whether the word is a terminal word in the expression; and
(v) whether the word follows arbitrary text;
receiving, by the database system, an input sentence having a string of words;
comparing, by the database system, a word from the input sentence with each key of the second data structure;
evaluating, in the input sentence, for each word that matches a key, the first plurality of attributes associated with the matched key and storing a second plurality of attributes in a third data structure, the second plurality of attributes indicating how use of the matching word in the input sentence compares with use of the word in one of the expressions in the first data structure, the second plurality of attributes including at least one of;
(i) a number of the input sentence;
(ii) a position of the word in the corresponding expression; and
(iii) a position of the word in the input sentence;
repeating, by the database system, the comparing step for each word from the input sentence; and
determining, by the database system, based on the first plurality of attributes and the second plurality of attributes if one or more expressions from the first data structure are present in the input sentence.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for matching phrases having arbitrary text. A first data structure stores a list of common phrases having multiple words. Each unique word is indexed in a hash table and mapped to one or more values that describe attributes of using the word in one or more of the common phrases. Using the hash table and the list of common phrases, a temporary array is defined to keep track of possible matches between words in an input string and the list of common phrases.
-
Citations
18 Claims
-
1. A method for phrase matching in database operations, comprising:
-
storing, by a database system, a plurality of expressions in a first data structure, each expression having a plurality of words; storing, by the database system, for each word of the plurality of expressions a corresponding key with at least one associated value into a second data structure, each associated value representing a first plurality of attributes relating to use of the corresponding word in one of the expressions in the first data structure, the first plurality of attributes including at least two of;
(i) an identification of the expression in the first data structure;
(ii) a position of the word in the expression;
(iii) a branch expression number;
(iv) whether the word is a terminal word in the expression; and
(v) whether the word follows arbitrary text;receiving, by the database system, an input sentence having a string of words; comparing, by the database system, a word from the input sentence with each key of the second data structure; evaluating, in the input sentence, for each word that matches a key, the first plurality of attributes associated with the matched key and storing a second plurality of attributes in a third data structure, the second plurality of attributes indicating how use of the matching word in the input sentence compares with use of the word in one of the expressions in the first data structure, the second plurality of attributes including at least one of;
(i) a number of the input sentence;
(ii) a position of the word in the corresponding expression; and
(iii) a position of the word in the input sentence;repeating, by the database system, the comparing step for each word from the input sentence; and
determining, by the database system, based on the first plurality of attributes and the second plurality of attributes if one or more expressions from the first data structure are present in the input sentence. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A non-transitory computer-readable storage medium encoded with executable instructions for phrase matching in database operations, the instructions comprising:
-
storing a plurality of expressions in a first data structure, each expression having a plurality of words; storing, by the database system, for each word of the plurality of expressions a corresponding key with at least one associated value into a second data structure, each associated value representing a first plurality of attributes relating to use of the corresponding word in one of the expressions in the first data structure, the first plurality of attributes including at least two of;
(i) an identification of the expression in the first data structure;
(ii) a position of the word in the expression;
(iii) a branch expression number;
(iv) whether the word is a terminal word in the expression; and
(v) whether the word follows arbitrary text;receiving an input sentence having a string of words; comparing a word from the input sentence with each key of the second data structure;
evaluating, in the input sentence, for each word that matches a key, the first plurality of attributes associated with the matched key and storing a second plurality of attributes in a third data structure, the second plurality of attributes indicating how use of the matching word in the input sentence compares with use of the word in one of the expressions in the first data structure, the second plurality of attributes including at least one of;
(i) a number of the input sentence;
(ii) a position of the word in the corresponding expression; and
(iii) a position of the word in the input sentence;repeating the comparing step for each word from the input sentence; and determining based on the first plurality of attributes and the second plurality of attributes if one or more expressions from the first data structure are present in the input sentence. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A system for phrase matching in database operations, comprising:
-
a processor; and one or more stored sequences of instructions which, when executed by the processor, cause the processor to; store a plurality of expressions in a first data structure, each expression having a plurality of words; store, by the database system, for each word of the plurality of expressions a corresponding key with at least one associated value into a second data structure, each associated value representing a first plurality of attributes relating to use of the corresponding word in one of the expressions in the first data structure, the first plurality of attributes including at least two of;
(i) an identification of the expression in the first data structure;
(ii) a position of the word in the expression;
(iii) a branch expression number;
(iv) whether the word is a terminal word in the expression; and
(v) whether the word follows arbitrary text;receive an input sentence having a string of words; compare a word from the input sentence with each key of the second data structure; evaluate, in the input sentence, for each word that matches a key, the first plurality of attributes associated with the matched key and storing a second plurality of attributes in a third data structure, the second plurality of attributes indicating how use of the matching word in the input sentence compares with use of the word in one of the expressions in the first data structure, the second plurality of attributes including at least one of;
(i) number of the input sentence;
(ii) a position of the word in the corresponding expression; and
(iii) a position of the word in the input sentence;repeat the comparing step for each word from the input sentence; and determine based on the first plurality of attributes and the second plurality of attributes if one or more expressions from the first data structure are present in the input sentence. - View Dependent Claims (16, 17, 18)
-
Specification