Currently, I am using the following code to do analysis for a website:
import json
from os.path import join, dirname
from watson_developer_cloud import AlchemyLanguageV1
alchemy_language = AlchemyLanguageV1(api_key='YOUR API KEY')
url = 'https://developer.ibm.com/watson/blog/2015/11/03/price-reduction-
for-watson-personality-insights/'
combined_operations = ['page-image', 'entity', 'keyword', 'title',
'author', 'taxonomy', 'concept', 'doc-emotion']
print(json.dumps(alchemy_language.combined(url=url,
extract=combined_operations), indent=2))
Can anyone tell me how to refer to a local directory where I am having my own html file for analysis? I tried to use the following code and it is not working:
#html ='C:UsersDownloadsPythonname8.htm'
Aucun commentaire:
Enregistrer un commentaire