private void setConfidenceIfInMaterialsAndMethods(int materialsAndMethodsBegin, int sectionAfterMAMBegin, Cooccurrence coOccurrence) { int coOccurrenceBegin = coOccurrence.getBegin(); if (coOccurrenceBegin > materialsAndMethodsBegin && coOccurrenceBegin < sectionAfterMAMBegin) { coOccurrence.setConfidence(-1); } }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Cooccurrence(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
br2.setBegin(br2.getBegin() + 4); Cooccurrence newC = new Cooccurrence(jCas, cooc .getKey().getBegin(), cooc.getKey().getEnd()); newC.setFirstEntity(br1); newC.setSecondEntity(br2); newC.addToIndexes();
Annotation[] allBrs = a.toArray(new Annotation[a.size()]); Annotation br1 = c.getFirstEntity(), br2 = c.getSecondEntity(); boolean matchedBr1 = false, matchedBr2 = false; boolean label = c.getHasInteraction(); int classz = label ? 2 : 0; String id = pmId + "_" + sentenceId++;
} else if (o instanceof Cooccurrence) { Cooccurrence c = (Cooccurrence) o; return "Cooccurrence[" + c.getFirstEntity().getCoveredText() + " <--> " + c.getSecondEntity().getCoveredText() + "](" + c.getConfidence() + ")"; } else if (o instanceof Measure) { Measure c = (Measure) o;
for (int i = 0; i < predictedLabels.size(); i++) { if (predictedLabels.get(i) == 0) {// 0=>no rel array[i].removeFromIndexes(); array[i].setConfidence(new Double(predictedProbs.get(i)) .floatValue()); array[i].setHasInteraction(true);
public FeatureStructure createFS(int addr, CASImpl cas) { if (Cooccurrence_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Cooccurrence_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Cooccurrence(addr, Cooccurrence_Type.this); Cooccurrence_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new Cooccurrence(addr, Cooccurrence_Type.this); } };
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public Cooccurrence(JCas jcas) { super(jcas); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Cooccurrence(int addr, TOP_Type type) { super(addr, type); readObject(); }
private void setConfidenceIfInResultSection(List<Integer> resultsBegins, List<Integer> sectionsAfterRes, Cooccurrence coOccurrence) { int coOccurrenceBegin = coOccurrence.getBegin(); for (int i = 0; i < resultsBegins.size(); ++i) { int resultsBegin = resultsBegins.get(i); int sectionAfterRes = sectionsAfterRes.get(i); if (coOccurrenceBegin > resultsBegin && coOccurrenceBegin < sectionAfterRes) { coOccurrence.setConfidence(1); } } }