Java client for After The Deadline (AtD) spell, grammar, style and stats checker.
Use the following coordinates in your Maven build:
<dependency>
<groupId>ws.bors</groupId>
<artifactId>atd</artifactId>
<version>1.1.0</version>
</dependency>
// Use the default English AtD hosted server
SpellChecker spellChecker = new SpellChecker();
// Use a custom hosted AtD server
SpellChecker spellChecker = new SpellChecker(
"http://YourAtD.Server.url/checkDocument",
"YourAPI-key"
);
// Change the behavior of the spellChecker
spellChecker.setOptions(new ISpellCheckerOptions() {
// Preprocess text/html prior to POSTing it to the AtD server
@Override String processChars(String data) { ... }
// Decide if this error is to be ignored from the AtD server results
@Override boolean ignoreWord(String misspelledWord) { ... }
});
// Get all Error(s) grammar | spell | stats | style
Results results = spellChecker.queryServer(data);
// Get a list of misspelled words
List<String> errors = spellChecker.spellErrors("hello world");
After the Deadline server provides 5 languages:
- English (en, default)
- French (fr)
- German (de)
- Spanish (es)
- Portuguese (pt)
If no language is set English is choosen by default. To set another language simply set it:
// Use the default English AtD hosted server
SpellChecker spellChecker = new SpellChecker();
// Change the language to Spanish
spellChecker.setLanguage(Language.SPANISH);
For other AtD client libraries see AtD's Developer's site.
- Fork it
- 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
- Update POM Version(s) via
mvn release:update-versions -DautoVersionSubmodules=true
- Run Maven build via (order matters as java docs and sources must first be generated then signed)
mvn clean license:format install javadoc:aggregate javadoc:javadoc javadoc:jar source:jar gpg:sign repository:bundle-create
- Check everything in and make a tag
- Upload bundle via https://oss.sonatype.org
- Update POM Versions to new SNAPSHOT version via
mvn release:update-versions -DautoVersionSubmodules=true -DdevelopmentVersion=X.Y.Z-SNAPSHOT
- Check everything in