Class: Tangram::Bigram

Inherits:
Object
  • Object
show all
Defined in:
lib/tangram/tangram.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/tangram/tangram.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/tangram/tangram.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/tangram/tangram.rb', line 183

def token_b
  @token_b
end