public final class PosTagHelper extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
ADJ_COMP_REGEX |
static Pattern |
ADJ_V_KLY_PATTERN |
static Pattern |
ADJ_V_NAZ_PATTERN |
static List<String> |
BASE_GENDERS |
static Map<String,String> |
GENDER_MAP |
static String |
NO_VIDMINOK_SUBSTR |
static Pattern |
NOUN_V_NAZ_PATTERN |
static Map<String,String> |
PERSON_MAP |
static Pattern |
VERB_ADVP_PATTERN |
static Pattern |
VERB_INF_PATTERN |
static Pattern |
VERB_PATTERN |
static Map<String,String> |
VIDMINKY_I_MAP |
static Map<String,String> |
VIDMINKY_MAP |
Modifier and Type | Method and Description |
---|---|
static List<TaggedWord> |
addIfNotContains(List<TaggedWord> taggedWords,
String addTag) |
static List<TaggedWord> |
addIfNotContains(List<TaggedWord> taggedWords,
String addTag,
String lemma) |
static String |
addIfNotContains(String tag,
String... addTags) |
static String |
addIfNotContains(String tag,
String addTag) |
static List<TaggedWord> |
adjust(List<TaggedWord> taggedWords,
String lemmaPrefix,
String lemmaSuffix,
String... addTags) |
static List<AnalyzedToken> |
filter(List<AnalyzedToken> analyzedTokens,
Pattern posTag) |
static List<TaggedWord> |
filter2(List<TaggedWord> analyzedTokens,
Pattern posTag) |
static List<TaggedWord> |
filter2Negative(List<TaggedWord> analyzedTokens,
Pattern posTag) |
static List<AnalyzedToken> |
generateTokensForNv(String word,
String genders,
String extraTags) |
static String |
getConj(String posTag) |
static String |
getGender(String posTag) |
static String |
getGenderConj(String posTag) |
static String |
getGenders(AnalyzedTokenReadings tokenReadings,
Pattern posTagRegex) |
static String |
getGenders(AnalyzedTokenReadings tokenReadings,
String posTagRegex) |
static String |
getNum(String posTag) |
static boolean |
hasMaleUA(AnalyzedTokenReadings tokenReadings) |
static boolean |
hasPosTag(AnalyzedToken analyzedToken,
Pattern posTagRegex) |
static boolean |
hasPosTag(AnalyzedTokenReadings analyzedTokenReadings,
Pattern posTagRegex) |
static boolean |
hasPosTag(AnalyzedTokenReadings analyzedTokenReadings,
String posTagRegex) |
static boolean |
hasPosTag(AnalyzedToken analyzedToken,
String posTagRegex) |
static boolean |
hasPosTag(Collection<AnalyzedToken> analyzedTokenReadings,
Pattern posTagRegex) |
static boolean |
hasPosTag(Collection<AnalyzedToken> analyzedTokenReadings,
String posTagRegex) |
static boolean |
hasPosTag(TaggedWord analyzedToken,
Pattern posTagRegex) |
static boolean |
hasPosTag2(List<TaggedWord> taggedWords,
Pattern pattern) |
static boolean |
hasPosTagAll(List<AnalyzedToken> analyzedTokenReadings,
Pattern posTag) |
static boolean |
hasPosTagAndToken(AnalyzedTokenReadings tokens,
Pattern postag,
Pattern token) |
static boolean |
hasPosTagPart(AnalyzedTokenReadings analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagPart(AnalyzedToken analyzedToken,
String posTagPart) |
static boolean |
hasPosTagPart(List<AnalyzedToken> analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagPart2(List<TaggedWord> taggedWords,
String posTagPart) |
static boolean |
hasPosTagPartAll(AnalyzedTokenReadings analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagPartAll(List<AnalyzedToken> analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagStart(AnalyzedTokenReadings analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagStart(AnalyzedToken analyzedToken,
String posTagPart) |
static boolean |
hasPosTagStart(List<AnalyzedToken> analyzedTokenReadings,
String posTagPart) |
static boolean |
hasPosTagStart2(List<TaggedWord> taggedWords,
String posTagPart) |
static boolean |
isPredictOrInsert(AnalyzedToken token) |
static boolean |
isUnknownWord(AnalyzedTokenReadings analyzedTokenReadings) |
public static final Pattern ADJ_COMP_REGEX
public static final String NO_VIDMINOK_SUBSTR
public static final Pattern NOUN_V_NAZ_PATTERN
public static final Pattern ADJ_V_NAZ_PATTERN
public static final Pattern VERB_INF_PATTERN
public static final Pattern ADJ_V_KLY_PATTERN
public static final Pattern VERB_PATTERN
public static final Pattern VERB_ADVP_PATTERN
public static boolean hasPosTag(AnalyzedTokenReadings analyzedTokenReadings, Pattern posTagRegex)
public static boolean hasPosTag(AnalyzedTokenReadings analyzedTokenReadings, String posTagRegex)
public static boolean hasPosTag(Collection<AnalyzedToken> analyzedTokenReadings, Pattern posTagRegex)
public static boolean hasPosTag(Collection<AnalyzedToken> analyzedTokenReadings, String posTagRegex)
public static boolean hasPosTag(AnalyzedToken analyzedToken, String posTagRegex)
public static boolean hasPosTagPart(AnalyzedToken analyzedToken, String posTagPart)
public static boolean hasPosTag(AnalyzedToken analyzedToken, Pattern posTagRegex)
public static boolean hasPosTag(TaggedWord analyzedToken, Pattern posTagRegex)
public static boolean hasPosTagPart(AnalyzedTokenReadings analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagPart(List<AnalyzedToken> analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagPartAll(AnalyzedTokenReadings analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagPartAll(List<AnalyzedToken> analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagAll(List<AnalyzedToken> analyzedTokenReadings, Pattern posTag)
public static boolean hasPosTagStart(AnalyzedTokenReadings analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagStart(List<AnalyzedToken> analyzedTokenReadings, String posTagPart)
public static boolean hasPosTagStart(AnalyzedToken analyzedToken, String posTagPart)
public static boolean hasPosTagPart2(List<TaggedWord> taggedWords, String posTagPart)
public static boolean hasPosTag2(List<TaggedWord> taggedWords, Pattern pattern)
public static boolean hasPosTagStart2(List<TaggedWord> taggedWords, String posTagPart)
public static String getGenders(AnalyzedTokenReadings tokenReadings, String posTagRegex)
public static String getGenders(AnalyzedTokenReadings tokenReadings, Pattern posTagRegex)
@NotNull public static List<AnalyzedToken> generateTokensForNv(String word, String genders, String extraTags)
@NotNull public static String addIfNotContains(@NotNull String tag, @Nullable String addTag)
@NotNull public static String addIfNotContains(@NotNull String tag, @Nullable String... addTags)
@NotNull public static List<TaggedWord> addIfNotContains(@NotNull List<TaggedWord> taggedWords, @NotNull String addTag)
@NotNull public static List<TaggedWord> addIfNotContains(@NotNull List<TaggedWord> taggedWords, @NotNull String addTag, @Nullable String lemma)
@NotNull public static List<TaggedWord> adjust(@NotNull List<TaggedWord> taggedWords, @Nullable String lemmaPrefix, @Nullable String lemmaSuffix, @Nullable String... addTags)
public static List<AnalyzedToken> filter(List<AnalyzedToken> analyzedTokens, Pattern posTag)
public static List<TaggedWord> filter2(List<TaggedWord> analyzedTokens, Pattern posTag)
public static List<TaggedWord> filter2Negative(List<TaggedWord> analyzedTokens, Pattern posTag)
public static boolean isUnknownWord(AnalyzedTokenReadings analyzedTokenReadings)
public static boolean isPredictOrInsert(AnalyzedToken token)
public static boolean hasPosTagAndToken(AnalyzedTokenReadings tokens, Pattern postag, Pattern token)
public static boolean hasMaleUA(AnalyzedTokenReadings tokenReadings)