Class: Kreuzberg::Config::KeywordRakeParams
- Inherits:
-
Object
- Object
- Kreuzberg::Config::KeywordRakeParams
- Defined in:
- lib/kreuzberg/config.rb
Overview
RAKE keyword extraction parameters
Instance Attribute Summary collapse
-
#max_words_per_phrase ⇒ Object
readonly
Returns the value of attribute max_words_per_phrase.
-
#min_word_length ⇒ Object
readonly
Returns the value of attribute min_word_length.
Instance Method Summary collapse
-
#initialize(min_word_length: 1, max_words_per_phrase: 3) ⇒ KeywordRakeParams
constructor
A new instance of KeywordRakeParams.
- #to_h ⇒ Object
Constructor Details
#initialize(min_word_length: 1, max_words_per_phrase: 3) ⇒ KeywordRakeParams
Returns a new instance of KeywordRakeParams.
681 682 683 684 |
# File 'lib/kreuzberg/config.rb', line 681 def initialize(min_word_length: 1, max_words_per_phrase: 3) @min_word_length = min_word_length.to_i @max_words_per_phrase = max_words_per_phrase.to_i end |
Instance Attribute Details
#max_words_per_phrase ⇒ Object (readonly)
Returns the value of attribute max_words_per_phrase.
679 680 681 |
# File 'lib/kreuzberg/config.rb', line 679 def max_words_per_phrase @max_words_per_phrase end |
#min_word_length ⇒ Object (readonly)
Returns the value of attribute min_word_length.
679 680 681 |
# File 'lib/kreuzberg/config.rb', line 679 def min_word_length @min_word_length end |
Instance Method Details
#to_h ⇒ Object
686 687 688 689 690 691 |
# File 'lib/kreuzberg/config.rb', line 686 def to_h { min_word_length: @min_word_length, max_words_per_phrase: @max_words_per_phrase } end |