Sha256: 719ba6419bbed61f80d28ea21757d113894dc854a9f98708f08bfec33a443f68

Contents?: true

Size: 686 Bytes

Versions: 15

Compression:

Stored size: 686 Bytes

Contents

require 'open3'
require 'opener/core'
require 'nokogiri'
require 'hashie'
require 'active_support/all'

require_relative 'polarity_tagger/version'
require_relative 'polarity_tagger/cli'
require_relative 'polarity_tagger/external'

require_relative 'polarity_tagger/internal'

module Opener
  class PolarityTagger

    def initialize options = {}
      @args    = options.delete(:args) || []
      @options = options
      @klass   = if ENV['LEGACY'] then External else Internal end
      @proc    = @klass.new args: @args
    end

    def clear_cache params = {}
      @proc.clear_cache(**params)
    end

    def run input, params = {}
      @proc.run input, params
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
opener-polarity-tagger-3.5.5 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.5.4 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.5.3 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.5.2 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.5.1 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.5.0 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.4.0 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.3.0 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.7 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.6 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.5 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.4 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.3 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.2 lib/opener/polarity_tagger.rb
opener-polarity-tagger-3.2.1 lib/opener/polarity_tagger.rb