Class: Opener::Coreference
- Inherits:
-
Object
- Object
- Opener::Coreference
- Defined in:
- lib/opener/coreference.rb,
lib/opener/coreference/cli.rb,
lib/opener/coreference/server.rb,
lib/opener/coreference/version.rb
Defined Under Namespace
Constant Summary collapse
- DEFAULT_OPTIONS =
Hash containing the default options to use.
{ :args => [], }.freeze
- VERSION =
"1.0.1"
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Coreference
constructor
A new instance of Coreference.
-
#run(input) ⇒ Array
Processes the input and returns an array containing the output of STDOUT, STDERR and an object containing process information.
Constructor Details
#initialize(options = {}) ⇒ Coreference
Returns a new instance of Coreference.
28 29 30 |
# File 'lib/opener/coreference.rb', line 28 def initialize( = {}) = DEFAULT_OPTIONS.merge() end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/opener/coreference.rb', line 10 def end |
Instance Method Details
#run(input) ⇒ Array
Processes the input and returns an array containing the output of STDOUT, STDERR and an object containing process information.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/opener/coreference.rb', line 39 def run(input) language = language_from_kaf(input) args = [:args].dup if language_constant_defined?(language) kernel = language.new(:args => args) else kernel = Coreferences::Base.new(:args => args, :language => language) end return kernel.run(input) end |