Module Raingrams::Tokens
In: lib/raingrams/tokens/start_sentence.rb
lib/raingrams/tokens/stop_sentence.rb
lib/raingrams/tokens/token.rb
lib/raingrams/tokens/tokens.rb
lib/raingrams/tokens/unknown.rb
Model TrigramModel BigramModel QuadgramModel PentagramModel HexagramModel Model TrigramModel BigramModel QuadgramModel PentagramModel HexagramModel RuntimeError PrefixFrequencyMissing Set NgramSet Array Ngram Token StopSentence StartSentence Unknown ProbabilityTable Tokens Commonality Random Similarity Frequency Probability Helpers OpenModel OpenVocabulary Raingrams dot/f_1.png

Methods

all   start   stop   unknown  

Classes and Modules

Class Raingrams::Tokens::StartSentence
Class Raingrams::Tokens::StopSentence
Class Raingrams::Tokens::Token
Class Raingrams::Tokens::Unknown

Public Class methods

Returns all defined tokens.

[Source]

# File lib/raingrams/tokens/tokens.rb, line 10
    def Tokens.all
      @@raingram_tokens ||= {}
    end

Returns the start sentence token.

[Source]

# File lib/raingrams/tokens/tokens.rb, line 17
    def Tokens.start
      Tokens.all[:start] ||= StartSentence.new
    end

Returns the stop sentence token.

[Source]

# File lib/raingrams/tokens/tokens.rb, line 24
    def Tokens.stop
      Tokens.all[:stop] ||= StopSentence.new
    end

Returns the unknown word token.

[Source]

# File lib/raingrams/tokens/tokens.rb, line 31
    def Tokens.unknown
      Tokens.all[:unknown] ||= Unknown.new
    end

[Validate]