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

A tree transformer that removes annotations (currently only Penn Treebank style) from trees. More...

#include <annotation_remover.h>

Inheritance diagram for meta::parser::annotation_remover:
meta::parser::tree_transformer meta::parser::const_visitor< std::unique_ptr< node > >

Public Member Functions

std::unique_ptr< nodeoperator() (const leaf_node &) override
 
std::unique_ptr< nodeoperator() (const internal_node &) override
 

Additional Inherited Members

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

Detailed Description

A tree transformer that removes annotations (currently only Penn Treebank style) from trees.

This effectively truncates rule names before the first -, =, or |, with a few exceptions (-LRB-, -RRB-, -, etc.).

Member Function Documentation

std::unique_ptr< node > meta::parser::annotation_remover::operator() ( const leaf_node )
overridevirtual
Returns
the result of running the visitor on the supplied leaf node

Implements meta::parser::tree_transformer.

std::unique_ptr< node > meta::parser::annotation_remover::operator() ( const internal_node )
overridevirtual
Returns
the result of running the visitor on the supplied internal node

Implements meta::parser::tree_transformer.


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