|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.ie.AbstractFieldExtractor | +--edu.stanford.nlp.ie.SingleFieldExtractor | +--edu.stanford.nlp.ie.regexp.RegexpExtractor
SingleFieldExtractor that matches text using a regular expression. The Regexp is assumed to be Concept-neutral, i.e. it returns the same Relation using the same RE for all Concepts. This class is implemented using the java.util.regex.* classes from J2SE 1.4.
Constructor Summary | |
RegexpExtractor(String fieldName,
String regexp)
Constructs a new RegexpExtractor to extract the given relation name using the given regular expression string. |
Method Summary | |
String |
extractField(edu.unika.aifb.kaon.Instance i,
String text)
Returns the first matching stretch of text in the given text, or null, if none is found. |
String |
getDescription()
Returns a description of this RegexpExtractor specifying the field name and regexp. |
String |
getExtractableField(edu.unika.aifb.kaon.Concept c)
Returns the name of the relation (field) extracted by FieldExtractor. |
Methods inherited from class edu.stanford.nlp.ie.SingleFieldExtractor |
extractField, extractFields, extractFields, getExtractableFields |
Methods inherited from class edu.stanford.nlp.ie.AbstractFieldExtractor |
isFieldExtractable, storeExtractor, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RegexpExtractor(String fieldName, String regexp)
fieldName
- Name of field to extractregexp
- Regexp to identify that fieldMethod Detail |
public String getExtractableField(edu.unika.aifb.kaon.Concept c)
getExtractableField
in class SingleFieldExtractor
public String extractField(edu.unika.aifb.kaon.Instance i, String text)
extractField
in class SingleFieldExtractor
public String getDescription()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |