Package org.languagetool.chunking
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 enum
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
private static final TokenExpressionFactory
private static final List
<GermanChunker.RegularExpressionWithPhraseType> private static final List
<GermanChunker.RegularExpressionWithPhraseType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChunkTags
(List<org.languagetool.AnalyzedTokenReadings> tokenReadings) private void
apply
(GermanChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) private void
assignChunksToReadings
(List<ChunkTaggedToken> chunkTaggedTokens) private static GermanChunker.RegularExpressionWithPhraseType
build
(String expr, GermanChunker.PhraseType phraseType) private static GermanChunker.RegularExpressionWithPhraseType
build
(String expr, GermanChunker.PhraseType phraseType, boolean overwrite) private GermanChunker.AffectedSpans
(package private) List
<ChunkTaggedToken> getBasicChunks
(List<org.languagetool.AnalyzedTokenReadings> tokenReadings) private org.languagetool.chunking.ChunkTag
getChunkTag
(GermanChunker.RegularExpressionWithPhraseType regex, edu.washington.cs.knowitall.regex.Match<ChunkTaggedToken> match, int i) private String
getDebugString
(List<ChunkTaggedToken> tokens) static boolean
isDebug()
Deprecated.for internal use onlyprivate void
printDebugInfo
(GermanChunker.RegularExpressionWithPhraseType regex, GermanChunker.AffectedSpans affectedSpans, String debug) static void
setDebug
(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:
addChunkTags
in 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
-