WordElement tree1 = lexicon.getWord("tree");
System.out.println(realiser.realise(tree1)); // tree
tree1.setFeature(Feature.NUMBER, NumberAgreement.PLURAL);
System.out.println(realiser.realise(tree1)); // trees
WordElement tree2 = lexicon.getWord("tree");
System.out.println(realiser.realise(tree2)); // trees
The solution would be to make a copy of the word when retrieving from the
lexicon, rather than use the original. Note that this isn't picked up in the
unit tests because the lexicon is created fresh for each test, rather than
recycled.
Original issue reported on code.google.com by
o...@steamshift.neton 28 Feb 2012 at 6:17