Class: Suma::TermExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/suma/term_extractor.rb

Instance Method Summary collapse

Constructor Details

#initialize(schema_manifest_file, output_path, urn:, language_code: "eng") ⇒ TermExtractor

Returns a new instance of TermExtractor.



9
10
11
12
13
14
15
# File 'lib/suma/term_extractor.rb', line 9

def initialize(schema_manifest_file, output_path, urn:,
               language_code: "eng")
  @schema_manifest_file = File.expand_path(schema_manifest_file)
  @output_path = output_path
  @language_code = language_code
  @urn = Suma::Urn.new(urn)
end

Instance Method Details

#callObject



17
18
19
20
21
22
# File 'lib/suma/term_extractor.rb', line 17

def call
  validate_inputs
  get_exp_files.map do |exp_file|
    extract(exp_file)
  end
end