Package org.languagetool.chunking
Class RussianChunker
java.lang.Object
org.languagetool.chunking.RussianChunker
- All Implemented Interfaces:
Chunker
A rule-based prototype Russian chunker. Please note that this chunker
has not been evaluated as a stand-alone chunker, it has only been used
in the context of LanguageTool's error detection rules.
- Since:
- 5.6
-
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<RussianChunker.RegularExpressionWithPhraseType> private static final List<RussianChunker.RegularExpressionWithPhraseType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChunkTags(List<AnalyzedTokenReadings> tokenReadings) private voidapply(RussianChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) private voidassignChunksToReadings(List<ChunkTaggedToken> chunkTaggedTokens) private static RussianChunker.RegularExpressionWithPhraseTypebuild(String expr, RussianChunker.PhraseType phraseType) private static RussianChunker.RegularExpressionWithPhraseTypebuild(String expr, RussianChunker.PhraseType phraseType, boolean overwrite) private RussianChunker.AffectedSpans(package private) List<ChunkTaggedToken> getBasicChunks(List<AnalyzedTokenReadings> tokenReadings) private ChunkTaggetChunkTag(RussianChunker.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(RussianChunker.RegularExpressionWithPhraseType regex, RussianChunker.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
-
RussianChunker
public RussianChunker()
-
-
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 RussianChunker.RegularExpressionWithPhraseType build(String expr, RussianChunker.PhraseType phraseType) -
build
private static RussianChunker.RegularExpressionWithPhraseType build(String expr, RussianChunker.PhraseType phraseType, boolean overwrite) -
addChunkTags
- Specified by:
addChunkTagsin interfaceChunker- Parameters:
tokenReadings- the analyzed tokens of one sentence
-
getBasicChunks
-
apply
private void apply(RussianChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) -
assignChunksToReadings
-
doApplyRegex
private RussianChunker.AffectedSpans doApplyRegex(RussianChunker.RegularExpressionWithPhraseType regex, List<ChunkTaggedToken> tokens) -
getChunkTag
private ChunkTag getChunkTag(RussianChunker.RegularExpressionWithPhraseType regex, edu.washington.cs.knowitall.regex.Match<ChunkTaggedToken> match, int i) -
printDebugInfo
private void printDebugInfo(RussianChunker.RegularExpressionWithPhraseType regex, RussianChunker.AffectedSpans affectedSpans, String debug) -
getDebugString
-