This is an example client for NLTK REST using the Apache CXF library.
To test it, start up the NLTK REST server:
If you need to install NTK REST:
pip install nltkrest
Then, start the server:
nltk-server -p 8881 -v
Then, try the client by first building it:
mvn install
(requires Maven)
Then, run:
java -jar target/nltkrest-examples-1.0-SNAPSHOT.jar "This is Chris Mattmann. I live in Los Angeles, California."
Which should return:
Performing NLTK analysis on text: This is Chris Mattmann. I live in Los Angeles, California.
Connecting to NLTKRest at: [http:https://localhost:8881/nltk]
{
"names": [
"Chris Mattmann",
"Los Angeles",
"California"
],
"result": "success"
}
NLTKandCoreNLP compares the results of Named Entities recognized by Stanford CoreNLP against those extracted by Tika trunk containing ability to use NLTKNeRecignizer Parser.
java -cp target/nltkrest-examples-1.0-SNAPSHOT.jar edu.usc.ir.visualization.NLTKandCoreNLP "url/to/solr/dev" "username" "password" "path/to/destination/folder"
Which should return:
Json ready for Visualization: path/to/destination/folder/nltk_vs_corenlp.json
You can then follow the procedure to see a beautiful visualization using instructions from Tika-NLTKvsCoreNLP
Send them to Manali Shah or Chris A. Mattmann.
- Manali Shah, USC
- Chris A. Mattmann, USC & JPL