FreeLing  3.1
Public Member Functions | Private Member Functions | Private Attributes
freeling::tagset Class Reference

The class tagset handles PoS tags long to short conversion and morphosintactic feature decomposition. More...

#include <tagset.h>

List of all members.

Public Member Functions

 tagset (const std::wstring &f)
 constructor: load a map file
 ~tagset ()
 destructor
std::wstring get_short_tag (const std::wstring &tag) const
 get short version of given tag
std::list< std::pair
< std::wstring, std::wstring > > 
get_msf_features (const std::wstring &tag) const
 get list of <feature,value> pairs with morphological information
std::wstring get_msf_string (const std::wstring &tag) const
 get list <feature,value> pairs with morphological information, in a string format

Private Member Functions

std::list< std::pair
< std::wstring, std::wstring > > 
compute_msf_features (const std::wstring &tag) const
 decompose a tag in morphological features

Private Attributes

const std::wstring PAIR_SEP
const std::wstring MSD_SEP
std::map< std::wstring,
std::wstring > 
feat
 maps to store PoS tags translation rules and features.
std::map< std::wstring,
std::wstring > 
val
std::map< std::wstring,
std::pair< std::wstring,
std::wstring > > 
direct
 short tag+mfs for direct entry rules
std::map< std::wstring, intshtag_size
 size for short version of the tag

Detailed Description

The class tagset handles PoS tags long to short conversion and morphosintactic feature decomposition.


Constructor & Destructor Documentation

freeling::tagset::tagset ( const std::wstring &  f)

destructor

--- destructor


Member Function Documentation

list< pair< wstring, wstring > > freeling::tagset::compute_msf_features ( const std::wstring &  tag) const [private]

decompose a tag in morphological features

private method to decompose the tag into morphological features interpreting each digit in the tag according to field definition.

feat[<cat,i>] is the feature name (e.g. "postype") val[<cat,i>] is a map<code,name> with the feature values

References feat, int2wstring, TRACE, val, and WARNING.

Referenced by get_msf_features(), and get_msf_string().

list< pair< wstring, wstring > > freeling::tagset::get_msf_features ( const std::wstring &  tag) const

get list of <feature,value> pairs with morphological information

References compute_msf_features(), direct, MSD_SEP, PAIR_SEP, TRACE, and freeling::util::wstring2pairlist().

wstring freeling::tagset::get_msf_string ( const std::wstring &  tag) const

get list <feature,value> pairs with morphological information, in a string format

References compute_msf_features(), direct, MSD_SEP, PAIR_SEP, freeling::util::pairlist2wstring(), and TRACE.

wstring freeling::tagset::get_short_tag ( const std::wstring &  tag) const

Member Data Documentation

std::map<std::wstring,std::pair<std::wstring,std::wstring> > freeling::tagset::direct [private]

short tag+mfs for direct entry rules

Referenced by get_msf_features(), get_msf_string(), get_short_tag(), and tagset().

std::map<std::wstring,std::wstring> freeling::tagset::feat [private]

maps to store PoS tags translation rules and features.

Referenced by compute_msf_features(), and tagset().

const std::wstring freeling::tagset::MSD_SEP [private]

Referenced by get_msf_features(), and get_msf_string().

const std::wstring freeling::tagset::PAIR_SEP [private]

Referenced by get_msf_features(), and get_msf_string().

std::map<std::wstring,int> freeling::tagset::shtag_size [private]

size for short version of the tag

Referenced by get_short_tag(), and tagset().

std::map<std::wstring,std::wstring> freeling::tagset::val [private]

Referenced by compute_msf_features(), and tagset().


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