Class MailAddressScan
java.lang.Object
opennlp.tools.util.normalizer.MailAddressScan
Finds email addresses in text for
UrlCharSequenceNormalizer and classifies whole
tokens as email addresses. An address is a maximal run of the local-part set
[-+_.0-9A-Za-z] with a left neighbor outside that set, an @, and a domain
run out of [-.0-9A-Za-z] that does not start with a dot and spans at least two
chars.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAddress(CharSequence text) Checks whether a whole text is one email address.
-
Method Details
-
isAddress
Checks whether a whole text is one email address.- Parameters:
text- The text to classify. Must not benull.- Returns:
trueif an address starts at index0and ends at the end oftext,falseotherwise, also for the empty text.- Throws:
IllegalArgumentException- Thrown iftextisnull.
-