Trouble Running AlchemyAPI Natural Language Classifier APP in Bluemix

94 Views Asked by At

I've successfully deployed the AlchemyAPI Natural Language Classifier Sample App in Bluemix here.

However, when I run it I repeatedly get output:

"Not Found Error"

no matter which question I select and ask.

1

There are 1 best solutions below

0
On

The not found exception is probably because you didn't create and train a classifier.
There is a tutorial that explains how to create and train a classifier.
You will need the service credentials that you can get from Bluemix.
One thing I want to clarify is that Natural Language Classifier is not part of the Alchemy apis.


To create a classifier you will run:

curl -i -u "<username>":"<password>" \
-F training_data=@<path_to_file>/weather_data_train.csv \
-F training_metadata="{\"language\":\"en\",\"name\":\"TutorialClassifier\"}" \
"https://gateway.watsonplatform.net/natural-language-classifier/api/v1/classifiers"

weather_data_train.csv is here

Once the classifier is trained(~10 minutes) you need to update the sample application to point to the created classifier, see this guide.