Package com.optimaize.langdetect.text
Class UrlTextFilter
- java.lang.Object
-
- com.optimaize.langdetect.text.UrlTextFilter
-
- All Implemented Interfaces:
TextFilter
public class UrlTextFilter extends java.lang.Object implements TextFilter
Removes URLs and email addresses from the text.
-
-
Field Summary
Fields Modifier and Type Field Description private static UrlTextFilter
INSTANCE
private static java.util.regex.Pattern
MAIL_REGEX
private static java.util.regex.Pattern
URL_REGEX
-
Constructor Summary
Constructors Modifier Constructor Description private
UrlTextFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
filter(java.lang.CharSequence text)
static UrlTextFilter
getInstance()
-
-
-
Field Detail
-
URL_REGEX
private static final java.util.regex.Pattern URL_REGEX
-
MAIL_REGEX
private static final java.util.regex.Pattern MAIL_REGEX
-
INSTANCE
private static final UrlTextFilter INSTANCE
-
-
Method Detail
-
getInstance
public static UrlTextFilter getInstance()
-
filter
public java.lang.String filter(java.lang.CharSequence text)
- Specified by:
filter
in interfaceTextFilter
-
-