public abstract class TextRecognitionUtils extends Object
| 构造器 | 说明 |
|---|---|
TextRecognitionUtils() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static Date[] |
convertDate(String dateString,
long defaultDate) |
Converts the recognized time information in the given text to dates.
|
static int[] |
getAddress(String msgContent) |
Recognizes address information in the given text.
|
static int[] |
getPhoneNumbers(String msg,
String country) |
Recognizes phone numbers in the given text.
|
static int[] |
getTime(String msg) |
Recognizes time information in the given text.
|
public static int[] getAddress(String msgContent)
msgContent - Indicates the text whose address information is to be
recognized.public static Date[] convertDate(String dateString, long defaultDate)
dateString - Indicates the text whose time information is to be
converted.defaultDate - Indicates the specified number of milliseconds since the
standard base time known as the epoch (00:00:00 GMT on
January 1, 1970). This value is used as the reference for
supplementing any time information if missed.public static int[] getTime(String msg)
msg - Indicates the text whose time information is to be recognized.0 for date
and time; 1 for date; 2 for time; 3 for time
segment), the second one indicates the start time, and the third one
indicates the end time.public static int[] getPhoneNumbers(String msg, String country)
msg - Indicates the text whose phone numbers are to be recognized.country - Indicates the ISO country code. The value is used to determine
the rules for recognizing a phone number if no international
call prefix is available.