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 UrlTextFilterINSTANCEprivate static java.util.regex.PatternMAIL_REGEXprivate static java.util.regex.PatternURL_REGEX
-
Constructor Summary
Constructors Modifier Constructor Description privateUrlTextFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringfilter(java.lang.CharSequence text)static UrlTextFiltergetInstance()
-
-
-
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:
filterin interfaceTextFilter
-
-