for(int i=0;i<nodes.size();i++) {
XOMTools.removeElementPreservingText((Element)nodes.get(i));
}
Document safDoc = InlineToSAF.extractSAFs(doc, sourceDoc, "foo");
ProcessingDocument procDoc = ProcessingDocumentFactory.getInstance().makeTokenisedDocument(sourceDoc, false, false, false);
//NameRecogniser nr = new NameRecogniser();
//nr.halfProcess(sourceDoc);
//nr.makeTokenisers(false);
Set<String> tokenSet = new HashSet<String>();
Bag<String> tokenBag = new Bag<String>();
for(TokenSequence t : procDoc.getTokenSequences()) {
//System.out.println(t.getSourceString());
for(Token token : t.getTokens()) {
//tokenSet.add("stem=" + stemmer.getStem(token.getValue().toLowerCase()));
//tokenSet.add(token.getValue().toLowerCase());
tokenBag.add(token.getValue().toLowerCase());