Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

BOSS Namespace Reference


Classes

class  Config
struct  FileOpenError
 General critical module problem. Is thrown when there is no object available for the specified language. More...

struct  FileFormatError
struct  StringFormatError
struct  ItemNotFound
struct  KeyNotFound
struct  NoRegexMatch
 Exception Handler. Used by BOSS::FSA. More...

class  FSA
 BOSS::FSA is a finite-state automaton that splits a string into substrings defined by regular expressions. More...

class  Module
class  t_OptItem
struct  Fileinfo
class  CommandLine
 A class for parsing and storing command line options. More...

class  MMFInputStream
class  MMFInputSource
class  Phimbl
struct  Phimbl::t_Node
struct  Phimbl::t_Node::t_Child
struct  Phimbl::t_Data
struct  Phimbl::t_classes
struct  Phimbl::t_features

Typedefs

typedef const char * t_ConstCharPtr
typedef unsigned char t_UChar
typedef unsigned short t_UShort
typedef unsigned int t_UInt
typedef pair< string, string > t_SSPair
typedef pair< unsigned, string > t_USPair
typedef pair< unsigned, unsigned > t_UUPair
typedef pair< t_UChar, string > t_CSPair
typedef pair< t_UChar, t_UChart_CCPair
typedef vector< string > t_SVector
typedef vector< unsigned > t_UVector
typedef vector< t_USPairt_USPairVector
typedef vector< t_SSPairt_SSPairVector
typedef vector< t_UUPairt_UUPairVector
typedef t_UVector::iterator t_UVectorIt
typedef t_UVector::const_iterator t_UVectorCIt
typedef vector< xercesc::DOMNode * > DOMNodeVector

Functions

t_USPairVector readS1LabelTable (const string &name) throw (BOSS::FileOpenError, BOSS::FileFormatError)
 This function reads an s1 label file (obsolete) and returns it as a pair vector.

t_SSPairVector readTwoStringTable (const string &name) throw (BOSS::FileOpenError, BOSS::FileFormatError)
 This function reads tables with two columns and returns them as a string pair vector.

string addSlash (const string &s)
 This function adds a slash to the string s and returns the modified string.

string makeInvFileName (const string &pref, const string &inv, const string &file) throw (BOSS::FileFormatError)
 This function substitutes the tag with the string given by inv.

string makeFilePath (const string &pref, const string &file) throw (BOSS::FileFormatError)
 This function concatenates a file path with a file name.

t_CSPair removePunctuation (const string &word)
 This function removes a punctuation symbol (.,;:!?) from the string given as argument.

string my_tolower (string s)
 This function maps upper-case characters of string s to lower case ones.

t_CSPair cleanWordPunctuation (const string &w)
 Removes punctuation symbols. This function removes a punctuation symbol (.,;:!?) from the string given as argument. The return value is an STL pair. The first element contains the puncuation symbol, the second the string without the symbol.

BOSS::Fileinfo getFileinfo (const string &s)
 Extracts file information. This function separates path, name and extension from a given filename/path string and returns a struct of type Fileinfo (see boss_types.h) containing this information.

string getDate ()
 Returns date.

bool hasAttribute (const xercesc::DOMNode *n, string as)
bool hasAttribute (const xercesc::DOMElement *e, string as)
string getAttrByName (const xercesc::DOMElement *e, string as)
string getAttrByName (const xercesc::DOMNode *n, string as)
void createLists (const xercesc::DOMNode *start_node, const char *node_name, DOMNodeVector &list)
void setAttribute (xercesc::DOMElement *e, const char *name, const char *value)
xercesc::DOMNodeList * getElementsByTagName (const xercesc::DOMElement *e, const char *name)
xercesc::DOMNodeList * getElementsByTagName (const xercesc::DOMDocument *d, const char *name)
xercesc::DOMElement * createElement (xercesc::DOMDocument *doc, const char *name)
bool compareNodeName (const xercesc::DOMNode *node, const string &name)
string getNodeName (const xercesc::DOMNode *node)
string getNodeValue (const xercesc::DOMNode *node)
void * getUserData (const xercesc::DOMNode *node)
void setUserData (const xercesc::DOMNode *node, void *data)
void initXML ()
void initTranscoder ()
xercesc::XMLTranscoder * initTranscoder (string name)
xercesc::DOMDocument * parseXMLFile (const char *xml_file)
xercesc::DOMDocument * parseXMLFromMemory (const string input)
void writeLabels (const xercesc::DOMNode *sentence, const string &fname)
void getLabels (const xercesc::DOMNode *node, vector< vector< string > > &file, unsigned &last)


Typedef Documentation

typedef vector< xercesc::DOMNode* > BOSS::DOMNodeVector
 

typedef pair< t_UChar, t_UChar > BOSS::t_CCPair
 

typedef const char* BOSS::t_ConstCharPtr
 

typedef pair< t_UChar, string > BOSS::t_CSPair
 

typedef pair< string, string > BOSS::t_SSPair
 

typedef vector< t_SSPair > BOSS::t_SSPairVector
 

typedef vector< string > BOSS::t_SVector
 

typedef unsigned char BOSS::t_UChar
 

typedef unsigned int BOSS::t_UInt
 

typedef unsigned short BOSS::t_UShort
 

typedef pair< unsigned, string > BOSS::t_USPair
 

typedef vector< t_USPair > BOSS::t_USPairVector
 

typedef pair< unsigned, unsigned > BOSS::t_UUPair
 

typedef vector< t_UUPair > BOSS::t_UUPairVector
 

typedef vector< unsigned > BOSS::t_UVector
 

typedef t_UVector::const_iterator BOSS::t_UVectorCIt
 

typedef t_UVector::iterator BOSS::t_UVectorIt
 


Function Documentation

string BOSS::addSlash const string &  s  ) 
 

This function adds a slash to the string s and returns the modified string.

Parameters:
s input string
Returns:
modified string

BOSS::t_CSPair BOSS::cleanWordPunctuation const string &  w  ) 
 

Removes punctuation symbols. This function removes a punctuation symbol (.,;:!?) from the string given as argument. The return value is an STL pair. The first element contains the puncuation symbol, the second the string without the symbol.

Parameters:
w input string
Returns:
pair of punctuation symbol and modified string

bool BOSS::compareNodeName const xercesc::DOMNode *  node,
const string &  name
 

xercesc::DOMElement * BOSS::createElement xercesc::DOMDocument *  doc,
const char *  name
 

void BOSS::createLists const xercesc::DOMNode *  start_node,
const char *  node_name,
DOMNodeVector &  list
 

string BOSS::getAttrByName const xercesc::DOMNode *  n,
string  as
 

string BOSS::getAttrByName const xercesc::DOMElement *  e,
string  as
 

xercesc::DOMNodeList * BOSS::getElementsByTagName const xercesc::DOMDocument *  d,
const char *  name
 

xercesc::DOMNodeList * BOSS::getElementsByTagName const xercesc::DOMElement *  e,
const char *  name
 

BOSS::Fileinfo BOSS::getFileinfo const string &  s  ) 
 

Extracts file information. This function separates path, name and extension from a given filename/path string and returns a struct of type Fileinfo (see boss_types.h) containing this information.

Parameters:
s path
Returns:
file info object

void BOSS::getLabels const xercesc::DOMNode *  node,
vector< vector< string > > &  file,
unsigned &  last
 

string BOSS::getNodeName const xercesc::DOMNode *  node  ) 
 

string BOSS::getNodeValue const xercesc::DOMNode *  node  ) 
 

void * BOSS::getUserData const xercesc::DOMNode *  node  ) 
 

bool BOSS::hasAttribute const xercesc::DOMElement *  e,
string  as
 

bool BOSS::hasAttribute const xercesc::DOMNode *  n,
string  as
 

xercesc::XMLTranscoder * BOSS::initTranscoder string  name  ) 
 

void initTranscoder  ) 
 

void BOSS::initXML  ) 
 

string BOSS::makeFilePath const string &  pref,
const string &  file
throw (BOSS::FileFormatError)
 

This function concatenates a file path with a file name.

Returns:
string containing filepath

string BOSS::makeInvFileName const string &  pref,
const string &  inv,
const string &  file
throw (BOSS::FileFormatError)
 

This function substitutes the tag with the string given by inv.

This function substitutes the tag with the string given by inv. The inventory tag must be contained in "pref". (obsolete)

Exceptions:
StringFormatError if the inventory tag is not contained in pref

string BOSS::my_tolower string  s  ) 
 

This function maps upper-case characters of string s to lower case ones.

Parameters:
s input string
Returns:
modified string

xercesc::DOMDocument * BOSS::parseXMLFile const char *  xml_file  ) 
 

xercesc::DOMDocument * BOSS::parseXMLFromMemory const string  input  ) 
 

BOSS::t_USPairVector BOSS::readS1LabelTable const string &  name  )  throw (BOSS::FileOpenError, BOSS::FileFormatError)
 

This function reads an s1 label file (obsolete) and returns it as a pair vector.

S1 label file contains a header ending with the word hend. Each label consists of an unsigned value and a string. The unsigned value gives the start position of the label in samples. The return value of this function is an STL vector containing the labels as STL pairs. The first element of such a pair is of type unsigned, the second element of type std::string

Exceptions:
FileOpenError if file open fails
FileFormatError if file read fails

BOSS::t_SSPairVector BOSS::readTwoStringTable const string &  name  )  throw (BOSS::FileOpenError, BOSS::FileFormatError)
 

This function reads tables with two columns and returns them as a string pair vector.

This function reads tables with two columns. Both columns are interpreted as std::strings. The function returns a vector containing the rows of the table as an STL pair.

Returns:
a vector containing the read table
Exceptions:
FileOpenError if file open fails.
FileFomatError if file read fails.

t_CSPair removePunctuation const string &  word  ) 
 

This function removes a punctuation symbol (.,;:!?) from the string given as argument.

void BOSS::setAttribute xercesc::DOMElement *  e,
const char *  name,
const char *  value
 

void BOSS::setUserData const xercesc::DOMNode *  node,
void *  data
 

void BOSS::writeLabels const xercesc::DOMNode *  sentence,
const string &  fname
 


Generated on Tue Dec 20 23:14:41 2005 for BOSS by doxygen 1.3.6