/** * @param aCas the <code>JCas</code> object * * @return if the T-H pair contains the gold answer, return it; otherwise return null */ private String getGoldLabel(JCas aCas) { FSIterator<TOP> pairIter = aCas.getJFSIndexRepository() .getAllIndexedFS(Pair.type); Pair p = (Pair) pairIter.next(); if (null == p.getGoldAnswer() || p.getGoldAnswer().equals("") || p.getGoldAnswer().equals("ABSTAIN")) { return null; } else { return p.getGoldAnswer(); } }
/** * @param aCas * input T-H pair * @return if the pair contains the gold answer, return it; otherwise, * return null */ protected String getGoldLabel(JCas aCas) { FSIterator<TOP> pairIter = aCas.getJFSIndexRepository() .getAllIndexedFS(Pair.type); Pair p = (Pair) pairIter.next(); if (null == p.getGoldAnswer() || p.getGoldAnswer().equals("") || p.getGoldAnswer().equals("ABSTAIN")) { return null; } else { return p.getGoldAnswer(); } }
/** * @param aCas * the <code>JCas</code> object * @return if the T-H pair contains the gold answer, return it; otherwise, * return null */ protected final String getGoldLabel(JCas aCas) { FSIterator<TOP> pairIter = aCas.getJFSIndexRepository() .getAllIndexedFS(Pair.type); Pair p = (Pair) pairIter.next(); if (null == p.getGoldAnswer() || p.getGoldAnswer().equals("") || p.getGoldAnswer().equals("ABSTAIN")) { return null; } else { return p.getGoldAnswer(); } }
/** * @param aCas * the <code>JCas</code> object * @return if the T-H pair contains the gold answer, return it; otherwise, * return null */ public static String getGoldLabel(JCas aCas) { FSIterator<TOP> pairIter = aCas.getJFSIndexRepository() .getAllIndexedFS(Pair.type); Pair p = (Pair) pairIter.next(); if (null == p.getGoldAnswer() || p.getGoldAnswer().equals("") || p.getGoldAnswer().equals("ABSTAIN")) { return null; } else { return p.getGoldAnswer(); } }
/** * @param aCas * the <code>JCas</code> object * @return if the T-H pair contains the gold answer, return it; otherwise, * return null */ protected final String getGoldLabel(JCas aCas) { FSIterator<TOP> pairIter = aCas.getJFSIndexRepository() .getAllIndexedFS(Pair.type); Pair p = (Pair) pairIter.next(); if (null == p.getGoldAnswer() || p.getGoldAnswer().equals("") || p.getGoldAnswer().equals("ABSTAIN")) { return null; } else { return p.getGoldAnswer(); } }
/** * Puts the entailment annotations calculating of each of the pair T and H * of the specified list of Cas into the entailmentValueList list. * Each of the Cas of the list contains a single pair T-H. * * @param jcas the list of CAS * @aram entailmentValueList the list of the entailment annotations * * @throws Exception */ protected void getEntailmentAnnotation(JCas jcas, List<String> entailmentValueList) throws Exception { try { Pair p = null; FSIterator<TOP> pairIter = jcas.getJFSIndexRepository().getAllIndexedFS(Pair.type); p = (Pair) pairIter.next(); String goldAnswer = p.getGoldAnswer(); entailmentValueList.add(goldAnswer); } catch(Exception e) { throw e; } }
String goldAnswer = pair.getGoldAnswer();
String goldAnswer = pair.getGoldAnswer(); //get gold annotation
int pairID = Integer.parseInt(pair.getPairID()); String goldAnswer = pair.getGoldAnswer(); //get gold annotation logger.debug("gold answer: "+goldAnswer);
int pairID = Integer.parseInt(pair.getPairID()); logger.debug("processing pair "+pairID); String goldAnswer = pair.getGoldAnswer(); //get gold annotation logger.debug("gold answer: "+goldAnswer);
String goldAnswer = pair.getGoldAnswer(); //get gold annotation
labelString = p.getGoldAnswer();
labelString = p.getGoldAnswer();
labelString = p.getGoldAnswer();
aOut.printf("GoldAnswer: %s\n", p.getGoldAnswer());
DecisionLabel goldAnswer = null; try { goldAnswer = DecisionLabel.getLabelFor(pair.getGoldAnswer()); } catch (EDAException e) { e.printStackTrace();
String goldString = pairAnno.getGoldAnswer(); if (goldString != null) { DecisionLabel goldDecision = DecisionLabel.getLabelFor(goldString);