|
Natural Language Processing
0.1.0
|
The QueryGenerator class. More...
#include <CorpusQueryGenerator.h>
Public Member Functions | |
| QueryGenerator () | |
| Empty constructor. | |
| string | getQueryOf (const SyntaxTree &sentence) |
| getQueryOf More... | |
| string | getInsertionQuery (const vector< SyntaxWord > &WordList) |
| see implementation for comment More... | |
| string | getQuestionQuery (const vector< SyntaxWord > &WordList, const SyntaxObject &SObjBeingAsked) |
| QueryGenerator::getQuestionQuery From a structure of wordlist, generate valid query. More... | |
The QueryGenerator class.
Class will convert the given SyntaxTree to a valid SQLite statements and pass it to OntologyDatabase for further process
To generate valid SQLite, the class will determine whether a SyntaxTree has DECLARATIVE , or INTERROGATIVE form of sentence.
| string QueryGenerator::getInsertionQuery | ( | const vector< SyntaxWord > & | WordList | ) |
see implementation for comment
getInsertionQuery
| WordList |
| string QueryGenerator::getQueryOf | ( | const SyntaxTree & | sentence | ) |
getQueryOf
| sentence | : with syntax |
First, determine what kind of sentence a tree has
| string QueryGenerator::getQuestionQuery | ( | const vector< SyntaxWord > & | WordList, |
| const SyntaxObject & | SObjBeingAsked | ||
| ) |
QueryGenerator::getQuestionQuery From a structure of wordlist, generate valid query.
| WordList |
depending on what being asked, produce a query
Chop the last " AND "
1.8.6