public class RegexExtractor extends Extractor<ChunkedSentence,ChunkedExtraction>
LayeredTokenPattern object to represent
the regular expression pattern.| Constructor and Description |
|---|
RegexExtractor(String patternString)
Constructs a new instance using the given pattern.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<ChunkedExtraction> |
extractCandidates(ChunkedSentence sentence)
Extracts candidate extractions from the given source object.
|
LayeredTokenPattern |
getPattern() |
String |
getPatternString() |
addMapper, compose, extract, getMapperspublic RegexExtractor(String patternString) throws SequenceException
pattern - the relation patternSequenceException - if unable to compile patternpublic String getPatternString()
public LayeredTokenPattern getPattern()
LayeredTokenPattern used to extract relations.public Collection<ChunkedExtraction> extractCandidates(ChunkedSentence sentence) throws ExtractorException
ExtractorExtractor.extract(Object), the this method is
used to generate a set of candidate extractions, which are then passed
through each mapper object attached to the extractor.extractCandidates in class Extractor<ChunkedSentence,ChunkedExtraction>sentence - the source to extract from.ExtractorException - if unable to extractCopyright © 2010-2013 University of Washington CSE. All Rights Reserved.