Module: Rababa
- Defined in:
- lib/rababa.rb,
lib/rababa/version.rb,
lib/rababa/diacritizer.rb,
lib/rababa/arabic_constants.rb
Defined Under Namespace
Modules: ArabicConstants, Encoders, Harakats, Reconcile Classes: Diacritizer, Error
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
Class Method Details
.parser ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rababa.rb', line 17 def self.parser = {} required_args = [:text, :model_path] OptionParser.new do |opts| opts. = "Usage: ruby_onnx.rb [options]" opts.on("-tTEXT", "--text=TEXT", "text to diacritize") do |t| [:text] = t end opts.on("-fFILE", "--text_filename=FILE", "path to file to diacritize") do |f| [:text_filename] = f end opts.on("-mMODEL", "--model_path=MODEL", "path to onnx model") do |m| [:model_path] = m end opts.on("-cCONFIG", "--config=CONFIG", "path to config file") do |c| [:config] = c end end.parse! # required args [:model_path].each {|arg| raise OptionParser::MissingArgument, arg if [arg].nil? } # p(options) end |