@Override public ByteSearchSection process(Content content, ByteSearchSection section) { ByteSearchPosition end = endmarker.findPos(section); if (end.found() && end.start > section.innerstart) { return content.addSectionPos( outputsection, content.content, section.start, section.innerstart, end.start, end.end); } return null; }
@Override public ByteSearchSection process(Content content, ByteSearchSection section) { int tagclose = findQuoteSafeTagEnd(section); if (tagclose > -1) { ByteSearchPosition end = endmarker.findPos(section, tagclose); if (end.found()) { ByteSearchSection s = content.addSectionPos( outputsection, content.content, section.start, tagclose, end.start, end.end); return s; } } return null; }
@Override public void process(Content entity, ByteSearchSection pos, String attributename) { // log.fatal("process channel %s %d", channel.channel, channel.size()); ExtractChannel attribute = entity.get(attributename); for (int c = 0; c < attribute.size(); c++) { String chunk = attribute.get(c); String stem = translateStemmed.get(chunk); if (stem == null) { stem = stemmer.stem(chunk); translateStemmed.put(chunk, stem); // log.info("stem %s %s", chunk, stem); } attribute.set(c, stem); } }