class

NLP::DependencyParser::DependencyParse

Inherits Reference < Object

Represents a complete dependency parse of a sentence

Constructors

new(sentence : String, words : Array(String), dependencies : Array(Dependency) = [] of Dependency, root_index : Int32 = -1)

Instance methods

dependencies
get_dependents(word_index : Int32) : Array(Int32)

Get all dependents of a word

get_head(word_index : Int32) : Int32 | Nil

Get the head of a word

get_path(from : Int32, to : Int32) : Array(Int32) | Nil

Get dependency path between two words

root_index
sentence
to_atomspace(atomspace : AtomSpace::AtomSpace) : Array(AtomSpace::Atom)

Convert to AtomSpace representation

words