Class: TextRazor::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/text_razor/entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Entity

Returns a new instance of Entity.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/text_razor/entity.rb', line 7

def initialize(options={})
  @confidence_score = options['confidenceScore']
  @ending_pos = options['endingPos']
  @entity_english_id = options['entityEnglishId']
  @entity_id = options['entityId']
  @freebase_id = options['freebaseId']
  @freebase_types = options['freebaseTypes']
  @matching_text = options['matchingText']
  @matching_tokens = options['matchingTokens']
  @relevance_score = options['relevanceScore']
  @starting_pos = options['startingPos']
  @wiki_link = options['wikiLink']
end

Instance Attribute Details

#confidence_scoreObject (readonly)

Returns the value of attribute confidence_score.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def confidence_score
  @confidence_score
end

#ending_posObject (readonly)

Returns the value of attribute ending_pos.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def ending_pos
  @ending_pos
end

#entity_english_idObject (readonly)

Returns the value of attribute entity_english_id.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def entity_english_id
  @entity_english_id
end

#entity_idObject (readonly)

Returns the value of attribute entity_id.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def entity_id
  @entity_id
end

#freebase_idObject (readonly)

Returns the value of attribute freebase_id.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def freebase_id
  @freebase_id
end

#freebase_typesObject (readonly)

Returns the value of attribute freebase_types.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def freebase_types
  @freebase_types
end

#matching_textObject (readonly)

Returns the value of attribute matching_text.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def matching_text
  @matching_text
end

#matching_tokensObject (readonly)

Returns the value of attribute matching_tokens.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def matching_tokens
  @matching_tokens
end

#relevance_scoreObject (readonly)

Returns the value of attribute relevance_score.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def relevance_score
  @relevance_score
end

#starting_posObject (readonly)

Returns the value of attribute starting_pos.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def starting_pos
  @starting_pos
end

Returns the value of attribute wiki_link.



3
4
5
# File 'lib/text_razor/entity.rb', line 3

def wiki_link
  @wiki_link
end