Method and Device for Performing Natural Language Searches
OwnerNadine Sina Kurzinventor
Life of this patent
Estimating the term…
Abstract
A digital device and a method for parsing a query, in particular a natural language query, and retrieving results from possibly multiple data sources such as relational databases or the Semantic Web. The method includes a parsing procedure for generating a graph-based logical representation of the query using semantically structured resources, consisting of a tokenizer, a node generator, a relationship generator, and a focus identificator. The digital device realizes a modularized architecture, consisting of a parser enabling the processing of a query with possibly multiple vocabularies, a query performer retrieving data of knowledge sources independently from their database management system, and a result processor merging the results.
Claims14
Digital device, in particular digital computer such as a server or a client or a mobile digital device, connected with at least one database containing semantically structured resources, preferably on a network like the Internet, comprising:
- i. query input circuitry for entering, generating or receiving a query, in particular a natural language query,
- ii. a parser for processing a query including:
- a) a tokenizer operatively connected with at least one lexicon, for example a vocabulary database, for segmenting the query into terms, in particular one or more words, and mapping them into semantic tokens via the lexicon,
- wherein the lexicon contains at least the token type of a semantic token, in particular class, role, instance and/or constraint,
- b) a node/relationship/focus generator for generating the one or more nodes and/or one or more relationships for each semantic token with a predefined token type, distinguishing between terminal and non-terminal nodes or relationships and selecting a non-terminal node or a non-terminal relationship as a focus,
- iii. a query performer for generating a database query for the focus and the token type of the semantic tokens determined in the previous steps and sending it to the at least one database,
- iv. a result processor for receiving responses from the at least one database and listing, structuring, ranking and/or merging them,
- v. result output circuitry for displaying, indicating, storing or sending the processed results.
Apparatus for performing natural language searches comprising:
- i. at least one user input interface for entering user queries,
- ii. a digital processor directly or indirectly connected with said user interface, and further directly or indirectly connected with instruction/data storage means including:
- a) a tokenizer memory containing instructions and/or data for tokenizing such user-entered queries from terms into semantic tokens, wherein such tokenizer is connected with at least one lexicon,
- b) a node/relationship memory containing instructions and/or data, in particular node pattern data, for generating nodes and/or relationships for semantic tokens with a predefined token type,
- c) a relationship memory containing instructions and/or data, in particular relationship pattern data, for generating further relationships between the nodes,
- d) a focus memory containing instructions and/or data, in particular focus pattern data, for selecting a non-terminal node,
- e) a query memory containing instructions and/or data for generating a database query and sending it to at least one database operatively connected with the digital processor,
- f) a results memory containing instructions and/or data for processing responses from the at least one database,
- iii. at least one user output interface directly or indirectly connected with said digital processor for displaying, indicating or storing the received results.
Parser for a natural language search engine including:
- a) a tokenizer operatively connected with a lexicon,
- b) a node/relationship generator for generating at least one node and/or a relationship for a semantic token with a predefined token type, in particular a class, a role, an instance and/or a constraint,
- c) a relationship generator for generating further relationships between the nodes until a full representation of a mathematical graph is obtained, and
- d) a focus generator for selecting a non-terminal node or a non-terminal relationship, preferably the most relevant non-terminal node or the most relevant non-terminal relationship.
Method, in particular computer-implemented method or method implemented by digital electronic components, for retrieving results in response to a query, preferably a user-defined natural language query, from semantically structured resources stored in at least one database, comprising the steps of:
- i. tokenizing the query by segmenting the query into terms, in particular one or multiple words, and mapping them into semantic tokens using at least one lexicon, wherein such lexicon contains at least the token type of a semantic token, in particular class, role, instance and/or constraint,
- ii. generating a representation, preferably a representation incorporating a mathematical graph, of the semantic tokens associated with the segmentation performed in step (i), and determining the representation's focus, by employing a set of rules or patterns for such focus based on the token type, for example class, role, instance and/or constraint, of the semantic tokens,
- wherein the rules or patterns define one or more nodes, and/or one or more relationships between nodes, associated with the token type of the semantic tokens, and
- the rules or patterns distinguish between terminal and non-terminal nodes and relationships, and characterize one of the non-terminal nodes or relationships as the query's focus,
- iii. generating a database query, for example an SQL, SPARQL or XQuery query, from the graph-based intermediate representation determined in steps i) and ii) and sending it to the at least one database,
- iv. retrieving a response from the at least one database.
Method according to claim 10, wherein the step of tokenizing the query includes the steps of
- a) segmenting the query into terms, in particular one or multiple words,
- b) mapping the terms into semantic tokens using at least one lexicon, wherein such lexicon contains at least the token type of a token, in particular class, role, instance and/or constraint,
- c) calculating the probability that such segmentation is appropriate,
- d) repeating steps a) to c) at least one more time for a different segmentation,
- e) comparing the probabilities of different segmentations and selecting a segmentation with a high probability, in particular the segmentation with the highest probability,
- f) performing step ii) of claim 11 based on the selected segmentation.
Dependencies are inferred from the claim text.