public class Chronic extends Object
Modifier and Type | Method and Description |
---|---|
protected static List<Token> |
baseTokenize(String text)
Split the text on spaces and convert each word into
a Token
|
protected static Span |
guess(Span span)
Guess a specific time within the given span
|
protected static String |
numericizeNumbers(String text)
Convert number words to numbers (three => 3)
|
protected static String |
numericizeOrdinals(String text)
Convert ordinal words to numeric ordinals (third => 3rd)
|
static Span |
parse(String text) |
static Span |
parse(String text,
Options options)
Parses a string containing a natural language date or time.
|
protected static String |
preNormalize(String text)
Clean up the specified input text by stripping unwanted characters,
converting idioms to their canonical form, converting number words
to numbers (three => 3), and converting ordinal words to numeric
ordinals (third => 3rd)
|
public static final String VERSION
public static Span parse(String text, Options options)
protected static String preNormalize(String text)
protected static String numericizeNumbers(String text)
protected static String numericizeOrdinals(String text)
protected static List<Token> baseTokenize(String text)
Copyright © 2002 – 2020 Project Wonder.