ModErn Text Analysis
META Enumerates Textual Applications
|
Contains functions that relate to phrase structure trees and parsing of natural language. More...
Classes | |
class | annotation_remover |
A tree transformer that removes annotations (currently only Penn Treebank style) from trees. More... | |
class | binarizer |
A tree transformer that converts any n-ary productions to binary productions using provided head annotations. More... | |
class | const_visitor |
Abstract base class for visitors over parse trees that do not modify the underlying tree. More... | |
class | debinarizer |
A tree transformer that converts binarized trees back into n-ary trees. More... | |
class | empty_remover |
A tree transformer that removes trace elements (like "-NONE-" in the Penn Treebank) as well as nodes with empty yields. More... | |
class | evalb |
A re-implementation of (some of) the evalb metrics. More... | |
class | head_finder |
A visitor that annotates the internal nodes of parse trees with their head constituents/lexicons. More... | |
struct | head_rule |
class | internal_node |
An internal node in a parse tree. More... | |
class | leaf_node |
A leaf node (pre-terminal) in a parse tree. More... | |
class | leaf_node_finder |
This is a visitor that finds all of the leaf nodes in a parse tree. More... | |
class | multi_transformer |
A template class for composing tree transformers. More... | |
class | node |
A single node in a parse tree for a sentence. More... | |
class | parse_tree |
Represents the parse tree for a sentence. More... | |
class | sequence_extractor |
This is a visitor that converts a parse tree into a POS-tagged sequence. More... | |
class | sr_parser |
A shift-reduce constituency parser. More... | |
class | state |
Represents the current parser state of a shift-reduce parser. More... | |
class | transition |
Represents a transition taken by the parser. More... | |
class | transition_finder |
This is a visitor that converts a parse tree into a list of transitions that a shift-reduce parser would have to take in order to generate it. More... | |
class | transition_map |
An invertible map that maps transitions to ids. More... | |
class | tree_transformer |
Abstract base class for tree transformers. More... | |
class | unary_chain_remover |
Transforms trees by removing any unary X -> X rules. More... | |
class | visitor |
Abstract base class for visitors over parse trees that are allowed to modify the underlying tree. More... | |
Functions | |
void | register_analyzers () |
Register analyzers provided by the meta-parser-analyzers library. | |
std::ostream & | operator<< (std::ostream &os, const transition &trans) |
Prints a transition to the stream. More... | |
std::ostream & | operator<< (std::ostream &os, const transition::type_t type) |
Prints a transition type to the stream. More... | |
template<class... Transformers> | |
multi_transformer< Transformers...> | make_transformer (std::unique_ptr< Transformers >...trans) |
Helper function for constructing a multi_transformer from a set of pointers to transformers. More... | |
std::ostream & | operator<< (std::ostream &os, const parse_tree &tree) |
bool | operator== (const parse_tree &lhs, const parse_tree &rhs) |
Contains functions that relate to phrase structure trees and parsing of natural language.
std::ostream & meta::parser::operator<< | ( | std::ostream & | os, |
const transition & | trans | ||
) |
Prints a transition to the stream.
os | The stream to print to |
trans | The transition to be printed |
std::ostream & meta::parser::operator<< | ( | std::ostream & | os, |
const transition::type_t | type | ||
) |
Prints a transition type to the stream.
os | The stream to print to |
type | The transition type to print |
multi_transformer<Transformers...> meta::parser::make_transformer | ( | std::unique_ptr< Transformers >... | trans | ) |
Helper function for constructing a multi_transformer from a set of pointers to transformers.
trans | The transformers to be used |
std::ostream& meta::parser::operator<< | ( | std::ostream & | os, |
const parse_tree & | tree | ||
) |
This is non-indented.
os | The stream to print to |
tree | The tree to be printed |
bool meta::parser::operator== | ( | const parse_tree & | lhs, |
const parse_tree & | rhs | ||
) |
lhs | The left hand side of the expression |
rhs | The right hand side of the expression |