/** * * Returns the splits from each leave from the split tree, excluding the linking morphemes * * @param splitLevel * the split level. * * @return An array with the splits from each leave from the split tree. */ public Split[] getSplitsWithoutMorpheme(CompoundSplitLevel splitLevel) { List<Split> splits = getSplits(createSplitsFromFSArray(getSplits()), false, splitLevel); return splits.toArray(new Split[splits.size()]); }
/** * @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 Compound(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
@Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } }
@Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { for (Token token : select(aJCas, Token.class)) { final String coveredText = token.getText(); DecompoundedWord result; result = ranker.highestRank(splitter.split(coveredText)); if (!result.isCompound()) { continue; } final int beginIndex = token.getBegin(); final Compound compound = new Compound(aJCas, beginIndex, token.getEnd()); indexSplits(aJCas, result.getSplits(), beginIndex, token.getEnd(), null, compound); compound.addToIndexes(); } }
@Override public FeatureStructure createFS(int addr, CASImpl cas) { if (Compound_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Compound_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Compound(addr, Compound_Type.this); Compound_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else { return new Compound(addr, Compound_Type.this); } } };
/** * @generated * @param jcas * JCas to which this Feature Structure belongs */ public Compound(JCas jcas) { super(jcas); readObject(); }
@Override public FeatureStructure createFS(int addr, CASImpl cas) { if (Compound_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Compound_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Compound(addr, Compound_Type.this); Compound_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else { return new Compound(addr, Compound_Type.this); } } };
/** * @generated * @param jcas * JCas to which this Feature Structure belongs */ public Compound(JCas jcas) { super(jcas); readObject(); }
/** * * Returns the splits from each leave from the split tree, excluding the linking morphemes * * @param splitLevel * the split level. * * @return An array with the splits from each leave from the split tree. */ public Split[] getSplitsWithoutMorpheme(CompoundSplitLevel splitLevel) { List<Split> splits = getSplits(createSplitsFromFSArray(getSplits()), false, splitLevel); return splits.toArray(new Split[splits.size()]); }
/** * @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 Compound(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 Compound(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** * * Returns the splits from each leave from the split tree, including the linking morphemes * * @param splitLevel * the split level. * * @return An array with the splits from each leave from the split tree. * */ public Split[] getSplitsWithMorpheme(CompoundSplitLevel splitLevel) { final List<Split> splits = getSplits(createSplitsFromFSArray(getSplits()), true, splitLevel); return splits.toArray(new Split[splits.size()]); }
/** * Internal - constructor used by generator * * @generated * @param addr * low level Feature Structure reference * @param type * the type of this Feature Structure */ public Compound(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** * * Returns the splits from each leave from the split tree, including the linking morphemes * * @param splitLevel * the split level. * * @return An array with the splits from each leave from the split tree. * */ public Split[] getSplitsWithMorpheme(CompoundSplitLevel splitLevel) { final List<Split> splits = getSplits(createSplitsFromFSArray(getSplits()), true, splitLevel); return splits.toArray(new Split[splits.size()]); }
splitList.addAll(getSplits(createSplitsFromFSArray(split.getSplits()), includeMorpheme, splitLevel)); splitList.addAll(getSplits(createSplitsFromFSArray(split.getSplits()), includeMorpheme, splitLevel));
splitList.addAll(getSplits(createSplitsFromFSArray(split.getSplits()), includeMorpheme, splitLevel)); splitList.addAll(getSplits(createSplitsFromFSArray(split.getSplits()), includeMorpheme, splitLevel));