Package feature_extractor :: Module dependency :: Class Cdependency_extractor
[hide private]
[frames] | no frames]

Class Cdependency_extractor

source code

This is the main class for the information extraction

Instance Methods [hide private]
 
__init__(self, knaf_obj)
The constructor of this class take one kaf/naf object
source code
 
__propagate_node(self, node, already_propagated=[]) source code
 
__reverse_propagate_node(self, node, already_propagated=[]) source code
 
get_full_dependents(self, term_id, relations, counter=0)
Returns the complete list of dependents and embedded dependents of a certain term.
source code
list
get_path_to_root(self, termid)
Returns the dependency path from the term to the root
source code
list
get_shortest_path(self, term1, term2)
Returns the list of dependency labels of the shortest path between two terms
source code
list
get_shortest_path_spans(self, span1, span2)
Returns the list of dependency labels of the shortest path between two span of terms
source code
list
get_shortest_path_to_root_span(self, span)
Returns the dependency path from a span of terms to the root
source code
Method Details [hide private]

__init__(self, knaf_obj)
(Constructor)

source code 

The constructor of this class take one kaf/naf object

Parameters:
  • knaf_obj (kaf/naf object) - the kaf/naf object

get_path_to_root(self, termid)

source code 

Returns the dependency path from the term to the root

Parameters:
  • termid (string) - the term identifier
Returns: list
list of dependency relations

get_shortest_path(self, term1, term2)

source code 

Returns the list of dependency labels of the shortest path between two terms

Parameters:
  • term1 (string) - the term identifier for one term
  • term2 (string) - the term identifier for the other term
Returns: list
list of dependency relations

get_shortest_path_spans(self, span1, span2)

source code 

Returns the list of dependency labels of the shortest path between two span of terms

Parameters:
  • span1 (list) - list of term identifiers
  • span2 (list) - list of term identifiers
Returns: list
list of dependency relations

get_shortest_path_to_root_span(self, span)

source code 

Returns the dependency path from a span of terms to the root

Parameters:
  • span (list) - list of term identifiers
Returns: list
list of dependency relations