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)
Source

Instance methods

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

Get all dependents of a word

Source
get_head(word_index : Int32) : Int32 | Nil

Get the head of a word

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

Get dependency path between two words

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

Convert to AtomSpace representation

Source
words
Source