class documentation

class Configuration(object): (source)

Constructor: Configuration(dep_graph)

View In Hierarchy

Class for holding configuration which is the partial analysis of the input sentence. The transition based parser aims at finding set of operators that transfer the initial configuration to the terminal configuration.

The configuration includes:
  • Stack: for storing partially proceeded words
  • Buffer: for storing remaining input words
  • Set of arcs: for storing partially built dependency tree

This class also provides a method to represent a configuration as list of features.

Method __init__ No summary
Method __str__ Undocumented
Method extract_features Extract the set of features for the current configuration. Implement standard features as describe in Table 3.2 (page 31) in Dependency Parsing book by Sandra Kubler, Ryan McDonal, Joakim Nivre. Please note that these features are very basic...
Instance Variable arcs Undocumented
Instance Variable buffer Undocumented
Instance Variable stack Undocumented
Method _check_informative Check whether a feature is informative The flag control whether "_" is informative or not
Instance Variable _max_address Undocumented
Instance Variable _tokens Undocumented
def __init__(self, dep_graph): (source)
Parameters
dep_graph:DependencyGraph where the dependencies are not specified.the representation of an input in the form of dependency graph.
def __str__(self): (source)

Undocumented

def extract_features(self): (source)

Extract the set of features for the current configuration. Implement standard features as describe in Table 3.2 (page 31) in Dependency Parsing book by Sandra Kubler, Ryan McDonal, Joakim Nivre. Please note that these features are very basic. :return: list(str)

arcs: list = (source)

Undocumented

Undocumented

stack: list[int] = (source)

Undocumented

def _check_informative(self, feat, flag=False): (source)

Check whether a feature is informative The flag control whether "_" is informative or not

_max_address = (source)

Undocumented

Undocumented