public final class TwitterTextParser
extends java.lang.Object
TwitterTextConfiguration
and returns a
TwitterTextParseResults
objectModifier and Type | Field and Description |
---|---|
static TwitterTextParseResults |
EMPTY_TWITTER_TEXT_PARSE_RESULTS |
static TwitterTextConfiguration |
TWITTER_TEXT_DEFAULT_CONFIG |
static TwitterTextConfiguration |
TWITTER_TEXT_EMOJI_CHAR_COUNT_CONFIG
v3.json supports counting emoji as one weighted character
|
static TwitterTextConfiguration |
TWITTER_TEXT_WEIGHTED_CHAR_COUNT_CONFIG
v2.json has the following unicode code point blocks defined
0x0000 (0) - 0x10FF (4351) Basic Latin to Georgian block: Weight 100
0x2000 (8192) - 0x200D (8205) Spaces in the General Punctuation Block: Weight 100
0x2010 (8208) - 0x201F (8223) Hyphens & Quotes in the General Punctuation Block: Weight 100
0x2032 (8242) - 0x2037 (8247) Quotes in the General Punctuation Block: Weight 100
|
Modifier and Type | Method and Description |
---|---|
static TwitterTextParseResults |
parseTweet(java.lang.String tweet)
Parses a given tweet text with the weighted character count configuration (v2.json).
|
static TwitterTextParseResults |
parseTweet(java.lang.String tweet,
TwitterTextConfiguration config)
Parses a given tweet text with the given
TwitterTextConfiguration |
static TwitterTextParseResults |
parseTweetWithoutUrlExtraction(java.lang.String tweet)
Returns the weighted length of a tweet without doing any URL processing.
|
public static final TwitterTextParseResults EMPTY_TWITTER_TEXT_PARSE_RESULTS
public static final TwitterTextConfiguration TWITTER_TEXT_DEFAULT_CONFIG
public static final TwitterTextConfiguration TWITTER_TEXT_WEIGHTED_CHAR_COUNT_CONFIG
public static final TwitterTextConfiguration TWITTER_TEXT_EMOJI_CHAR_COUNT_CONFIG
public static TwitterTextParseResults parseTweet(java.lang.String tweet)
tweet
- which is to be parsedTwitterTextParseResults
objectpublic static TwitterTextParseResults parseTweet(java.lang.String tweet, TwitterTextConfiguration config)
TwitterTextConfiguration
tweet
- which is to be parsedconfig
- TwitterTextConfiguration
TwitterTextParseResults
objectpublic static TwitterTextParseResults parseTweetWithoutUrlExtraction(java.lang.String tweet)
tweet
- which is to be parsedTwitterTextParseResults
object