Text indexer and spell checker in Java