Class: RelatedWord::SemanticService
- Inherits:
-
Object
- Object
- RelatedWord::SemanticService
- Defined in:
- lib/related_word/semantic_service.rb
Constant Summary collapse
- LINK =
"http://semantic-link.com/related.php?word="
Instance Method Summary collapse
Instance Method Details
#find(word) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/related_word/semantic_service.rb', line 8 def find(word) link = "#{LINK}#{word}" uri = URI.parse(link) response = Net::HTTP.get_response(uri) JSON.parse(response.body) end |