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

A visitor that annotates the internal nodes of parse trees with their head constituents/lexicons. More...

#include <head_finder.h>

Inheritance diagram for meta::parser::head_finder:
meta::parser::visitor< void >

Public Types

using rule_table = std::unordered_map< class_label, std::unique_ptr< head_rule >>
 The storage type used for holding the head finding rules.
 
- Public Types inherited from meta::parser::visitor< void >
using result_type = void
 The result of running the visitor over the tree.
 

Public Member Functions

 head_finder ()
 Constructs a default head finder, using the head finding rules for English from Michael Collins' thesis. More...
 
 head_finder (rule_table &&table)
 Constructs a head finder using the supplied head finding rules.
 
void operator() (leaf_node &) override
 
void operator() (internal_node &) override
 

Private Attributes

rule_table rules_
 The head finding rules used for this head_finder.
 

Detailed Description

A visitor that annotates the internal nodes of parse trees with their head constituents/lexicons.

This follows the head finding rules given in Michael Collins' thesis and has been designed only for English using Penn Treebank annotations.

See also
http://www.cs.columbia.edu/~mcollins/publications.html

Constructor & Destructor Documentation

meta::parser::head_finder::head_finder ( )

Constructs a default head finder, using the head finding rules for English from Michael Collins' thesis.

See also
: http://www.cs.columbia.edu/~mcollins/papers/heads
Collins' thesis, page 240

Member Function Documentation

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

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

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

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


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