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

The Parser class The Parser class. It takes a Grammar Structure and a vector of Words to create a vector of all possible Syntax Trees that follow the Grammar Structure and matches the vector of Words. More...

#include <parser.h>

Public Member Functions

 Parser ()
 Parser::Parser Default Constructor.
 
 Parser (const Grammar &G, const Wvector &words)
 Parser::Parser Constructor. More...
 
void setGrammar (const Grammar &G)
 Parser::setGrammar Set the Grammar. More...
 
void setSentence (const Wvector &W)
 Parser::setSentence Set the sentence. More...
 
Grammar getGrammar ()
 Parser::getGrammar Returns the grammar. More...
 
Wvector getSentence ()
 Parser::getSentence Returns the sentence. More...
 
STvector getTrees ()
 Parser::getTrees Returns the valid syntax trees. More...
 
STvector parse ()
 Parser::parse Parses the sentence and creates the trees. More...
 
std::vector< SyntaxWordgetAll (const SyntaxTree &S)
 Parser::getAll returns a vector of all syntax words. More...
 
std::vector< SyntaxWordgetObj (const SyntaxTree &S, SyntaxObject O)
 Parser::getObj returns a vector of the syntax. More...
 

Detailed Description

The Parser class The Parser class. It takes a Grammar Structure and a vector of Words to create a vector of all possible Syntax Trees that follow the Grammar Structure and matches the vector of Words.

Constructor & Destructor Documentation

Parser::Parser ( const Grammar G,
const Wvector &  words 
)

Parser::Parser Constructor.

Parameters
GGrammar
wordsWords

Member Function Documentation

std::vector< SyntaxWord > Parser::getAll ( const SyntaxTree S)

Parser::getAll returns a vector of all syntax words.

Parameters
Sthe syntax tree
Returns
the vector
Grammar Parser::getGrammar ( )

Parser::getGrammar Returns the grammar.

Returns
grammar
std::vector< SyntaxWord > Parser::getObj ( const SyntaxTree S,
SyntaxObject  O 
)

Parser::getObj returns a vector of the syntax.

Parameters
Sthe syntax tree
Othe syntax object
Returns
the vector
Wvector Parser::getSentence ( )

Parser::getSentence Returns the sentence.

Returns
sentence
STvector Parser::getTrees ( )

Parser::getTrees Returns the valid syntax trees.

Returns
the syntax trees
STvector Parser::parse ( )

Parser::parse Parses the sentence and creates the trees.

Returns
the trees
void Parser::setGrammar ( const Grammar G)

Parser::setGrammar Set the Grammar.

Parameters
GGrammar
void Parser::setSentence ( const Wvector &  W)

Parser::setSentence Set the sentence.

Parameters
Wthe sentence

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