FreeLing  4.0
Public Member Functions | Private Member Functions | Private Attributes
freeling::dep_treeler Class Reference

Class dep_treeler is a wrapper for a Treeler dependency parser. More...

#include <dep_treeler.h>

Inheritance diagram for freeling::dep_treeler:
Inheritance graph
[legend]
Collaboration diagram for freeling::dep_treeler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dep_treeler (const std::wstring &)
 Constructor.
 ~dep_treeler ()
 Destructor.
void analyze (freeling::sentence &) const
 Analyze given sentences.

Private Member Functions

void FL2Treeler (const freeling::sentence &fl_sentence, treeler::dependency_parser::sentence &tl_sentence) const
 Convert FL sentence to Treeler.
void Treeler2FL (freeling::sentence &fl_sentence, const treeler::dependency_parser::dep_vector &tl_tree, const treeler::srl_parser::pred_arg_set &tl_roles) const
 Add treeler output tree to FL sentence.
freeling::dep_treebuild_dep_tree (int node_id, const std::vector< std::list< int > > &sons, const std::vector< std::string > &labels, std::map< int, freeling::depnode * > &depnods, freeling::sentence &fl_sentence) const
 Build a FL dep_tree from treeler output.
void load_options (const std::string &cfg, treeler::Options &opts)
 Load dep_parser configuration file into a treeler::Options object.
void load_predicate_files (const std::map< std::wstring, std::wstring > &)
void compute_predicates (const treeler::srl_parser::basic_sentence &, const freeling::sentence &, const treeler::srl_parser::dep_vector &, treeler::srl::PossiblePreds &) const
bool is_pred_exception (const treeler::srl_parser::basic_sentence &, size_t, const treeler::srl_parser::dep_vector &) const

Private Attributes

treeler::dependency_parser * dp
 treeler parser
treeler::srl_parser * srl
freeling::tagsettags
std::map< std::string, map
< std::wstring,
treeler::srl::PossiblePredArgs > > 
predicates
std::set< std::string > always_predicate
std::list< pair< std::string,
std::string > > 
default_args
std::map< std::string,
std::string > 
pred_exceptions

Detailed Description

Class dep_treeler is a wrapper for a Treeler dependency parser.


Constructor & Destructor Documentation

freeling::dep_treeler::dep_treeler ( const std::wstring &  )

Constructor.

Destructor.


Member Function Documentation

void freeling::dep_treeler::analyze ( freeling::sentence ) const [virtual]

Analyze given sentences.

Implements freeling::dependency_parser.

freeling::dep_tree* freeling::dep_treeler::build_dep_tree ( int  node_id,
const std::vector< std::list< int > > &  sons,
const std::vector< std::string > &  labels,
std::map< int, freeling::depnode * > &  depnods,
freeling::sentence fl_sentence 
) const [private]

Build a FL dep_tree from treeler output.

void freeling::dep_treeler::compute_predicates ( const treeler::srl_parser::basic_sentence &  ,
const freeling::sentence ,
const treeler::srl_parser::dep_vector &  ,
treeler::srl::PossiblePreds &   
) const [private]
void freeling::dep_treeler::FL2Treeler ( const freeling::sentence fl_sentence,
treeler::dependency_parser::sentence &  tl_sentence 
) const [private]

Convert FL sentence to Treeler.

bool freeling::dep_treeler::is_pred_exception ( const treeler::srl_parser::basic_sentence &  ,
size_t  ,
const treeler::srl_parser::dep_vector &   
) const [private]
void freeling::dep_treeler::load_options ( const std::string &  cfg,
treeler::Options &  opts 
) [private]

Load dep_parser configuration file into a treeler::Options object.

void freeling::dep_treeler::load_predicate_files ( const std::map< std::wstring, std::wstring > &  ) [private]
void freeling::dep_treeler::Treeler2FL ( freeling::sentence fl_sentence,
const treeler::dependency_parser::dep_vector &  tl_tree,
const treeler::srl_parser::pred_arg_set &  tl_roles 
) const [private]

Add treeler output tree to FL sentence.


Member Data Documentation

std::set<std::string> freeling::dep_treeler::always_predicate [private]
std::list<pair<std::string,std::string> > freeling::dep_treeler::default_args [private]
treeler::dependency_parser* freeling::dep_treeler::dp [private]

treeler parser

std::map<std::string,std::string> freeling::dep_treeler::pred_exceptions [private]
std::map<std::string,map<std::wstring,treeler::srl::PossiblePredArgs> > freeling::dep_treeler::predicates [private]
treeler::srl_parser* freeling::dep_treeler::srl [private]

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