Skip to content
Cesarla edited this page Apr 1, 2013 · 5 revisions

Acota allows two different ways to configure it:

Properties File

Place a properties file with the name "acota.properties" in the root of your project.

Fill it with the properties you want overwrite:

Sample of an acota.properties file:

google.relevance = 3
lucene.term.relevance = 0.72
lucene.label.relevance = 1
opennlp.en.tok = /etc/acota/open_nlp/en/EnglishTok.bin

That's it! Simply add as many properties as you need, Acota will automatically load for you.

Programmatically:

Sample of how to configure Acota-Core in a programmatically way (Same data as acota.properties samples!):

First create a CoreConfiguration file and overwrite all the properties that you need:

CoreConfiguration configuration = new CoreConfiguration();
configuration.setGoogleRelevance(3d);
configuration.setLuceneTermRelevance(0.72d);
configuration.setLuceneLabelRelevance(1d);
configuration.setOpenNlpEnTokBin("/etc/acota/open_nlp/en/EnglishTok.bin");

And finally load the CoreConfigution into the enhancer:

  • As a parameter in the Constructor:
FeedbackConfiguration feedback = new FeedbackConfiguration(configuration);
  • Or with the loadConfiguration method:
feedback.loadConfiguration(coreconfiguration);