Public Types | Public Member Functions | Public Attributes | List of all members
moot::mootEval Class Reference

Tagger-evaluation utility class.

Public Types

enum  evalStatus {
  MEF_None = 0x0000, MEF_TokMismatch = 0x0002, MEF_BestMismatch = 0x0004, MEF_EmptyClass1 = 0x0008,
  MEF_EmptyClass2 = 0x0010, MEF_ImpClass1 = 0x0020, MEF_ImpClass2 = 0x0040, MEF_XImpClass1 = 0x0080,
  MEF_XImpClass2 = 0x0100
}
 

Public Member Functions

 mootEval (void)
 
void clear (void)
 
int compareTokens (const mootToken &tok1, const mootToken &tok2)
 
bool isTokenMismatch (void)
 
bool isBestMismatch (void)
 
bool isEmptyClass1 (void)
 
bool isEmptyClass2 (void)
 
bool isImpClass1 (void)
 
bool isImpClass2 (void)
 
bool isXImpClass1 (void)
 
bool isXImpClass2 (void)
 
string status_string (void)
 

Public Attributes

int status
 

Member Enumeration Documentation

◆ evalStatus

Enum for evaluation flags

Enumerator
MEF_None 

no errors

MEF_TokMismatch 

token-text mismatch

MEF_BestMismatch 

best-tag mismatch

MEF_EmptyClass1 

empty class in 1st token

MEF_EmptyClass2 

empty class in 2nd token

MEF_ImpClass1 

Impossible class in 1st token ( $ besttag1 \not\in class1 $)

MEF_ImpClass2 

Impossible class in 2nd token ( $ besttag2 \not\in class2 $)

MEF_XImpClass1 

X-Impossible class in 1st token ( $ besttag1 \not\in class2 $)

MEF_XImpClass2 

X-Impossible class in 2nd token ( $ besttag2 \not\in class1 $)

Constructor & Destructor Documentation

◆ mootEval()

moot::mootEval::mootEval ( void  )
inline

Member Function Documentation

◆ clear()

void moot::mootEval::clear ( void  )
inline

Clear the object

References compareTokens(), and MEF_None.

◆ compareTokens()

int moot::mootEval::compareTokens ( const mootToken tok1,
const mootToken tok2 
)

Compare content of two mootToken objects : returns binary OR'd evalStatus flags

Note
You must call this before any of the is*() methods will return meaningful values.

Referenced by clear().

◆ isTokenMismatch()

bool moot::mootEval::isTokenMismatch ( void  )
inline

Compare content of two mootSentence objects True after compareTokens(tok1,tok2) iff tokens mismatchedw

References MEF_TokMismatch.

◆ isBestMismatch()

bool moot::mootEval::isBestMismatch ( void  )
inline

True after compareTokens(tok1,tok2) iff best-tags mismatched

References MEF_BestMismatch.

◆ isEmptyClass1()

bool moot::mootEval::isEmptyClass1 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok1 had empty analyses: iff $ tok1.analyses() = \emptyset$

References MEF_EmptyClass1.

◆ isEmptyClass2()

bool moot::mootEval::isEmptyClass2 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok2 had empty analyses: iff $ tok2.analyses() = \emptyset $

References MEF_EmptyClass2.

◆ isImpClass1()

bool moot::mootEval::isImpClass1 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok1 had impossible non-empty analysis-set: iff $(tok1.besttag() \not\in tok1.analyses())$

References MEF_ImpClass1.

◆ isImpClass2()

bool moot::mootEval::isImpClass2 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok2 had impossible non-empty analysis-set: iff $(tok2.besttag() \not\in tok2.analyses())$

References MEF_ImpClass2.

◆ isXImpClass1()

bool moot::mootEval::isXImpClass1 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok1 had cross-impossible non-empty analysis-set: iff $(tok2.besttag() \not\in tok1.analyses())$

References MEF_XImpClass1.

◆ isXImpClass2()

bool moot::mootEval::isXImpClass2 ( void  )
inline

True after compareTokens(tok1,tok2) iff tok2 had cross-impossible non-empty analysis-set: iff $(tok1.besttag() \not\in tok2.analyses())$

References MEF_XImpClass2, and status_string().

◆ status_string()

string moot::mootEval::status_string ( void  )

Returns canonical string-form of a mootEvalFlag: this string 3 fields of 2 ASCII characters each, each character corresponding to one of the bits in flags. The output looks like:

{:Tok:}{:Best:}":"{:Empty1:}{:Imp1:}{:XImp1:}":"{:Empty2:}{:Imp2:}{:XImp2:}

where a literal '-' indicates an unset flag, and any other character indicates that the flag is set. The actual characters used are mnemonics for the corresponding flags:

(t|-)(b|-):(e|-)(i|-)(x|-):(e|-)(i|-)(x|-)

Referenced by isXImpClass2().

Member Data Documentation

◆ status

int moot::mootEval::status

status flags for this object


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