Class: Lda::TextCorpus
- Defined in:
- lib/lda-ruby/corpus/text_corpus.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Attributes inherited from Corpus
#documents, #num_docs, #num_terms, #vocabulary
Instance Method Summary collapse
-
#initialize(filename) ⇒ TextCorpus
constructor
Load text documents from YAML file if filename is given.
Methods inherited from Corpus
Constructor Details
#initialize(filename) ⇒ TextCorpus
Load text documents from YAML file if filename is given.
6 7 8 9 10 11 |
# File 'lib/lda-ruby/corpus/text_corpus.rb', line 6 def initialize(filename) super() @filename = filename load_from_file end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/lda-ruby/corpus/text_corpus.rb', line 3 def filename @filename end |