class Cadmium::Token

Overview

An individual token — i.e. a word, punctuation symbol, whitespace, etc

Included Modules

Defined in:

cadmium/token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(verbatim : String = "", pos : Nil | String = "", univ_pos : Symbol | Nil = nil, morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil = nil, is_start_sentence : Bool = false, is_punctuation : Bool = false, language : Symbol = :en) #

[View source]

Instance Method Detail

def is_base_form? : Bool #

[View source]
def is_oov : Bool #

[View source]
def is_oov=(is_oov : Bool) #

[View source]
def is_punctuation : Bool #

[View source]
def is_punctuation=(is_punctuation : Bool) #

[View source]
def is_start_sentence : Bool #

[View source]
def is_start_sentence=(is_start_sentence : Bool) #

[View source]
def is_stop_word : Bool #

[View source]
def is_stop_word=(is_stop_word : Bool) #

[View source]
def language : Symbol #

[View source]
def language=(language : Symbol) #

[View source]
def lemma : String | Nil #

property token_vector : Apatite::Vector(Float64)?


[View source]
def lemma=(lemma : String | Nil) #

property token_vector : Apatite::Vector(Float64)?


[View source]
def morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil #

[View source]
def morphology=(morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil) #

[View source]
def ner_tag : String | Nil #

[View source]
def ner_tag=(ner_tag : String | Nil) #

[View source]
def pos : String | Nil #

[View source]
def pos=(pos : String | Nil) #

[View source]
def size #

[View source]
def univ_pos : Symbol | Nil #

[View source]
def univ_pos=(univ_pos : Symbol | Nil) #

[View source]
def verbatim : String #

[View source]
def verbatim=(verbatim : String) #

[View source]