module

NLP::LinguisticAtoms

Class methods

create_lexical_relations(atomspace : AtomSpace::AtomSpace) : Array(AtomSpace::Atom)

Create lexical semantic relationships (synonymy, antonymy, etc.)

create_parse_tree(atomspace : AtomSpace::AtomSpace, tokens : Array(String), structure : Array(Array(Int32))) : Array(AtomSpace::Atom)

Create a parse tree structure in AtomSpace

create_semantic_relation(atomspace : AtomSpace::AtomSpace, word1 : String, word2 : String, relation_type : String, confidence : Float64 = 0.8) : AtomSpace::Atom

Create semantic relationships between words

create_sentence_structure(atomspace : AtomSpace::AtomSpace, tokens : Array(String)) : Array(AtomSpace::Atom)

Create a sentence structure in the AtomSpace

create_word_atom(atomspace : AtomSpace::AtomSpace, word : String, pos : String | Nil = nil) : AtomSpace::Atom

Create a word atom with optional part-of-speech information

get_linguistic_complexity(atomspace : AtomSpace::AtomSpace) : Hash(String, Int32)

Calculate linguistic complexity metrics

get_semantic_relations(atomspace : AtomSpace::AtomSpace, relation_type : String) : Array(AtomSpace::Atom)

Get semantic relations of a specific type

get_sentence_atoms(atomspace : AtomSpace::AtomSpace) : Array(AtomSpace::Atom)

Extract all sentence structures from an atomspace

get_word_atoms(atomspace : AtomSpace::AtomSpace) : Array(AtomSpace::Atom)

Extract all word atoms from an atomspace