Package org.opensextant.extractors.poli
Class PatternsOfLife
java.lang.Object
org.opensextant.extractors.flexpat.AbstractFlexPat
org.opensextant.extractors.poli.PatternsOfLife
- All Implemented Interfaces:
- Extractor
- Author:
- Marc C. Ubaldino, MITRE, ubaldino at mitre dot org
- 
Field SummaryFieldsFields inherited from class org.opensextant.extractors.flexpat.AbstractFlexPatdebug, log, match_width, patterns, patterns_file
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected RegexPatternManagerCreate a pattern manager given the input stream and the file name.Useful for working with text buffers adhoc.Support the standard Extractor interface.extract_patterns(String text, String text_id, String family) Extract patterns of a certain family from a block of text.getName()Extractor interface: getNameMethods inherited from class org.opensextant.extractors.flexpat.AbstractFlexPatcleanup, configure, configure, configure, configure, disableAll, enableAll, getPatternManager, set_match_id, setMatchWidth
- 
Field Details- 
DEFAULT_POLI_CFG- See Also:
 
 
- 
- 
Constructor Details- 
PatternsOfLifepublic PatternsOfLife(boolean debugmode) 
- 
PatternsOfLifepublic PatternsOfLife()Default constructor, debugging off.
 
- 
- 
Method Details- 
getNameExtractor interface: getName- Returns:
- extractor name
 
- 
createPatternManagerDescription copied from class:AbstractFlexPatCreate a pattern manager given the input stream and the file name.- Specified by:
- createPatternManagerin class- AbstractFlexPat
- Parameters:
- s- stream of patterns config file
- n- app name
- Returns:
- the regex pattern manager
- Throws:
- IOException- Signals that an I/O exception has occurred.
 
- 
extractSupport the standard Extractor interface. This provides access to the most common extraction; For PoLi extraction, you would process ALL patterns in your configuration file, or if you enable only certain patterns -- those enabled at the time of this call would be executed. extract_patterns( family = null ) implies ALL patterns.- Parameters:
- input- text input
- Returns:
- the list of TextMatch
 
- 
extract
- 
extractDescription copied from interface:ExtractorUseful for working with text buffers adhoc. Fewer assumptions about input data here.- Parameters:
- input_buf- text input, as a string
- Returns:
- the list of TextMatch
 
- 
extract_patternsExtract patterns of a certain family from a block of text.- Parameters:
- text- - data to process
- text_id- - identifier for the data
- family- - optional filter; to reuse the same PatManager but extract certain patterns only.
- Returns:
- PoliResult
 
 
-