当前位置: 首页>>代码示例>>Java>>正文


Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性代码示例

本文整理汇总了Java中gate.util.AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的具体用法?Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE怎么用?Java AnnotationDiffer.PARTIALLY_CORRECT_TYPE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在gate.util.AnnotationDiffer的用法示例。


在下文中一共展示了AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBackgroundAt

/**
 * Gets the background color of a cell
 * 
 * @param row
 * @param column
 * @return
 */
public Color getBackgroundAt(int row, int column) {
  AnnotationDiffer.Pairing pairing = pairings.get(row);
  switch(pairing.getType()) {
    case (AnnotationDiffer.CORRECT_TYPE):
      return BG;
    case (AnnotationDiffer.PARTIALLY_CORRECT_TYPE):
      return PARTIALLY_CORRECT_BG;
    case (AnnotationDiffer.MISMATCH_TYPE):
      if(column < COL_MATCH)
        return MISSING_BG;
      else if(column > COL_MATCH)
        return FALSE_POSITIVE_BG;
      else return BG;
    case (AnnotationDiffer.MISSING_TYPE):
      return MISSING_BG;
    case (AnnotationDiffer.SPURIOUS_TYPE):
      return FALSE_POSITIVE_BG;
    default:
      return BG;
  }
}
 
开发者ID:SemanticSoftwareLab,项目名称:TextMining-Rhetector,代码行数:28,代码来源:AnnotationDiffExporter.java

示例2: getBackgroundAt

public Color getBackgroundAt(int row, int column){
      AnnotationDiffer.Pairing pairing = pairings.get(row);
      switch(pairing.getType()){
        case(AnnotationDiffer.CORRECT_TYPE): return diffTable.getBackground();
        case(AnnotationDiffer.PARTIALLY_CORRECT_TYPE): return PARTIALLY_CORRECT_BG;
        case(AnnotationDiffer.MISMATCH_TYPE):
          if(column < COL_MATCH) return MISSING_BG;
          else if(column > COL_MATCH) return FALSE_POSITIVE_BG;
          else return diffTable.getBackground();
        case(AnnotationDiffer.MISSING_TYPE): return MISSING_BG;
        case(AnnotationDiffer.SPURIOUS_TYPE): return FALSE_POSITIVE_BG;
        default: return diffTable.getBackground();
      }
//      
//      Color colKey = pairing.getType() == 
//          AnnotationDiffer.CORRECT_TYPE ?
//          diffTable.getBackground() :
//          (pairing.getType() == AnnotationDiffer.PARTIALLY_CORRECT_TYPE ?
//           PARTIALLY_CORRECT_BG : MISSING_BG);
//      if(pairing.getKey() == null) colKey = diffTable.getBackground();
//      
//      Color colRes = pairing.getType() == AnnotationDiffer.CORRECT_TYPE ?
//                     diffTable.getBackground() :
//                       (pairing.getType() == AnnotationDiffer.PARTIALLY_CORRECT_TYPE ?
//                       PARTIALLY_CORRECT_BG :
//                         FALSE_POSITIVE_BG);
//      if(pairing.getResponse() == null) colRes = diffTable.getBackground();
//      switch(column){
//        case COL_KEY_START: return colKey;
//        case COL_KEY_END: return colKey;
//        case COL_KEY_STRING: return colKey;
//        case COL_KEY_FEATURES: return colKey;
//        case COL_MATCH: return diffTable.getBackground();
//        case COL_RES_START: return colRes;
//        case COL_RES_END: return colRes;
//        case COL_RES_STRING: return colRes;
//        case COL_RES_FEATURES: return colRes;
//        default: return diffTable.getBackground();
//      }
    }
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:40,代码来源:AnnotationDiffGUI.java

示例3: DiffTable

/**
 * Constructor
 * 
 * @param pairings results of annotation diff
 */
public DiffTable(List<AnnotationDiffer.Pairing> pairings) {
  matchLabel = new String[5];
  matchLabel[AnnotationDiffer.CORRECT_TYPE] = "=";
  matchLabel[AnnotationDiffer.PARTIALLY_CORRECT_TYPE] = "~";
  matchLabel[AnnotationDiffer.MISSING_TYPE] = "-?";
  matchLabel[AnnotationDiffer.SPURIOUS_TYPE] = "?-";
  matchLabel[AnnotationDiffer.MISMATCH_TYPE] = "<>";

  this.pairings = pairings;
}
 
开发者ID:SemanticSoftwareLab,项目名称:TextMining-Rhetector,代码行数:15,代码来源:AnnotationDiffExporter.java


注:本文中的gate.util.AnnotationDiffer.PARTIALLY_CORRECT_TYPE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。