Sha256: 14dd51a1e46041867110763fda79640931ee3b58939156761a77bad0442a7d54

Contents?: true

Size: 979 Bytes

Versions: 4

Compression:

Stored size: 979 Bytes

Contents

gem 'slop', '~> 3.0'

require 'slop'
require 'oga'

require 'rexml/document'
require 'rexml/formatters/pretty'

require_relative 'opinion_detector_basic/version'
require_relative 'opinion_detector_basic/cli'
require_relative 'opinion_detector_basic/processor'

module Opener
  ##
  # Rule based opinion detector.
  #
  # @!attribute [r] args
  #  @return [Array]
  #
  # @!attribute [r] options
  #  @return [Hash]
  #
  class OpinionDetectorBasic
    attr_reader :args, :options

    ##
    # @param [Hash] options
    #
    # @option options [Array] :args Command-line arguments to pass to the
    #  underlying Python kernel.
    #
    def initialize(options = {})
      @args    = options.delete(:args) || []
      @options = options
    end

    ##
    # Processes the input KAF document.
    #
    # @param [String] input
    # @return [String]
    #
    def run(input)
      return Processor.new(input, options).process
    end
  end # OpinionDetectorBasic
end # Opener


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opener-opinion-detector-basic-3.1.2 lib/opener/opinion_detector_basic.rb
opener-opinion-detector-basic-3.1.1 lib/opener/opinion_detector_basic.rb
opener-opinion-detector-basic-3.1.0 lib/opener/opinion_detector_basic.rb
opener-opinion-detector-basic-3.0.2 lib/opener/opinion_detector_basic.rb