Class: TwitterCldr::Resources::SegmentDictionariesImporter

Inherits:
Importer
  • Object
show all
Defined in:
lib/twitter_cldr/resources/segment_dictionaries_importer.rb

Constant Summary collapse

URL_TEMPLATE =
'https://raw.githubusercontent.com/unicode-org/icu/%{tag}/%{path}'
DICTIONARY_FILES =
[
  'icu4c/source/data/brkitr/dictionaries/burmesedict.txt',
  'icu4c/source/data/brkitr/dictionaries/cjdict.txt',
  'icu4c/source/data/brkitr/dictionaries/khmerdict.txt',
  'icu4c/source/data/brkitr/dictionaries/laodict.txt',
  'icu4c/source/data/brkitr/dictionaries/thaidict.txt'
]

Constants inherited from Importer

Importer::DEFAULT_ENGINE

Instance Attribute Summary

Attributes inherited from Importer

#params, #requirements

Instance Method Summary collapse

Methods inherited from Importer

#can_import?, default_params, #import, #initialize, locales, output_path, parameter, parameters, #prepare, requirement, requirements, ruby_engine

Constructor Details

This class inherits a constructor from TwitterCldr::Resources::Importer

Instance Method Details

#executeObject



26
27
28
29
30
31
32
# File 'lib/twitter_cldr/resources/segment_dictionaries_importer.rb', line 26

def execute
  FileUtils.mkdir_p(output_path)

  DICTIONARY_FILES.each do |test_file|
    import_dictionary_file(test_file)
  end
end