python - No module named Alchemy API -


i trying run alchemy api on computer python 2.7. file:

alchemyapi.py-2.5 

i have kept in same file code:

# load alchemyapi module code. import alchemyapi   # create alchemyapi object. alchemyobj = alchemyapi.alchemyapi()   # load api key disk. alchemyobj.loadapikey("api_key.txt")   # extract ranked list of named entities web url. result = alchemyobj.urlgetrankednamedentities("http://www.techcrunch.com/"); print (result)   # extract ranked list of named entities text string. result = alchemyobj.textgetrankednamedentities("hello name bob.  speaking @ moment.  listening me, bob?"); print (result)   # load html document analyze. htmlfilehandle = open("data/example.html", 'r') htmlfile = htmlfilehandle.read() htmlfilehandle.close()   # extract ranked list of named entities html document. result = alchemyobj.htmlgetrankednamedentities(htmlfile, "http://www.test.com/"); print (result) 

this standard code , gives error have mentioned in heading. required readme have copied alchemyapi.py-2.5 same directory. im not sure how py-2.5 file works.

you should remove -2.5 file extension, save "alchemyapi.py"

also, if running python 2.7, there reason using python 2.5 version file?


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -