Class: SampleExtractor
- Inherits:
-
Object
- Object
- SampleExtractor
- Includes:
- Extractor
- Defined in:
- lib/batch_experiment/sample_extractors.rb
Overview
Sample extractors used at github.com/henriquebecker91/masters, where this code had its beggining. This file contains the code used to extract info from the different outputs generated by UKP solving programs.
Instance Method Summary collapse
Methods included from Extractor
#extract, get_field, get_hfield
Instance Method Details
#extract_from_lines(lines) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/batch_experiment/sample_extractors.rb', line 14 def extract_from_lines(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
10 11 12 |
# File 'lib/batch_experiment/sample_extractors.rb', line 10 def names ['first word', 'second word', 'ext_time', 'ext_mem'] end |