Natural Language Processing  0.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
QueryGenerator Class Reference

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...
 

Detailed Description

The QueryGenerator class.

Note
Require "SyntaxTree"

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.

Member Function Documentation

string QueryGenerator::getInsertionQuery ( const vector< SyntaxWord > &  WordList)

see implementation for comment

getInsertionQuery

Parameters
WordList
Note
here's where conversion to sql language takes place
Returns
string of SQLite command
string QueryGenerator::getQueryOf ( const SyntaxTree sentence)

getQueryOf

Parameters
sentence: with syntax
Note
: Ambiguity of sentence type should be taken care of before using This functions
Returns

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.

Parameters
WordList
Returns

depending on what being asked, produce a query

Chop the last " AND "


The documentation for this class was generated from the following file: