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

lemur::dictionary::DictEntry Class Reference

container for dictionary entries. More...

#include <PDict.hpp>

List of all members.

Public Member Functions

 DictEntry ()
 constructor

 DictEntry (const string &targ, const string &typ, double pr)
 constructor

char * toBytes (int &numBytes) const
 Encode for binary writing.

int toBytes (char *buffer) const
 Encode for binary writing.

int numBytes () const
 Determine size needed to encode for binary writing.

int fromBytes (char *buffer)
 Initialize from an array of bytes.

bool operator== (const DictEntry &a) const
 Equality on target and type attributes only.

string toString (string delim=";") const

Public Attributes

string target
 The target language term.

string type
 POS, etc.

double prob
 freq or Prob


Detailed Description

container for dictionary entries.


Constructor & Destructor Documentation

lemur::dictionary::DictEntry::DictEntry  ) 
 

constructor

lemur::dictionary::DictEntry::DictEntry const string &  targ,
const string &  typ,
double  pr
[inline]
 

constructor


Member Function Documentation

int lemur::dictionary::DictEntry::fromBytes char *  buffer  ) 
 

Initialize from an array of bytes.

Parameters:
buffer data to initialize from
Returns:
number of bytes consumed.

int lemur::dictionary::DictEntry::numBytes  )  const
 

Determine size needed to encode for binary writing.

Returns:
number of bytes needed to encode as an array of bytes.

bool lemur::dictionary::DictEntry::operator== const DictEntry a  )  const [inline]
 

Equality on target and type attributes only.

int lemur::dictionary::DictEntry::toBytes char *  buffer  )  const
 

Encode for binary writing.

Parameters:
buffer char to encode this entry into.
Returns:
number of bytes used.

char* lemur::dictionary::DictEntry::toBytes int &  numBytes  )  const
 

Encode for binary writing.

Parameters:
numBytes returns length of return value.
Returns:
this entry encoded as an array of bytes.

string lemur::dictionary::DictEntry::toString string  delim = ";"  )  const
 


Member Data Documentation

double lemur::dictionary::DictEntry::prob
 

freq or Prob

string lemur::dictionary::DictEntry::target
 

The target language term.

string lemur::dictionary::DictEntry::type
 

POS, etc.


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4