Package org.languagetool.rules.nl
Class CompoundAcceptor
java.lang.Object
org.languagetool.rules.nl.CompoundAcceptor
Accept Dutch compounds that are not accepted by the speller. This code
is supposed to accept more words in order to extend the speller, but it's not meant
to accept all valid compounds.
It works on 2-part compounds only for now.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final DutchTaggerstatic final CompoundAcceptorprivate static final intprivate static final Patternprivate static final Patternprivate static final MorfologikDutchSpellerRuleprotected final CachingWordListLoader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanacceptCompound(String word) (package private) booleanacceptCompound(String part1, String part2) private booleanprivate booleanhasCollidingVowels(String part1, String part2) private booleanisExistingWord(String word) private booleanisGeographicalCompound(String word) private booleanstatic voidprivate booleanspellingOk(String nonCompound)
-
Field Details
-
acronymPattern
-
specialAcronymPattern
-
normalCasePattern
-
MAX_WORD_SIZE
private static final int MAX_WORD_SIZE- See Also:
-
INSTANCE
-
wordListLoader
-
noS
-
needsS
-
geographicalDirections
-
alwaysNeedsS
-
alwaysNeedsHyphen
-
part1Exceptions
-
part2Exceptions
-
acronymExceptions
-
COMPOUND_NO_S_FILE
- See Also:
-
COMPOUND_NEEDS_S_FILE
- See Also:
-
COMPOUND_DIRECTIONS_FILE
- See Also:
-
COMPOUND_ALWAYS_NEEDS_S_FILE
- See Also:
-
COMPOUND_ALWAYS_NEEDS_HYPHEN_FILE
- See Also:
-
COMPOUND_PART1_EXCEPTIONS_FILE
- See Also:
-
COMPOUND_PART2_EXCEPTIONS_FILE
- See Also:
-
COMPOUND_ACRONYM_EXCEPTIONS_FILE
- See Also:
-
collidingVowels
-
speller
-
dutchTagger
-
-
Constructor Details
-
CompoundAcceptor
public CompoundAcceptor()
-
-
Method Details
-
acceptCompound
-
getParts
-
acceptCompound
-
isNoun
- Throws:
IOException
-
isExistingWord
- Throws:
IOException
-
isGeographicalCompound
- Throws:
IOException
-
hasCollidingVowels
-
acronymOk
-
spellingOk
- Throws:
IOException
-
main
- Throws:
IOException
-