Sha256: 747cbff8ee63180047ac8c25af34f8ddca66ccccc6e92cf4575d37c23a4724dd

Contents?: true

Size: 839 Bytes

Versions: 7

Compression:

Stored size: 839 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

module Stealth
  module Nlp
    class Result

      ENTITY_TYPES = %i(number currency email percentage phone age
                        url ordinal geo dimension temp datetime duration
                        key_phrase name)

      attr_reader :result

      def initialize(result:)
        @result = result
      end

      def parsed_result
        nil
      end

      def intent_id
        nil
      end

      def intent
        nil
      end

      def intent_score
        nil
      end

      def raw_entities
        {}
      end

      def entities
        {}
      end

      # :postive, :negative, :neutral
      def sentiment
        nil
      end

      def sentiment_score
        nil
      end

      def present?
        parsed_result.present?
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stealth-2.0.0.beta7 lib/stealth/nlp/result.rb
stealth-2.0.0.beta6 lib/stealth/nlp/result.rb
stealth-2.0.0.beta5 lib/stealth/nlp/result.rb
stealth-2.0.0.beta4 lib/stealth/nlp/result.rb
stealth-2.0.0.beta3 lib/stealth/nlp/result.rb
stealth-2.0.0.beta2 lib/stealth/nlp/result.rb
stealth-2.0.0.beta1 lib/stealth/nlp/result.rb