Parses a string and stores the resulting hierarchy of
"domains" "hierarchies" and "tables"
For the sake of NLP I've parsed the string using the nltk_lite context
free grammar library.
A query is a "sentence" and can either be a domain,
hierarchy or a table. A domain is simply a word. A hierarchy is expressed
as "domain/domain" A table is exressed as "table(sentence,
sentence, sentence)"
Internally the query is represented as a nltk_lite.parse.tree
Process:
-
string is tokenized
-
develop a context free grammar
-
parse
-
convert to a tree representation
|