Class: Markovian::Importers::Twitter::CsvImporter
- Inherits:
-
Object
- Object
- Markovian::Importers::Twitter::CsvImporter
- Defined in:
- lib/markovian/importers/twitter/csv_importer.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #corpus ⇒ Object
-
#initialize(path) ⇒ CsvImporter
constructor
A new instance of CsvImporter.
- #texts_for_markov_analysis ⇒ Object
Constructor Details
#initialize(path) ⇒ CsvImporter
Returns a new instance of CsvImporter.
11 12 13 |
# File 'lib/markovian/importers/twitter/csv_importer.rb', line 11 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/markovian/importers/twitter/csv_importer.rb', line 10 def path @path end |
Instance Method Details
#corpus ⇒ Object
20 21 22 |
# File 'lib/markovian/importers/twitter/csv_importer.rb', line 20 def corpus Corpus::Compiler.new.build_corpus(texts_for_markov_analysis) end |
#texts_for_markov_analysis ⇒ Object
15 16 17 18 |
# File 'lib/markovian/importers/twitter/csv_importer.rb', line 15 def texts_for_markov_analysis # reject any blank tweets -- in our case, those with only a stripped-out URL tweet_enumerator.reject {|t| t.empty?} end |