Method: TextRank::GraphStrategy::Coocurrence#initialize

Defined in:
lib/text_rank/graph_strategy/coocurrence.rb

#initialize(ngram_size: 3, **_) ⇒ Coocurrence

Returns a new instance of Coocurrence.

Parameters:

  • ngram_size (Fixnum) (defaults to: 3)

    Window size around a token considered co-occurrence



54
55
56
# File 'lib/text_rank/graph_strategy/coocurrence.rb', line 54

def initialize(ngram_size: 3, **_)
  @ngram_size = ngram_size
end