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

#include <Parser.h>

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

Public Member Functions

 Parser (TiCC::LogStream *errlog, TiCC::LogStream *dbglog)
 
 ~Parser ()
 
bool init (const TiCC::Configuration &)
 
void add_provenance (folia::Document &doc, folia::processor *) const
 
parseData prepareParse (frog_data &)
 
void Parse (frog_data &, TimerBlock &)
 
- Public Member Functions inherited from ParserBase
 ParserBase (TiCC::LogStream *errlog, TiCC::LogStream *dbglog)
 
virtual ~ParserBase ()
 
virtual void add_result (const frog_data &, const std::vector< folia::Word * > &) const
 
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

◆ Parser()

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

◆ ~Parser()

Parser::~Parser ( )

destructor

Member Function Documentation

◆ add_provenance()

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

add provenance information to the FoLiA document

Parameters
docthe foLiA document we are working on
mainthe main processor (presumably Frog) we want to add a new one to

Implements ParserBase.

◆ init()

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

initialize a Parser from the configuration

Parameters
configurationthe config to use
Returns
true on succes extract all needed information from the configuration and setup the parser by creating 3 Timbl instances

Implements ParserBase.

◆ Parse()

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

Run the Parser on 1 frog_data structure

Parameters
fdthe frog_data structure with our input
timersthe TimerBlock for measuring what we wasting

This function will run 3 Timbl's in parallel to get its information which is the handled to the 'real' parsing CSIDP process

Implements ParserBase.

◆ prepareParse()

parseData Parser::prepareParse ( frog_data fd)

setup the parser for action

Parameters
fdthe frog_data structure with the needed information
Returns
a parseData structure for further processing

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