Natural Language Processing  0.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Attributes | List of all members
NLP::Converter Class Reference

Class to process a sentence and generate the list of words and it's corresponding datas. More...

#include <converter.h>

Public Member Functions

 Converter ()
 Converter::Converter Default constructor that takes no string,. More...
 
 Converter (const string &sentence)
 Constructor first setup the list of tokens from a sentence Then, connect Dictionary database to a private QSqlDatabase variable This database will be used by any query created in this class. More...
 
void setString (const string &newstr)
 Converter::setString set string to reconvert. More...
 
vector< WordgetWords ()
 Function to finalize the list of words to be returned, along with its corresponding roles. More...
 
 ~Converter ()
 no dynamic thing to destroy for now
 

Static Public Attributes

static QSqlDatabase mDb = QSqlDatabase::addDatabase("QSQLITE", "ENG_DICT")
 

Detailed Description

Class to process a sentence and generate the list of words and it's corresponding datas.

Constructor & Destructor Documentation

NLP::Converter::Converter ( )

Converter::Converter Default constructor that takes no string,.

Note
It is better to use only one class instead of making new instance everythin a conversion is needed // TODO : Do the same for STokenize
NLP::Converter::Converter ( const string &  sentence)

Constructor first setup the list of tokens from a sentence Then, connect Dictionary database to a private QSqlDatabase variable This database will be used by any query created in this class.

Parameters
sentence

Member Function Documentation

vector< Word > NLP::Converter::getWords ( )

Function to finalize the list of words to be returned, along with its corresponding roles.

Returns
list<Word>

Check if its an alphabet

Get the string

Capitalize needed for dictionary lookup

Extract the possible types into sets

Add to the list of words

void NLP::Converter::setString ( const string &  newstr)

Converter::setString set string to reconvert.

Parameters
newstr

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