本文整理了Java中org.apache.uima.jcas.tcas.Annotation.getAddress()
方法的一些代码示例,展示了Annotation.getAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.getAddress()
方法的具体详情如下:
包路径:org.apache.uima.jcas.tcas.Annotation
类名称:Annotation
方法名:getAddress
暂无
代码示例来源:origin: org.apache.ctakes/ctakes-assertion
p.format("=== \"%s\" BEGIN [%d] ===%n", label, targetAnnotation.getAddress());
String highlightIfMatching = currentAddress.equals(targetAnnotation.getAddress()) ? "###" : "";
p.format("ANNOTATION: address: %d %s%n", currentAddress, highlightIfMatching);
T currentAnnotation = mapByAddress.get(currentAddress);
p.format("=== \"%s\" END [%d] ===%n", label, targetAnnotation.getAddress());
代码示例来源:origin: apache/ctakes
p.format("=== \"%s\" BEGIN [%d] ===%n", label, targetAnnotation.getAddress());
String highlightIfMatching = currentAddress.equals(targetAnnotation.getAddress()) ? "###" : "";
p.format("ANNOTATION: address: %d %s%n", currentAddress, highlightIfMatching);
T currentAnnotation = mapByAddress.get(currentAddress);
p.format("=== \"%s\" END [%d] ===%n", label, targetAnnotation.getAddress());
代码示例来源:origin: org.apache.ctakes/ctakes-assertion
public void initialize()
{
AnnotationIndex<Annotation> annotationIndex = null;
if (targetType == null)
{
annotationIndex = jcas.getAnnotationIndex();
} else
{
annotationIndex = jcas.getAnnotationIndex(targetType);
}
mapByAddress = new HashMap<Integer, T>();
//logger.info(" before iterating over all annotations in index...");
for (Annotation annotation : annotationIndex)
{
//logger.info(" begin single annotation");
Integer address = annotation.getAddress();
//logger.info(String.format(" address: %d; type: %s", address, annotation.getClass().getName()));
T current = (T)annotation;
mapByAddress.put(address, current);
//logger.info(" end single annotation");
}
//logger.info(" after iterating over all annotations in index...");
}
代码示例来源:origin: apache/ctakes
public void initialize()
{
AnnotationIndex<Annotation> annotationIndex = null;
if (targetType == null)
{
annotationIndex = jcas.getAnnotationIndex();
} else
{
annotationIndex = jcas.getAnnotationIndex(targetType);
}
mapByAddress = new HashMap<Integer, T>();
//logger.info(" before iterating over all annotations in index...");
for (Annotation annotation : annotationIndex)
{
//logger.info(" begin single annotation");
Integer address = annotation.getAddress();
//logger.info(String.format(" address: %d; type: %s", address, annotation.getClass().getName()));
T current = (T)annotation;
mapByAddress.put(address, current);
//logger.info(" end single annotation");
}
//logger.info(" after iterating over all annotations in index...");
}
代码示例来源:origin: apache/ctakes
public Map<Integer, Annotation> generateAnnotationMap(JCas jcas,
Integer typeId)
{
Map<Integer, Annotation> annotationMap = new HashMap<Integer, Annotation>();
AnnotationIndex<Annotation> index = null;
if (typeId == null)
{
index = jcas.getAnnotationIndex();
} else
{
index = jcas.getAnnotationIndex(typeId);
}
FSIterator<Annotation> iterator = index.iterator();
while (iterator.hasNext())
{
Annotation current = iterator.next();
int address = current.getAddress();
annotationMap.put(address, current);
}
return annotationMap;
}
代码示例来源:origin: org.apache.ctakes/ctakes-assertion
public Map<Integer, Annotation> generateAnnotationMap(JCas jcas,
Integer typeId)
{
Map<Integer, Annotation> annotationMap = new HashMap<Integer, Annotation>();
AnnotationIndex<Annotation> index = null;
if (typeId == null)
{
index = jcas.getAnnotationIndex();
} else
{
index = jcas.getAnnotationIndex(typeId);
}
FSIterator<Annotation> iterator = index.iterator();
while (iterator.hasNext())
{
Annotation current = iterator.next();
int address = current.getAddress();
annotationMap.put(address, current);
}
return annotationMap;
}
代码示例来源:origin: ch.epfl.bbp.nlp/bluima_fusion
prunedKeepIndex.add(a.getAddress());
if (prunedKeepIndex.contains(a.getAddress())) {
Keep keep = new Keep(jCas, a.getBegin(), a.getEnd());
keep.setEnclosedAnnot(a);
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.stanfordnlp-gpl
if (curAnno.getAddress() == ((Annotation) refFS).getAddress()) {
aDestFS.setFeatureValue(destFeat, copyFs(curAnno));
foundexisting = true;
内容来源于网络,如有侵权,请联系作者删除!