Component that stores results from the Opener Web Services chain into a MySQL Database and shows them into your browser.
It can be used instead of Opener Outlet, to calculate overall sentiment score and sentiment score per topic.
This software is part of a larger collection of natural language processing tools known as "the OpeNER project". You can find more information about the project at the OpeNER portal. There you can also find references to terms like KAF (an XML standard to represent linguistic annotations in texts), component, cores, scenario's and pipelines.
Installing the scorer can be done by executing:
gem install opener-scorer
Please keep in mind that all components in OpeNER take KAF as an input and output KAF by default.
You should now be able to call the scorer as a regular shell command: by its name. Once installed the gem normally sits in your path so you can call it directly from anywhere.
This aplication reads a text from standard input in order to rate the given text:
cat some_kind_of_kaf_file.kaf | scorer
This will output (JSON Format):
{"overall":-0.06666666666666667,"Restaurant":0.3333333333333333,"Staff":-1.0,"Rooms":1.0,"Facilities":-1.0}
You can launch a webservice by executing:
scorer-server
This will launch a mini webserver with the webservice. It defaults to port 9292, so you can access it at http://localhost:9292.
To launch it on a different port provide the -p [port-number]
option like
this:
scorer-server -p 1234
It then launches at http://localhost:1234
Documentation on the Webservice is provided by surfing to the urls provided
above. For more information on how to launch a webservice run the command with
the --help
option.
Last but not least the scorer comes shipped with a daemon that can read jobs (and write) jobs to and from Amazon SQS queues. For more information type:
scorer-daemon -h
This component runs best if you run it in an environment suited for OpeNER components. You can find an installation guide and helper tools in the OpeNER installer and an installation guide on the Opener Website
At least you need the following system setup:
- JRuby 1.7.9 or newer
If you encounter problems, please email [email protected] or leave an issue in the issue tracker.
- Fork it http://github.com/opener-project/scorer/fork
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request