METHOD OF INTERPRETING A REQUEST USING A NOVEL DICTIONARY
FIELD OF THE INVENTION: The present invention relates to a method of interpreting a request, using a novel dictionary. The invention further relates to a method of creating the dictionary.
BACKGROUND OF THE INVENTION: When a user enters any request, such as a database query, or a search request, it is very important that the request be interpreted in the right context and implemented accordingly. For example, when a user sends a search request, the search engine must interpret the request correctly to provide a desired result. Interpreting the request implies obtaining the context and purpose of the request sent by the user.
Most search engines are not equipped to interpret requests accurately. On the contrary, requests sent by users are not interpreted at all to understand the context and purpose of the request. A classic example of this is a search conducted on Google or any other web based engine. When a user enters a web search in Google, the search result includes multiple entries, all of which may not be relevant to the user. Often, the most relevant entry may be buried far away, and the user may not be able to access it easily. The search is based on occurrence and not on context of the request. Search engines currently allow a user to use Boolean and arithmetic operations to conduct the search. For example, if the request was "bill gates," all occurrences of the word "bill" and "gates", irrespective of the context of computers, will be part of the search result. For example, all invoices having the word 'bill' will probably be part of the search result. The only way of narrowing the context of the search result is to add words to the search request, such as "computers" or "Microsoft" in this case. The resulting data narrows down the search result, but is still limited by logical operations. These engines fail to capture the context of the search, irrespective of various mathematical operations. Context cannot be understood through arithmetical and logical operations.
Therefore, there is a need to interpret the request in a manner so as to provide
specifically the desired result. Furthermore, to interpret the request correctly, it is important to have a dictionary that assists in interpreting the request accordingly.
BRIEF DESCRIPTION OF THE DIAGRAMS:
Figure 1 illustrates a matrix in the dictionary.
Figure 2 illustrates an embodiment in a matrix in the dictionary.
Figure 3 is a schematic process flow diagram of the invention.
DETAILED DESCRIPTION OF THE INVENTION:
The present invention may be embodied in several forms, structures and manners. Those of skill in the art will appreciate that the invention may be embodied in other forms, structures and manners not shown below. The invention shall have the full scope of the claims and is not to be limited by the embodiments shown below.
In the present disclosure, the words 'a' or 'an' are to be taken to include both the singular and plural. Conversely, a reference to plural items shall, where appropriate, include the singular.
When a user makes a request, such as a search request or a database query, the request is processed to give results, which may not be specific or accurate. In case of a search request, the results may not be specific to the requirements of the user, since the request has not been interpreted with respect to context and purpose of the request. In case of a database query, the result may be erroneous since the user is required to write the request in the right format, such as SQL to communicate with the database, and the user may not enter the query correctly. In this case, a system is needed, which allows the user to enter a request, without a specific format, and process this request after interpreting the context and purpose of the request, and specifically deliver the relevant result to the user. Such a system would require a new dictionary to support the process of interpretation.
The present invention relates to a method of interpreting a request, using a novel dictionary. Furthermore, the invention also relates to a process of creating the dictionary.
A request comprises one or more sentences. In order to interpret the request, the request must be resolved or classified according to a certain principle, the OOOV principle'. The acronym 1OOOV' represents Operation, Object, Option and Value. In an embodiment, an object is any entity that has a purpose or utility. In the embodiment, an operation is an action, which an object can perform, or it is an action, which can be performed on an object. An option is a virtue or a feature of an object, which can be imparted or is inherent. A value is a virtue of an object, which is measurable. Virtues of objects, which are not measurable, are approximated using analogies and a gamut is specified, which is an approximated operational value. To give an example of this principle, an orange is an object, and eating is an operation done on the orange. Size, color, texture are some of the options related to the act of the eating the orange. Pale orange, orange, yellow and green are values for the option, color.
In another embodiment of the invention, the operation, object, option and value are analogous to a verb, object, noun and adjective, respectively. Adverbs in a sentence can be mapped as an option of the operation rather than option of an object. This allows mapping of interpretation from a natural language to a computer language like SQL without distorting interpretation irrespective of translations of the natural language.
Components of the system, such as a parser and a dictionary, are responsible for resolving the request into an operation, an object, an option and value. In a preferred embodiment, the dictionary comprises a plurality of matrices, as is illustrated in Figure 1. Each matrix comprises a plurality of structures. Each structure comprises a word, an attribute tag associated with the word, and a plurality of links. Every word in the dictionary has been classified according to the OOOV principle. Thus, the words are classified into objects, operations, options and values. Every object 115 is associated with one or more operations 120 and 125. An operation and an object together constitute some
utilitarian need. For example, an orange is an object, and eating is an operation performed on the orange, in context to hunger. For each pair of an object and operation, there are a finite number of options, and further, a finite number of values for each option. A two dimensional sparse matrix 105 of options and corresponding range of values is associated for each pair of an object and operation. A sparse matrix is one where there may be no values for a certain number of positions in the matrix.
Every structure in the matrix comprises more than one link as is illustrated in Figure 2 by symbols and arrows. Links are used to point to other structures in the matrix based on the context of the word in the attribute tag. To illustrate this, we consider a classic example of the word 'orange'. An orange can be interpreted in various ways, such as a fruit, a color, and a cell phone service provider. The attribute tag of the word orange 205, a fruit or an object, contains a link pointing to the word 'orange' 210, a value for a cell phone service provider. Therefore, every attribute tag corresponding to a word is unique, with links to similar words, based on a different context, based on predecessors and successors of the word, and when the word has more than one option, value or operation. This forms an inter-linked mesh of 'n' braids of similar word- occurrences in the dictionary and can be pointing to any other member element of a matrix irrespective of dimension of occurrence.
Another embodiment of the invention comprises creating the novel dictionary. The method of creating the dictionary comprises adding a first word to the dictionary, wherein the first word can be classified as an object and has a first context or meaning. Therefore, in an embodiment of the invention, the dictionary is created based on words, which are objects. The next step is to add a plurality of words, wherein the plurality of words can be classified as operations, options and values pertaining to the first word. For example, if the first word is computer, then the plurality of words comprises typing, saving, running, processing, brand, speed, memory, IBM, Dell, Gateway, 10GB, 20 GB, etc. As each word is added to the dictionary, an attribute tag specific to that word is coupled to the word in the dictionary. The attribute tag determines whether the word is an object, an
operation, an option, or a value. Thus, all the words in the dictionary are classified according to the OOOV principle. The steps of adding words are continued till the dictionary, is complete when a range or host of operations that are expected to be delivered from a range of objects are present and supported in the dictionary. Once the dictionary is complete in this respect, the next step is to classify each option related to an operation, such that each option can be represented by a data type. In an embodiment, a data type is a pattern of data, which has a defined behavior. For example, date, integer, string, float, long, short, etc. are data types. This is followed by, finding a data structure that completely represents each option. A data structure is a group of data types, which has an associated search behavior. Examples of data structures are linklist, trees, etc. The final step is to collate each option with relevant data structures to form a matrix.
Another embodiment of the invention comprises, adding a pointer to a position corresponding to a second context of the first word wherein the second context is not the same as the first context. For example, the word 'orange' has a first context fruit and a second context color, and color is not the same as fruit. Therefore, the two contexts have different meanings or references.
A parser checks for syntax and semantics and checks the query for format. As shown in Figure 3, once the parser receives the request 305, the parser in the system first breaks down the request into words with the help of delimiting words, 310. A delimiting character isolates two sets of characters. In one of the preferred embodiments, a delimiting character comprises a comma, a full stop, a colon, a space, and a semi colon. The parser then validates the words using a dictionary 315. Thus, the parser searches for the words in the request, in the dictionary. In one embodiment, if the word is found in the dictionary, the parser replaces the word in the request with a token number of the word in the dictionary. The words in the dictionary are assigned token numbers to utilize resources effectively. Once a word is validated, it is then classified according to the OOOV principle, with the help of the dictionary. Thus, the parser, with the help of the dictionary,
determines the operation, object, option and value contained in the request 320, derives a context of the request 325, and fills the operation, object, option and value in an object interface according to the context 330.
The parser determines the four classes of words in many ways. In an embodiment of the invention, the parser determines one of an object or an operation in the request, using the token number of the word in the dictionary. In an embodiment of the invention, if the word is an object, the parser determines a finite range of operations based on an object attribute tag. In a preferred embodiment, if the word is an operation, the parser determines a finite range of objects based on an operation attribute tag. The operation attribute tag will have links that point only to positions corresponding to the finite range of objects. In other words, the finite range of objects contains only those objects, which can perform the specific operation, which is contained in the request. In another embodiment, if the object in the request does not lie within the finite range of objects determined or expected by the parser, an error message will be give to the user. If the object in the request is present in the finite range of objects, the parser validates the object.
The parser then determines a finite range of options, based on the operation attribute tag and the object attribute tag. If the option in the request is present in the finite range of options, the parser validates the option. In another embodiment of the invention, if the option in the request is not present in the finite range of options, an error message will be given to the user.
Next, the parser determines a finite range of values based on the option attribute tag. If the value in the request is present in the finite range of options, the parser validates the value. In another embodiment, if there is no value present in the request, the parser may use a default value.
Thus, the parser with the help of the dictionary is able to interpret and classify accurately any request received. Once the parser has identified the operation, object, option and value in the request, it derives the context or meaning of request it fills the operation, object, option and value of the request in an object interface according to the context determined. An object interface is an
object-specific data structure, which encapsulates every option defined in a data type, wherein the option can contain any user-specified valid value. The object interface derived from this method of interpretation, using the novel dictionary, enables the user to have access to a well-classified single access point for the object in the user's request. For example, if the request was: "orange", the information resulting from the search would yield every property of the object, orange, every property of the option having value as orange, etc., in a context- specific manner. Once the object interface is available to the user, the user has the option to further narrow the scope of the result.