/** @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 NP(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public NP(JCas jcas) { super(jcas); readObject(); }
@Override public List<Feature> extract(JCas jCas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2) throws AnalysisEngineProcessException { List<Feature> features = new ArrayList<Feature>(); // entity1 ... entity2 scenario if(arg1.getEnd() < arg2.getBegin()) { for(NP np : JCasUtil.selectCovering(jCas, NP.class, arg1.getBegin(), arg2.getEnd())) { if(arg1.getBegin() == np.getBegin() && arg2.getEnd() == np.getEnd()) { features.add(new Feature("arg1arg2insideNP", true)); } } } // entity2 ... entity1 scenario if(arg2.getEnd() < arg1.getBegin()) { for(NP np : JCasUtil.selectCovering(jCas, NP.class, arg2.getBegin(), arg1.getEnd())) { if(arg2.getBegin() == np.getBegin() && arg1.getEnd() == np.getEnd()) { features.add(new Feature("arg2arg1insideNP", true)); } } } return features; } }
chunk = new LST(jCas, start, end); } else if(chunkType.equals("NP")) { chunk = new NP(jCas, start, end); } else if(chunkType.equals("PP")) { chunk = new PP(jCas, start, end);
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public NP(int addr, TOP_Type type) { super(addr, type); readObject(); }
@Override public List<Feature> extract(JCas jCas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2) throws AnalysisEngineProcessException { List<Feature> features = new ArrayList<Feature>(); // entity1 ... entity2 scenario if(arg1.getEnd() < arg2.getBegin()) { for(NP np : JCasUtil.selectCovering(jCas, NP.class, arg1.getBegin(), arg2.getEnd())) { if(arg1.getBegin() == np.getBegin() && arg2.getEnd() == np.getEnd()) { features.add(new Feature("arg1arg2insideNP", true)); } } } // entity2 ... entity1 scenario if(arg2.getEnd() < arg1.getBegin()) { for(NP np : JCasUtil.selectCovering(jCas, NP.class, arg2.getBegin(), arg1.getEnd())) { if(arg2.getBegin() == np.getBegin() && arg1.getEnd() == np.getEnd()) { features.add(new Feature("arg2arg1insideNP", true)); } } } return features; } }
chunk = new LST(jCas, start, end); } else if(chunkType.equals("NP")) { chunk = new NP(jCas, start, end); } else if(chunkType.equals("PP")) { chunk = new PP(jCas, start, end);
/** @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 NP(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public NP(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** @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 NP(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public NP(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** @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 NP(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public NP(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public NP(JCas jcas) { super(jcas); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public NP(JCas jcas) { super(jcas); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public NP(JCas jcas) { super(jcas); readObject(); }