|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.annic.Hit
gate.creole.annic.Pattern
public class Pattern
Pattern is an extension of the HIT class. This provides information about the underlying annotations as well as the information about its left and right context.
Field Summary | |
---|---|
protected List<PatternAnnotation> |
annotations
annotations |
protected int |
leftContextStartOffset
Left context start offset |
protected String |
patternText
pattern text |
protected int |
rightContextEndOffset
right context end offset |
Fields inherited from class gate.creole.annic.Hit |
---|
annotationSetName, documentID, endOffset, queryString, startOffset |
Constructor Summary | |
---|---|
Pattern(String docID,
String annotationSetName,
String patternText,
int startOffset,
int endOffset,
int leftContextStartOffset,
int rightContextEndOffset,
List<PatternAnnotation> annotations,
String queryString)
Constructor |
Method Summary | |
---|---|
int |
getLeftContextStartOffset()
Returns the start offset of the left context |
PatternAnnotation[] |
getPatternAnnotations()
Returns all annotations underlying the pattern |
List<PatternAnnotation> |
getPatternAnnotations(int startOffset,
int endOffset)
Returns the annotations lying between the start and the end offsets |
PatternAnnotation[] |
getPatternAnnotations(String type)
Returns the annotations with the given type |
PatternAnnotation[] |
getPatternAnnotations(String type,
String feature)
Returns the annotations with the given type and the feature |
String |
getPatternText()
Returns the text of the pattern |
String |
getPatternText(int startOffset,
int endOffset)
Returns the text of the pattern between the given offsets |
int |
getRightContextEndOffset()
Returns the end offset of the right context |
Methods inherited from class gate.creole.annic.Hit |
---|
getAnnotationSetName, getDocumentID, getEndOffset, getQueryString, getStartOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int leftContextStartOffset
protected int rightContextEndOffset
protected String patternText
protected List<PatternAnnotation> annotations
Constructor Detail |
---|
public Pattern(String docID, String annotationSetName, String patternText, int startOffset, int endOffset, int leftContextStartOffset, int rightContextEndOffset, List<PatternAnnotation> annotations, String queryString)
docID
- patternText
- startOffset
- endOffset
- leftContextStartOffset
- rightContextEndOffset
- annotations
- queryString
- Method Detail |
---|
public List<PatternAnnotation> getPatternAnnotations(int startOffset, int endOffset)
public PatternAnnotation[] getPatternAnnotations()
public PatternAnnotation[] getPatternAnnotations(String type)
public PatternAnnotation[] getPatternAnnotations(String type, String feature)
public String getPatternText()
public String getPatternText(int startOffset, int endOffset)
public int getLeftContextStartOffset()
public int getRightContextEndOffset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |