Class: ModelFox::Bigram

Inherits:
Object
  • Object
show all
Defined in:
lib/modelfox/modelfox.rb

Overview

This describes a bigram ngram.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token_a:, token_b:) ⇒ Bigram

Returns a new instance of Bigram.



184
185
186
187
# File 'lib/modelfox/modelfox.rb', line 184

def initialize(token_a:, token_b:)
  @token_a = token_a
  @token_b = token_b
end

Instance Attribute Details

#token_aObject (readonly)

This is the first token in the bigram.



181
182
183
# File 'lib/modelfox/modelfox.rb', line 181

def token_a
  @token_a
end

#token_bObject (readonly)

This is the second token in the bigram.



183
184
185
# File 'lib/modelfox/modelfox.rb', line 183

def token_b
  @token_b
end