fireStatusChanged("IndirectLanguageAnalyserPR processing: "
+ getDocument().getName());
if (!(document instanceof DocumentImpl)) {
throw new GateRuntimeException("Can only handle DocumentImpl not " +
document.getClass());
}
String newText = annotatedDocumentTransformer.getStringForDocument(
getDocument(), inputAnnotationSetName);
FeatureMap theparms = Factory.newFeatureMap();
theparms.put("encoding", ((DocumentImpl) document).getEncoding());
theparms.put("stringContent", newText);
FeatureMap thefeats = Factory.newFeatureMap();
FeatureMap docfeats = document.getFeatures();
thefeats.putAll(docfeats);
String theName = document.getName();
// create a copy of the current document
Document newDoc;
try {
newDoc = (Document) Factory.createResource(
"gate.corpora.DocumentImpl",
theparms,
thefeats,
theName+"_virtual");
} catch (ResourceInstantiationException ex) {
throw new GateRuntimeException(ex);
}
doExecute(newDoc);
List<String> effectiveMapFromAnnsetNames = new ArrayList<String>();