public class UniquePatternDetector
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_DELIMITER_CHARS
The default delimiter chars.
|
| Constructor and Description |
|---|
UniquePatternDetector(java.lang.String content)
Create a new instance with default delimiter chars.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDelimiterChars()
Get the delimiter chars.
|
java.util.ArrayList<UniquePatternDetectorElement> |
getUniquePatterns(int minPatternLength)
Get a list of unique text patterns.
|
void |
setDelimiterChars(java.lang.String delimiterChars)
Set the delimiter chars.
|
void |
setExcludeTextFragments(java.util.ArrayList<java.lang.String> excludeTextFragmentsList)
Set a list of text fragments which cannot be part of a unique text pattern.
|
public static final java.lang.String DEFAULT_DELIMITER_CHARS
public UniquePatternDetector(java.lang.String content)
content - the content from which the unique text patterns are detected.DEFAULT_DELIMITER_CHARSpublic java.lang.String getDelimiterChars()
public void setDelimiterChars(java.lang.String delimiterChars)
delimiterChars - the delimiter charsjava.lang.RuntimeException - if the delimiter chars is an empty stringpublic void setExcludeTextFragments(java.util.ArrayList<java.lang.String> excludeTextFragmentsList)
excludeTextFragmentsList - the list of text fragments which cannot be part of a unique text patternpublic java.util.ArrayList<UniquePatternDetectorElement> getUniquePatterns(int minPatternLength)
minPatternLength - the minimum length of an unique text patternjava.lang.RuntimeException - if somewhat fails