Class: Kreuzberg::Config::KeywordRakeParams

Inherits:
Object
  • Object
show all
Defined in:
lib/kreuzberg/config.rb

Overview

RAKE keyword extraction parameters

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(min_word_length: 1, max_words_per_phrase: 3) ⇒ KeywordRakeParams

Returns a new instance of KeywordRakeParams.



667
668
669
670
# File 'lib/kreuzberg/config.rb', line 667

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_phraseObject (readonly)

Returns the value of attribute max_words_per_phrase.



665
666
667
# File 'lib/kreuzberg/config.rb', line 665

def max_words_per_phrase
  @max_words_per_phrase
end

#min_word_lengthObject (readonly)

Returns the value of attribute min_word_length.



665
666
667
# File 'lib/kreuzberg/config.rb', line 665

def min_word_length
  @min_word_length
end

Instance Method Details

#to_hObject



672
673
674
675
676
677
# File 'lib/kreuzberg/config.rb', line 672

def to_h
  {
    min_word_length: @min_word_length,
    max_words_per_phrase: @max_words_per_phrase
  }
end