Module: BatchExperiment::TwoWordsExtractor
- Extended by:
- Extractor
- Defined in:
- lib/batch_experiment/sample_extractors.rb
Class Method Summary
collapse
Methods included from Extractor
extract, extract_from_lines, get_field, get_hfield, names
Class Method Details
41
42
43
44
45
46
|
# File 'lib/batch_experiment/sample_extractors.rb', line 41
def self.(lines)
words = lines.empty? || lines[0].nil? ? ['',''] : lines[0].split().take(2)
words << Extractor.get_field(lines, 'ext_time')
words << Extractor.get_field(lines, 'ext_mem')
words
end
|
.names ⇒ Object
37
38
39
|
# File 'lib/batch_experiment/sample_extractors.rb', line 37
def self.names
['first word', 'second word', 'ext_time', 'ext_mem']
end
|