class Cadmium::Token
- Cadmium::Token
- Reference
- Object
Overview
An individual token — i.e. a word, punctuation symbol, whitespace, etc
Included Modules
- JSON::Serializable
Defined in:
cadmium/token.crConstructors
- .new(pull : JSON::PullParser)
- .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)
Instance Method Summary
- #is_base_form? : Bool
- #is_oov : Bool
- #is_oov=(is_oov : Bool)
- #is_punctuation : Bool
- #is_punctuation=(is_punctuation : Bool)
- #is_start_sentence : Bool
- #is_start_sentence=(is_start_sentence : Bool)
- #is_stop_word : Bool
- #is_stop_word=(is_stop_word : Bool)
- #language : Symbol
- #language=(language : Symbol)
-
#lemma : String | Nil
property token_vector : Apatite::Vector(Float64)?
-
#lemma=(lemma : String | Nil)
property token_vector : Apatite::Vector(Float64)?
- #morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil
- #morphology=(morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil)
- #ner_tag : String | Nil
- #ner_tag=(ner_tag : String | Nil)
- #pos : String | Nil
- #pos=(pos : String | Nil)
- #size
- #univ_pos : Symbol | Nil
- #univ_pos=(univ_pos : Symbol | Nil)
- #verbatim : String
- #verbatim=(verbatim : String)
Constructor Detail
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)
#
Instance Method Detail
def morphology=(morphology : Hash(Symbol, String | Symbol) | Hash(Symbol, Symbol) | Nil)
#