Class: ModelFox::Bigram
- Inherits:
-
Object
- Object
- ModelFox::Bigram
- Defined in:
- lib/modelfox/modelfox.rb
Overview
This describes a bigram ngram.
Instance Attribute Summary collapse
-
#token_a ⇒ Object
readonly
This is the first token in the bigram.
-
#token_b ⇒ Object
readonly
This is the second token in the bigram.
Instance Method Summary collapse
-
#initialize(token_a:, token_b:) ⇒ Bigram
constructor
A new instance of Bigram.
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_a ⇒ Object (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_b ⇒ Object (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 |