Class: VectorEmbed::Maker::Phrase
- Inherits:
-
VectorEmbed::Maker
- Object
- VectorEmbed::Maker
- VectorEmbed::Maker::Phrase
- Defined in:
- lib/vector_embed/maker/phrase.rb
Instance Attribute Summary
Attributes inherited from VectorEmbed::Maker
#cardinality, #k, #options, #parent
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from VectorEmbed::Maker
Constructor Details
This class inherits a constructor from VectorEmbed::Maker
Class Method Details
.want?(v, parent) ⇒ Boolean
7 8 9 |
# File 'lib/vector_embed/maker/phrase.rb', line 7 def want?(v, parent) true end |
Instance Method Details
#pairs(v) ⇒ Object
12 13 14 15 |
# File 'lib/vector_embed/maker/phrase.rb', line 12 def pairs(v) v = parent.preprocess v.to_s [ [ parent.index([k, v]), 1 ] ] end |