Class GermanChunker
java.lang.Object
org.languagetool.chunking.GermanChunker
- All Implemented Interfaces:
org.languagetool.chunking.Chunker
A rule-based German chunker for noun phrases. Please note that this chunker
has not been evaluated as a stand-alone chunker, it has only been used and tested
in the context of LanguageTool's error detection rules.
- Since:
- 2.9
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class(package private) static enumprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanprivate static final TokenExpressionFactoryprivate static final List<GermanChunker.RegularExpressionWithPhraseType> private static final List<GermanChunker.RegularExpressionWithPhraseType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChunkTags(List<org.languagetool.AnalyzedTokenReadings> tokenReadings) private voidapply(GermanChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) private voidassignChunksToReadings(List<ChunkTaggedToken> chunkTaggedTokens) private static GermanChunker.RegularExpressionWithPhraseTypebuild(String expr, GermanChunker.PhraseType phraseType) private static GermanChunker.RegularExpressionWithPhraseTypebuild(String expr, GermanChunker.PhraseType phraseType, boolean overwrite) private GermanChunker.AffectedSpans(package private) List<ChunkTaggedToken> getBasicChunks(List<org.languagetool.AnalyzedTokenReadings> tokenReadings) private org.languagetool.chunking.ChunkTaggetChunkTag(GermanChunker.RegularExpressionWithPhraseType regex, edu.washington.cs.knowitall.regex.Match<ChunkTaggedToken> match, int i) private StringgetDebugString(List<ChunkTaggedToken> tokens) static booleanisDebug()Deprecated.for internal use onlyprivate voidprintDebugInfo(GermanChunker.RegularExpressionWithPhraseType regex, GermanChunker.AffectedSpans affectedSpans, String debug) static voidsetDebug(boolean debugMode) Deprecated.for internal use only
-
Field Details
-
FILTER_TAGS
-
FACTORY
-
SYNTAX_EXPANSION
-
debug
private static boolean debug -
REGEXES1
-
REGEXES2
-
-
Constructor Details
-
GermanChunker
public GermanChunker()
-
-
Method Details
-
setDebug
public static void setDebug(boolean debugMode) Deprecated.for internal use only -
isDebug
public static boolean isDebug()Deprecated.for internal use only -
build
private static GermanChunker.RegularExpressionWithPhraseType build(String expr, GermanChunker.PhraseType phraseType) -
build
private static GermanChunker.RegularExpressionWithPhraseType build(String expr, GermanChunker.PhraseType phraseType, boolean overwrite) -
addChunkTags
- Specified by:
addChunkTagsin interfaceorg.languagetool.chunking.Chunker
-
getBasicChunks
-
apply
private void apply(GermanChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) -
assignChunksToReadings
-
doApplyRegex
private GermanChunker.AffectedSpans doApplyRegex(GermanChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) -
getChunkTag
private org.languagetool.chunking.ChunkTag getChunkTag(GermanChunker.RegularExpressionWithPhraseType regex, edu.washington.cs.knowitall.regex.Match<ChunkTaggedToken> match, int i) -
printDebugInfo
private void printDebugInfo(GermanChunker.RegularExpressionWithPhraseType regex, GermanChunker.AffectedSpans affectedSpans, String debug) -
getDebugString
-