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.
677 678 679 680 |
# File 'lib/kreuzberg/config.rb', line 677 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.
675 676 677 |
# File 'lib/kreuzberg/config.rb', line 675 def max_words_per_phrase @max_words_per_phrase end |
#min_word_length ⇒ Object (readonly)
Returns the value of attribute min_word_length.
675 676 677 |
# File 'lib/kreuzberg/config.rb', line 675 def min_word_length @min_word_length end |
Instance Method Details
#to_h ⇒ Object
682 683 684 685 686 687 |
# File 'lib/kreuzberg/config.rb', line 682 def to_h { min_word_length: @min_word_length, max_words_per_phrase: @max_words_per_phrase } end |