ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Private Attributes | List of all members
meta::parser::sequence_extractor Class Reference

This is a visitor that converts a parse tree into a POS-tagged sequence. More...

#include <sequence_extractor.h>

Inheritance diagram for meta::parser::sequence_extractor:
meta::parser::const_visitor< void >

Public Member Functions

void operator() (const leaf_node &) override
 
void operator() (const internal_node &) override
 
sequence::sequence sequence ()
 Extracts the sequence found. More...
 

Private Attributes

sequence::sequence seq_
 Storage for the partial sequence thus far.
 

Additional Inherited Members

- Public Types inherited from meta::parser::const_visitor< void >
using result_type = void
 The result of running the visitor over the tree.
 

Detailed Description

This is a visitor that converts a parse tree into a POS-tagged sequence.

This is currently used to extract test data from a treebank for the parser.

Member Function Documentation

void meta::parser::sequence_extractor::operator() ( const leaf_node )
overridevirtual
Returns
the result of running the visitor on the supplied leaf node

Implements meta::parser::const_visitor< void >.

void meta::parser::sequence_extractor::operator() ( const internal_node )
overridevirtual
Returns
the result of running the visitor on the supplied internal node

Implements meta::parser::const_visitor< void >.

sequence::sequence meta::parser::sequence_extractor::sequence ( )

Extracts the sequence found.

This moves the sequence out of the extractor.

Returns
the sequence that was extracted from the tree the visitor was run on

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