Package com.gengoai.hermes.extraction
Class RegexExtractor
- java.lang.Object
-
- com.gengoai.hermes.extraction.RegexExtractor
-
-
Constructor Summary
Constructors Constructor Description RegexExtractor(@NonNull String pattern, boolean fuzzyMatch)
Instantiates a new RegexExtractor.RegexExtractor(@NonNull String pattern, boolean caseSensitive, boolean fuzzyMatch)
Instantiates a new RegexExtractor.RegexExtractor(@NonNull Pattern pattern, boolean fuzzyMatch)
Instantiates a new RegexExtractor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Extraction
extract(@NonNull HString hString)
Generate anExtraction
from the givenHString
.
-
-
-
Constructor Detail
-
RegexExtractor
public RegexExtractor(@NonNull @NonNull Pattern pattern, boolean fuzzyMatch)
Instantiates a new RegexExtractor.- Parameters:
pattern
- the pattern to search forfuzzyMatch
- True - allow sub-word matching (i.e. "is" will be matched in "This"), False must match full spans of text.
-
RegexExtractor
public RegexExtractor(@NonNull @NonNull String pattern, boolean caseSensitive, boolean fuzzyMatch)
Instantiates a new RegexExtractor.- Parameters:
pattern
- the pattern to search forcaseSensitive
- True - must match case, False - case does not matterfuzzyMatch
- True - allow sub-word matching (i.e. "is" will be matched in "This"), False must match full spans of text.
-
RegexExtractor
public RegexExtractor(@NonNull @NonNull String pattern, boolean fuzzyMatch)
Instantiates a new RegexExtractor.- Parameters:
pattern
- the pattern to search forfuzzyMatch
- True - allow sub-word matching (i.e. "is" will be matched in "This"), False must match full spans of text.
-
-
Method Detail
-
extract
public Extraction extract(@NonNull @NonNull HString hString)
Description copied from interface:Extractor
Generate anExtraction
from the givenHString
.
-
-