Class: Lda::DataCorpus

Inherits:
Corpus
  • Object
show all
Defined in:
lib/lda-ruby/corpus/data_corpus.rb

Instance Attribute Summary collapse

Attributes inherited from Corpus

#documents, #num_docs, #num_terms, #stopwords, #vocabulary

Instance Method Summary collapse

Methods inherited from Corpus

#add_document, #remove_word

Constructor Details

#initialize(filename) ⇒ DataCorpus

Returns a new instance of DataCorpus.



5
6
7
8
9
10
# File 'lib/lda-ruby/corpus/data_corpus.rb', line 5

def initialize(filename)
  super()

  @filename = filename
  load_from_file
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



3
4
5
# File 'lib/lda-ruby/corpus/data_corpus.rb', line 3

def filename
  @filename
end