watson-developer-cloud / python-sdk

:snake: Client library to use the IBM Watson services in Python and available in pip as watson-developer-cloud
https://pypi.org/project/ibm-watson/
Apache License 2.0
1.46k stars 827 forks source link

TypeError: concepts() got an unexpected keyword argument 'knowledgeGraph' #171

Closed DVBVV closed 7 years ago

DVBVV commented 7 years ago

Dear Miss./Mr.,

When using the knowledgeGraph example in concepts request from the alchemy-language api.

See: https://www.ibm.com/watson/developercloud/alchemy-language/api/v1/?python#concepts

I get the following error: TypeError: concepts() got an unexpected keyword argument 'knowledgeGraph'

Code Example from the above URL: mport json from watson_developer_cloud import AlchemyLanguageV1

alchemy_language = AlchemyLanguageV1(api_key='API_KEY')

print(json.dumps( alchemy_language.concepts( url='https://www.ibm.com/watson/', knowledgeGraph=1), indent=2))

The node.js example works by the way, so it seems something is not working well in the python sdk.

Hope that this can be resolved soon!

jsstylos commented 7 years ago

Hi, thanks for the report. The knowledge_graph parameter was missing from the concepts method in AlchemyLanguage. It has been added (as knowledge_graph, to match the casing of the other parameters) and will be in the next release.

See also the NaturalLanguageUnderstanding service, which is the successor to AlchemyLanguage.

DVBVV commented 7 years ago

Dear JS Stylos, Do you know when this release is available, and is AlchemyLanguage going to be phased out and it is going to be NaturalLanguageUnderstanding?

DVBVV commented 7 years ago

Thank a lot btw for reacting!

jsstylos commented 7 years ago

No problem. The deprecation date for AlchemyLanguage hasn't been announced yet, but users are encouraged to start looking at NaturalLanguageUnderstanding, which also has some lower costs.

DVBVV commented 7 years ago

Then rises the question, to what extend the knowledgeGraph is going to be still available? And if not what is replacing it. In the Alchemy API there is availability of taxonomy which translates into categories in the NaturalLanguageUnderstanding API, this is not necessarily the same as the knowledgeGraph, or is it?? I do not see the option of knowledgeGraph under concepts in the NLU API anymore....

jsstylos commented 7 years ago

AlchemyLanguage is now officially deprecated, AlchemyLanguage service instances will continue to work until March 2018 (https://www.ibm.com/watson/developercloud/doc/alchemylanguage/).

The Natural Language Understanding API concepts feature doesn't currently support the knowledge graph type-hierarchy.

DVBVV commented 7 years ago

Dear JS, to what extend do you expect IBM to come up with the knowledge-graph as a functionality, or is it not on the roadmap?

jsstylos commented 7 years ago

@DVBVV No plans yet, but based on demand it could get added, so I'll note your inquiry with the service team.