-
Notifications
You must be signed in to change notification settings - Fork 76
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
[Issue #248] Add IBM AlchemyAPI extraction example #269
Conversation
Thanks. Please create a wiki page to give an overview of this comparison, and let @xuxip review both this PR and the wiki page. |
@xuxip Please review it first. |
Overall looks good. Below are several suggestions.
|
Some notes -
|
Some more notes for this PR -
|
@kishore-narendran I think virtualenv is an overkill for this small PR. It seems like only one module Since we didn't have the time to review this today, after @fukoyui takes care of these comments, Kishore and I can do another review, so @fukoyui can move on to evaluate next tool. |
@zuozhiw @fukoyui That is fair enough, but we will need a |
Agreed on the comment by @zuozhiw . In general, we want to minimize the number of external dependencies. @kishore-narendran Please also review the corresponding wiki page. |
@@ -0,0 +1 @@ | |||
c5aa33f495d42e55a13f07511e0b22825a727bf3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fukoyui Are we allowed to put this key here (in public)? If not, we remove it, and we will put the key in our internal files (on google drive)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this key and put it on our google drive.
@@ -0,0 +1,9 @@ | |||
To use AlchemyAPI you need to make sure you have: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename it to "readme.md" and use the markdown syntax? Check an example in another PR about Lingpipe: https://github.com/TextDB/textdb/pull/262/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with the change.
@@ -0,0 +1,780 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not put this third-party code in the folder with our own code. I had a chat with @zuozhiw and he said the python library has to be under the same folder.
I suggest we do the following: under this folder, create a subfolder called "third-party", and move this alchemyapi.py
there. Modify own code accordingly.
@fukoyui can you make the changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chenlica Python treats "third-party" as invalid syntax after moving it to a subdirectory named "third-party", but in "thirdparty" it works fine. Is it fine to use "thirdparty"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK to use thirdparty
.
@chenlica I was able to successfully compile and run the python program. The wiki page looks good to me. I suggest @fukoyui to make a reference to the sample code /sandbox/AlchemyAPIexample/extract.py in Step 5 of part 2. |
Thanks, @xuxip . @fukoyui Please make the suggested changes and then do the merge. |
|
||
2. Installed request module for Python | ||
|
||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix this conflict.
Since I move alchemyapi.py to a subdirectory, do we have to another review before doing the merge? @chenlica |
@fukoyui please merge the master into your branch then do the merge! |
This example takes an article of zika as the extracted file and uses IBM AlchemyAPI to analyze the contents. Analyzed results are passed to four functions: entities, keyword, concept, and language.
Related wiki page: https://github.com/TextDB/textdb/wiki/AlchemyAPI-(IBM-Bluemix-Watson)