Class: Calais::Response
- Inherits:
-
Object
- Object
- Calais::Response
- Defined in:
- lib/calais/response.rb
Defined Under Namespace
Classes: CalaisHash, Category, Entity, Geography, Instance, Relation
Constant Summary collapse
- MATCHERS =
{ :docinfo => 'DocInfo', :docinfometa => 'DocInfoMeta', :defaultlangid => 'DefaultLangId', :doccat => 'DocCat', :entities => 'type/em/e', :relations => 'type/em/r', :geographies => 'type/er', :instances => 'type/sys/InstanceInfo', :relevances => 'type/sys/RelevanceInfo', }
Instance Attribute Summary collapse
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#doc_date ⇒ Object
Returns the value of attribute doc_date.
-
#doc_title ⇒ Object
Returns the value of attribute doc_title.
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#geographies ⇒ Object
Returns the value of attribute geographies.
-
#hashes ⇒ Object
Returns the value of attribute hashes.
-
#language ⇒ Object
Returns the value of attribute language.
-
#relations ⇒ Object
Returns the value of attribute relations.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#submission_date ⇒ Object
Returns the value of attribute submission_date.
-
#submitter_code ⇒ Object
Returns the value of attribute submitter_code.
Instance Method Summary collapse
-
#initialize(rdf_string) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(rdf_string) ⇒ Response
Returns a new instance of Response.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/calais/response.rb', line 18 def initialize(rdf_string) @raw_response = rdf_string @hashes = [] @entities = [] @relations = [] @geographies = [] @relevances = {} # key = String hash, val = Float relevance @categories = [] extract_data end |
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
16 17 18 |
# File 'lib/calais/response.rb', line 16 def categories @categories end |
#doc_date ⇒ Object
Returns the value of attribute doc_date.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def doc_date @doc_date end |
#doc_title ⇒ Object
Returns the value of attribute doc_title.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def doc_title @doc_title end |
#entities ⇒ Object
Returns the value of attribute entities.
16 17 18 |
# File 'lib/calais/response.rb', line 16 def entities @entities end |
#geographies ⇒ Object
Returns the value of attribute geographies.
16 17 18 |
# File 'lib/calais/response.rb', line 16 def geographies @geographies end |
#hashes ⇒ Object
Returns the value of attribute hashes.
16 17 18 |
# File 'lib/calais/response.rb', line 16 def hashes @hashes end |
#language ⇒ Object
Returns the value of attribute language.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def language @language end |
#relations ⇒ Object
Returns the value of attribute relations.
16 17 18 |
# File 'lib/calais/response.rb', line 16 def relations @relations end |
#request_id ⇒ Object
Returns the value of attribute request_id.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def request_id @request_id end |
#signature ⇒ Object
Returns the value of attribute signature.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def signature @signature end |
#submission_date ⇒ Object
Returns the value of attribute submission_date.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def submission_date @submission_date end |
#submitter_code ⇒ Object
Returns the value of attribute submitter_code.
15 16 17 |
# File 'lib/calais/response.rb', line 15 def submitter_code @submitter_code end |