Frog
Public Member Functions | List of all members
AlpinoParser Class Reference

#include <AlpinoParser.h>

Inheritance diagram for AlpinoParser:
Inheritance graph
[legend]
Collaboration diagram for AlpinoParser:
Collaboration graph
[legend]

Public Member Functions

 AlpinoParser (TiCC::LogStream *errlog, TiCC::LogStream *dbglog)
 
bool init (const TiCC::Configuration &)
 
void add_provenance (folia::Document &doc, folia::processor *) const
 
void Parse (frog_data &, TimerBlock &)
 
void add_result (const frog_data &, const std::vector< folia::Word * > &) const
 
void add_mwus (const frog_data &, const std::vector< folia::Word * > &) const
 
- Public Member Functions inherited from ParserBase
 ParserBase (TiCC::LogStream *errlog, TiCC::LogStream *dbglog)
 
virtual ~ParserBase ()
 
std::vector< std::string > createParserInstances (const parseData &)
 
std::string getTagset () const
 

Additional Inherited Members

- Protected Member Functions inherited from ParserBase
 ParserBase (const ParserBase &)
 
- Protected Attributes inherited from ParserBase
bool isInit
 
TiCC::LogStream * errLog
 
TiCC::LogStream * dbgLog
 
std::string _version
 
std::string dep_tagset
 
std::string POS_tagset
 
std::string MWU_tagset
 
std::string textclass
 
TiCC::UniFilter * filter
 
std::string _host
 
std::string _port
 

Constructor & Destructor Documentation

◆ AlpinoParser()

AlpinoParser::AlpinoParser ( TiCC::LogStream *  errlog,
TiCC::LogStream *  dbglog 
)
inlineexplicit

Member Function Documentation

◆ add_mwus()

void AlpinoParser::add_mwus ( const frog_data fd,
const std::vector< folia::Word * > &  wv 
) const

add the MWU's stored in a frog_data record as folia Entities

Parameters
fdthe frog_data structure to use
wvthe list of folia::Word nodes that was parsed into the fd frog_data structure

So we create an entities layer on the Sentence above the Word vector and add all words as MWU entities in that layer

◆ add_provenance()

void AlpinoParser::add_provenance ( folia::Document &  doc,
folia::processor *  main 
) const
virtual

add provenance data for the AlpinoParser to the Frog provenance

Parameters
docthe current folia::Document
maina pointer to the provenance processor of Frog

Implements ParserBase.

◆ add_result()

void AlpinoParser::add_result ( const frog_data fd,
const std::vector< folia::Word * > &  wv 
) const
virtual

add the parser information in fd as Dependencies and Entities to the FoLiA

Parameters
fdthe frog_data structure with all information
wvthe list of folia::Word nodes that was parsed into the fd frog_data structure

Reimplemented from ParserBase.

◆ init()

bool AlpinoParser::init ( const TiCC::Configuration &  configuration)
virtual

initaliaze an AlpinoParser class from a configuration

Parameters
configurationthe configuration to use

Implements ParserBase.

◆ Parse()

void AlpinoParser::Parse ( frog_data fd,
TimerBlock timers 
)
virtual

parse a frog_data structure using Alpino

Parameters
fdthe frog_data structure
timersused for storing timing information

this function will use an Alpino Server or a locally installed Alpino executable, depending on the current options and settings.

The results are stored in the fd parameter

Implements ParserBase.


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