class Opener::OpinionDetectorBasic
Rule based opinion detector.
@!attribute [r] args
@return [Array]
@!attribute [r] options
@return [Hash]
Constants
- VERSION
Attributes
args[R]
options[R]
Public Class Methods
new(options = {})
click to toggle source
@param [Hash] options
@option options [Array] :args Command-line arguments to pass to the
underlying Python kernel.
# File lib/opener/opinion_detector_basic.rb, line 41 def initialize(options = {}) @args = options.delete(:args) || [] @options = options ENV['OPINION_LEGACY'] = 'true' # Processor is still not working @klass = if ENV['OPINION_LEGACY'] then LegacyProcessor else Processor end end
Public Instance Methods
run(input, params = {})
click to toggle source
Processes the input KAF document.
@param [String] input @return [String]
# File lib/opener/opinion_detector_basic.rb, line 54 def run input, params = {} @klass.new(input, options).process end