Class: Suma::Cli::ExtractTerms

Inherits:
Thor
  • Object
show all
Defined in:
lib/suma/cli/extract_terms.rb

Instance Method Summary collapse

Instance Method Details

#extract_terms(schema_manifest_file, output_path) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/suma/cli/extract_terms.rb', line 16

def extract_terms(schema_manifest_file, output_path)
  unless File.exist?(File.expand_path(schema_manifest_file))
    raise Errno::ENOENT, "Specified SCHEMA_MANIFEST_FILE " \
                         "`#{schema_manifest_file}` not found."
  end

  TermExtractor.new(
    schema_manifest_file,
    output_path,
    language_code: options[:language_code],
  ).call
end