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

Public Member Functions

 mootModelSpec (const std::string &modelname="", bool try_bin=true)
 
void clear (void)
 
bool empty (void) const
 
bool isbinary (void) const
 
bool parse (const std::string &modelname, bool try_bin=true)
 

Public Attributes

std::string binfile
 (bin): filename of binary model; overrides text model options More...
 
std::string lexfile
 (txt): filename of lexical frequency file More...
 
std::string ngfile
 (txt): filename of n-gram frequency file More...
 
std::string lcfile
 (txt): filename of lexical-class frequency file More...
 
std::string flafile
 (txt): filename of flavor heuristic file More...
 

Detailed Description

Utility class for mootHMM::load_model() and friends See mootfiles(5) for details

Constructor & Destructor Documentation

◆ mootModelSpec()

moot::mootModelSpec::mootModelSpec ( const std::string &  modelname = "",
bool  try_bin = true 
)
inline

Default constructor given an optional model name calls parse()

References clear(), empty(), and parse().

Member Function Documentation

◆ clear()

void moot::mootModelSpec::clear ( void  )

Clear the specification

Referenced by mootModelSpec().

◆ empty()

bool moot::mootModelSpec::empty ( void  ) const

Returns true iff model-spec is empty

Referenced by mootModelSpec().

◆ isbinary()

bool moot::mootModelSpec::isbinary ( void  ) const
inline

Returns true iff this is a binary model

References parse().

◆ parse()

bool moot::mootModelSpec::parse ( const std::string &  modelname,
bool  try_bin = true 
)

Parse a single modelname; if try_bin is true, existence of a binary file modelname clobbers any text model in modelname.*

Returns
true iff at least one component model file exists

Referenced by isbinary(), and mootModelSpec().

Member Data Documentation

◆ binfile

std::string moot::mootModelSpec::binfile

◆ lexfile

std::string moot::mootModelSpec::lexfile

◆ ngfile

std::string moot::mootModelSpec::ngfile

◆ lcfile

std::string moot::mootModelSpec::lcfile

◆ flafile

std::string moot::mootModelSpec::flafile

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