org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation.getTypeID()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(54)

本文整理了Java中org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation.getTypeID()方法的一些代码示例,展示了IdentifiedAnnotation.getTypeID()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IdentifiedAnnotation.getTypeID()方法的具体详情如下:
包路径:org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation
类名称:IdentifiedAnnotation
方法名:getTypeID

IdentifiedAnnotation.getTypeID介绍

[英]getter for typeID - gets The type of named entity (e.g. drug, disorder, ...)
[中]typeID的getter-获取命名实体的类型(例如药物、疾病等)

代码示例

代码示例来源:origin: org.apache.ctakes/ctakes-relation-extractor

@Override
 public List<Feature> extract(JCas jCas, Annotation ann) throws CleartkExtractorException {
  IdentifiedAnnotation idAnn = (IdentifiedAnnotation)ann;
  return Arrays.asList(new Feature("TypeID", String.valueOf(idAnn.getTypeID())));
 }
};

代码示例来源:origin: org.apache.ctakes/ctakes-core

public static List getAnnotationsInSpan(JCas jcas, int type, int beginSpan, int endSpan, int[] validNeTypes)
{
  List<IdentifiedAnnotation> list = new ArrayList<IdentifiedAnnotation>();
  Iterator<?> itr = getAnnotationsIteratorInSpan(jcas, type, beginSpan, endSpan);
  while(itr.hasNext())
  {
    IdentifiedAnnotation ne = (IdentifiedAnnotation)itr.next(); // might be an EventMention or an EntityMention
    if(isValidNE(ne.getTypeID(), validNeTypes))
      list.add(ne);
  }
  return list;
}

代码示例来源:origin: apache/ctakes

public static List getAnnotationsInSpan(JCas jcas, int type, int beginSpan, int endSpan, int[] validNeTypes)
{
  List<IdentifiedAnnotation> list = new ArrayList<IdentifiedAnnotation>();
  Iterator<?> itr = getAnnotationsIteratorInSpan(jcas, type, beginSpan, endSpan);
  while(itr.hasNext())
  {
    IdentifiedAnnotation ne = (IdentifiedAnnotation)itr.next(); // might be an EventMention or an EntityMention
    if(isValidNE(ne.getTypeID(), validNeTypes))
      list.add(ne);
  }
  return list;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public String calcmWnClass () {
  if (m.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne = (IdentifiedAnnotation) m.getContent();
    return String.valueOf(ne.getTypeID());
  } else
    return "0";
}

代码示例来源:origin: apache/ctakes

public String calcmWnClass () {
  if (m.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne = (IdentifiedAnnotation) m.getContent();
    return String.valueOf(ne.getTypeID());
  } else
    return "0";
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcWnClass () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      m2.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne1 = (IdentifiedAnnotation) m1.getContent();
    IdentifiedAnnotation ne2 = (IdentifiedAnnotation) m2.getContent();
    if (ne1.getTypeID() == ne2.getTypeID()){
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcIsAnatomicalSite () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m1.getContent()).getTypeID() == CONST.NE_TYPE_ID_ANATOMICAL_SITE){
    return true;
  }
  return false;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public String calcmIsProcedure () {
  if (m.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m.getContent()).getTypeID() == CONST.NE_TYPE_ID_PROCEDURE)
    return "Y";
  else
    return "N";
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcWnClassI () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      m2.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne1 = (IdentifiedAnnotation) m1.getContent();
    IdentifiedAnnotation ne2 = (IdentifiedAnnotation) m2.getContent();
    if (ne1.getTypeID() != ne2.getTypeID()){
      return true;
    }
    return false;
  }
  return false;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcWnClassC () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      m2.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne1 = (IdentifiedAnnotation) m1.getContent();
    IdentifiedAnnotation ne2 = (IdentifiedAnnotation) m2.getContent();
    if (ne1.getTypeID() == ne2.getTypeID()){
      return true;
    }
    return false;
  }
  return false;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public String calcmIsDisorder () {
  if (m.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m.getContent()).getTypeID() == CONST.NE_TYPE_ID_DISORDER)
    return "Y";
  else
    return "N";
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcIsFinding () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m1.getContent()).getTypeID() == CONST.NE_TYPE_ID_FINDING){
    return true;
  }
  return false;
}

代码示例来源:origin: org.apache.ctakes/ctakes-coreference

public boolean calcIsProcedure () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m1.getContent()).getTypeID() == CONST.NE_TYPE_ID_PROCEDURE){
    return true;
  }
  return false;
}

代码示例来源:origin: apache/ctakes

public boolean calcWnClassI () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      m2.getContent() instanceof IdentifiedAnnotation) {
    IdentifiedAnnotation ne1 = (IdentifiedAnnotation) m1.getContent();
    IdentifiedAnnotation ne2 = (IdentifiedAnnotation) m2.getContent();
    if (ne1.getTypeID() != ne2.getTypeID()){
      return true;
    }
    return false;
  }
  return false;
}

代码示例来源:origin: apache/ctakes

public boolean calcIsDrug () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m1.getContent()).getTypeID() == CONST.NE_TYPE_ID_DRUG){
    return true;
  }
  return false;
}

代码示例来源:origin: apache/ctakes

public boolean calcIsProcedure () {
  if (m1.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m1.getContent()).getTypeID() == CONST.NE_TYPE_ID_PROCEDURE){
    return true;
  }
  return false;
}

代码示例来源:origin: apache/ctakes

public String calcmIsDisorder () {
  if (m.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m.getContent()).getTypeID() == CONST.NE_TYPE_ID_DISORDER)
    return "Y";
  else
    return "N";
}

代码示例来源:origin: apache/ctakes

public String calcmIsProcedure () {
  if (m.getContent() instanceof IdentifiedAnnotation &&
      ((IdentifiedAnnotation)m.getContent()).getTypeID() == CONST.NE_TYPE_ID_PROCEDURE)
    return "Y";
  else
    return "N";
}

代码示例来源:origin: org.apache.ctakes/ctakes-assertion

public static SimpleTree getUncertaintyTree(JCas jcas, IdentifiedAnnotation mention, SemanticClasses sems) {
 SimpleTree tree = null;
 tree = extractAboveLeftConceptTree(jcas, mention, sems);
 String treeStr = tree.toString();
 treeStr = treeStr.replace("CONCEPT", "CONCEPT" + mention.getTypeID());
 return SimpleTree.fromString(treeStr);
}

代码示例来源:origin: apache/ctakes

public static SimpleTree getUncertaintyTree(JCas jcas, IdentifiedAnnotation mention, SemanticClasses sems) {
 SimpleTree tree = null;
 tree = extractAboveLeftConceptTree(jcas, mention, sems);
 String treeStr = tree.toString();
 treeStr = treeStr.replace("CONCEPT", "CONCEPT" + mention.getTypeID());
 return SimpleTree.fromString(treeStr);
}

相关文章

微信公众号

最新文章

更多