-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method for extracting Concepts tag using AlchemyLanguage API. #6
Comments
Alchemy API was originally by a third-party service, later has been integrated into Watson API. |
I figured out on how to concept_api_url = "https://gateway-a.watsonplatform.net/calls/text/TextGetRankedConcepts"
options = { text: "text", content_type: 'text/plain', apikey: 'xxxxx', url: 'http://example.com', outputMode: 'json', knowledgeGraph: 1 }
begin
response = RestClient.post(concept_api_url, options)
rescue RestClient::ExceptionWithResponse => err
puts err.response
end Sample code for Personality-Insight: profile_api_url = "https://gateway.watsonplatform.net/personality-insights/api/v2/profile"
client = RestClient::Resource.new(profile_api_url, 'username given by Api', 'password given by Api')
begin
response = client.post text, content_type: 'text/plain'
rescue RestClient::ExceptionWithResponse => err
puts err.response
end I thought of adding the same to your library but I think you are following a different way to hit the |
I'm going to have made sure that the APIs which belong to the Alchemy APIs will also work, but does it work at your place well? |
Yeah it works pretty much everywhere. |
I am trying to use
AlchemyApi
for extractingconcepts tag
from a text but for some reason it keeps throwing the errorundefined method concepts for #<WatsonAPIClient::AlchemyLanguage:0x007f9d86754088>
when trying to pass text using the similar syntax as shown in the exmaple.service.concepts(....)
. I am not sure if this is the right method also, I couldn't find any relevant info. regarding the same. Can you please tell me what is the method name forconcepts tag
and how to pass atext
to it.The text was updated successfully, but these errors were encountered: