Frog
Public Member Functions | Static Public Attributes | List of all members
Mbma Class Reference

#include <mbma_mod.h>

Collaboration diagram for Mbma:
Collaboration graph
[legend]

Public Member Functions

 Mbma (TiCC::LogStream *, TiCC::LogStream *=0)
 
 ~Mbma ()
 
bool init (const TiCC::Configuration &)
 
void add_provenance (folia::Document &, folia::processor *) const
 
void Classify (frog_record &)
 
void Classify (const icu::UnicodeString &)
 
void filterHeadTag (const std::string &)
 
void filterSubTags (const std::vector< std::string > &)
 
void assign_compounds ()
 
std::vector< std::string > getResult () const
 
std::vector< std::pair< std::string, std::string > > getResults () const
 
std::vector< std::pair< std::string, std::string > > getPrettyResults () const
 
void setDeepMorph (bool b)
 
void clearAnalysis ()
 
RulematchRule (const std::vector< std::string > &, const icu::UnicodeString &)
 
std::vector< Rule * > execute (const icu::UnicodeString &, const std::vector< std::string > &)
 
std::string version () const
 
void add_morphemes (const std::vector< folia::Word * > &, const frog_data &fd) const
 

Static Public Attributes

static std::map< std::string, std::string > TAGconv
 
static std::string mbma_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbma-nl"
 
static std::string pos_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn"
 
static std::string clex_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-clex"
 

Constructor & Destructor Documentation

◆ Mbma()

Mbma::Mbma ( TiCC::LogStream *  errlog,
TiCC::LogStream *  dbglog = 0 
)
explicit

create an Mbma classifier object

Parameters
errlogthe LogStream to use for Error messages
dbglogthe LogStream to use for Debug messages

◆ ~Mbma()

Mbma::~Mbma ( )

the mbma destructor

Member Function Documentation

◆ add_morphemes()

void Mbma::add_morphemes ( const std::vector< folia::Word * > &  wv,
const frog_data fd 
) const

◆ add_provenance()

void Mbma::add_provenance ( folia::Document &  doc,
folia::processor *  main 
) const

add provenance information to the FoLiA document

Parameters
docthe foLiA document we are working on
mainthe main processor (presumably Frog) we want to add a new one to

◆ assign_compounds()

void Mbma::assign_compounds ( )

add compound information to the result

◆ Classify() [1/2]

void Mbma::Classify ( const icu::UnicodeString &  word)

◆ Classify() [2/2]

void Mbma::Classify ( frog_record fd)

◆ clearAnalysis()

void Mbma::clearAnalysis ( )

◆ execute()

vector< Rule * > Mbma::execute ( const icu::UnicodeString &  word,
const std::vector< std::string > &  classes 
)

attempt to find matching Rules

Parameters
worda word to check
classesthe Timbl classifications
Returns
0 or more matching Rules

◆ filterHeadTag()

void Mbma::filterHeadTag ( const std::string &  head)

reduce the Mbms analysis by removing all solutions where the head is not matched

Parameters
headthe head-tag that is required matching does not mean equality. We are a forgivingful in the sense that
N matches PN
A matches B and vv
A matches V

◆ filterSubTags()

void Mbma::filterSubTags ( const std::vector< std::string > &  feats)

reduce the analyses set based on sub-features

Parameters
featsa list of subfeatures when a candidate Rule has inflexion it should match a feature.

Other criteria: only take the highest confidence, and remove Rules that yield the same analysis.

Example:

The word 'appel' is according to Mbma an N with inflection e ('enkelvoud')
The tagger will assign an N too, with features [soort,ev,basis,zijd,stan]
one of the features, 'ev' will match the 'e' inflection after translation
so this is a good reading

◆ getPrettyResults()

vector< pair< string, string > > Mbma::getPrettyResults ( ) const

◆ getResult()

vector< string > Mbma::getResult ( ) const

◆ getResults()

vector< pair< string, string > > Mbma::getResults ( ) const

◆ init()

bool Mbma::init ( const TiCC::Configuration &  config)

initialize the Mbma analyzer using the config

Parameters
configthe Configuration to use
Returns
true when no problems are detected

◆ matchRule()

Rule * Mbma::matchRule ( const std::vector< std::string > &  ana,
const icu::UnicodeString &  word 
)

attempt to match an Analysis on a word

Parameters
anaone analysis result, expanded from the Timbl classifier
worda Unicode Word to check
Returns
a matched Rule or 0

◆ setDeepMorph()

void Mbma::setDeepMorph ( bool  b)
inline

◆ version()

std::string Mbma::version ( ) const
inline

Member Data Documentation

◆ clex_tagset

string Mbma::clex_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-clex"
static

◆ mbma_tagset

string Mbma::mbma_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbma-nl"
static

◆ pos_tagset

string Mbma::pos_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn"
static

◆ TAGconv

map< string, string > Mbma::TAGconv
static

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