This module is able to store information about a tagset, and offers some useful functions on PoS tags and morphological features.
This module is internally used by some analyzers (e.g. probabilities module, HMM tagger, feature extraction, ...) but can be instantiated and called by any user application that requires it.
The API of the module is:
class tagset { public: /// constructor: load a tag set description file tagset(const std::wstring &f); /// destructor ~tagset(); /// get short version of given tag std::wstring get_short_tag(const std::wstring &tag) const; /// get list of <feature,value> pairs with morphological /// information for given tag std::list<std::pair<std::wstring,std::wstring> > get_msf_features(const std::wstring &tag) const; /// get list <feature,value> pairs with morphological /// information, in a string format std::wstring get_msf_string(const std::wstring &tag) const; };
The class constructor receives a file name with a tagset description. Format of the file is described below. The class offers two services: