class PalladianNer extends TrainableNamedEntityRecognizer implements ClassifyingTagger {

    Set<String> buildCaseDictionary(String text) {
        LOGGER.info("Building case dictionary");
        DictionaryBuilder builder = createDictionaryBuilder();
        Iterator<Token> tokens = new WordTokenizer().iterateTokens(text);
        boolean skip = true; // skip the first, and tokens after a new sentence start
        while (tokens.hasNext()) {
            String token = tokens.next().getValue();
            if (skip) {
                skip = false;
            } else if (token.matches("[.?!]")) {
                skip = true;
            } else {
                String trimmedToken = token.trim();
                if (trimmedToken.length() > 1) {
                    String caseSignature = StringHelper.getCaseSignature(trimmedToken);
                    if (caseSignature.toLowerCase().startsWith("a")) {
                        builder.addDocument(Collections.singleton(trimmedToken.toLowerCase()),
                                caseSignature.substring(0, 1));
                    }
                }
            }
        }
        DictionaryModel temp = builder.create();
        Set<String> lowerCaseDictionary = new HashSet<>();
        for (DictionaryEntry entry : temp) {
            String token = entry.getTerm();
            if (entry.getCategoryEntries().getProbability("a") > 0.5) {
                lowerCaseDictionary.add(token);
            }
        }
        return lowerCaseDictionary;
    }

    public  PalladianNer(PalladianNerTrainingSettings trainingSettings);
    public  PalladianNer(String modelFilePath);

}