From: <hu...@ti...> - 2005-01-20 23:05:28
|
Hello I try to change the contend of a document so I use this RHS : Rule: symbol (...):mylabel --> { gate.AnnotationSet symbolSet = (gate.AnnotationSet)bindings.get("mylabel"); gate.Annotation symbolAnno = (gate.Annotation)symbolSet.iterator().next(); Long beginIndex = new Long (symbolAnno.getStartNode().getOffset().longValue() -9); Long endIndex = new Long( symbolAnno.getEndNode().getOffset().longValue() + 10); try { doc.edit(beginIndex, endIndex, new gate.corpora.DocumentContentImpl("new text")); } catch (InvalidOffsetException ex1) {} } When this transducer is applyed, the phase symbol never end. What's the problem? Thanks. Christophe Huault Strasbourg |