FreeLing  4.0
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::map< std::wstring,
std::wstring > 
get_msd_features_map (const std::wstring &tag) const
 get map of <feature,value> pairs with morphological information
std::list< std::pair
< std::wstring, std::wstring > > 
get_msd_features (const std::wstring &tag) const
 get list of <feature,value> pairs with morphological information
std::wstring get_msd_string (const std::wstring &tag) const
 get list <feature,value> pairs with morphological information, in a string format
std::wstring msd_to_tag (const std::wstring &cat, const std::list< std::pair< std::wstring, std::wstring > > &msd) const
 get EAGLES tag from morphological info given as list <feature,value> pairs
std::wstring msd_to_tag (const std::wstring &cat, const std::wstring &msd) const
 get EAGLES tag from morphological info given as string

Private Member Functions

std::list< std::pair
< std::wstring, std::wstring > > 
compute_msd_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::wstring > 
name
std::map< std::wstring,
std::wstring > 
name_inv
std::map< std::wstring,
std::wstring > 
val_inv
std::map< std::wstring,
std::pair< std::wstring,
std::wstring > > 
direct
 short tag+mfs for direct entry rules
std::map< std::set
< std::wstring >, std::wstring > 
direct_inv
std::map< std::wstring,
std::list< int > > 
shtag_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_msd_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, name, TRACE, freeling::util::uppercase(), val, and WARNING.

Referenced by get_msd_features(), and get_msd_string().

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

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

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

Referenced by get_msd_features_map().

map< wstring, wstring > freeling::tagset::get_msd_features_map ( const std::wstring &  tag) const

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

References get_msd_features().

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

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

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

wstring freeling::tagset::get_short_tag ( const std::wstring &  tag) const
std::wstring freeling::tagset::msd_to_tag ( const std::wstring &  cat,
const std::list< std::pair< std::wstring, std::wstring > > &  msd 
) const

get EAGLES tag from morphological info given as list <feature,value> pairs

std::wstring freeling::tagset::msd_to_tag ( const std::wstring &  cat,
const std::wstring &  msd 
) const

get EAGLES tag from morphological info given as string


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_msd_features(), get_msd_string(), get_short_tag(), and tagset().

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

Referenced by tagset().

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

maps to store PoS tags translation rules and features.

Referenced by compute_msd_features(), and tagset().

const std::wstring freeling::tagset::MSD_SEP [private]
std::map<std::wstring,std::wstring> freeling::tagset::name [private]

Referenced by compute_msd_features(), and tagset().

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

Referenced by tagset().

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

Referenced by get_msd_features(), and get_msd_string().

std::map<std::wstring,std::list<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_msd_features(), and tagset().

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

Referenced by tagset().


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