Long end = null; for (String lpName : document.getLinguisticProcessors().keySet()) { List<LinguisticProcessor> linguisticProcessors = document.getLinguisticProcessors().get(lpName); for (LinguisticProcessor linguisticProcessor : linguisticProcessors) { Date startDate = null, endDate = null;
/** * Returns a new document containing all annotations related to the given WFs */ /* Couldn't index opinion by terms. Terms are added after the Opinion object is created, and there's no way to access the annotationContainer from the Opinion.*/ public KAFDocument split(List<WF> wfs) { List<Term> terms = this.annotationContainer.getTermsByWFs(wfs); List<Dep> deps = this.annotationContainer.getDepsByTerms(terms); List<Chunk> chunks = this.annotationContainer.getChunksByTerms(terms); List<Entity> entities = this.annotationContainer.getEntitiesByTerms(terms); List<Coref> corefs = this.annotationContainer.getCorefsByTerms(terms); List<Timex3> timeExs = this.annotationContainer.getTimeExsByWFs(wfs); List<Feature> properties = this.annotationContainer.getPropertiesByTerms(terms); List<Feature> categories = this.annotationContainer.getCategoriesByTerms(terms); // List<Opinion> opinions = this.annotationContainer.getOpinionsByTerms(terms); List<Predicate> predicates = this.annotationContainer.getPredicatesByTerms(terms); List<Relational> relationals = new ArrayList<Relational>(); relationals.addAll(properties); relationals.addAll(categories); relationals.addAll(entities); List<Relation> relations = this.annotationContainer.getRelationsByRelationals(relationals); KAFDocument newKaf = new KAFDocument(this.getLang(), this.getVersion()); newKaf.addLinguisticProcessors(this.getLinguisticProcessors()); this.copyAnnotationsToKAF(newKaf, wfs, terms, deps, chunks, entities, corefs, timeExs, properties, categories, new ArrayList<Opinion>(), relations, predicates); return newKaf; }
.getLinguisticProcessors().entrySet()) { emitMeta(nafURI, KS.LAYER, FACTORY.createURI(KS.NAMESPACE, "layer_" + entry.getKey()));
HashMap<String, Relational> copiedRelationals = new HashMap<String, Relational>(); Map<String, List<LinguisticProcessor>> lps = doc.getLinguisticProcessors(); for (Map.Entry<String, List<LinguisticProcessor>> entry : lps.entrySet()) { String layer = entry.getKey();
.getLinguisticProcessors().entrySet()) { this.model.add(nafURI, KS.LAYER, this.vf.createURI(KS.NAMESPACE, "layer_" + entry.getKey()));
Map<String, List<LinguisticProcessor>> lps = kaf.getLinguisticProcessors(); for (Map.Entry entry : lps.entrySet()) { Element lpsElem = new Element("linguisticProcessors");
Map<String, List<KAFDocument.LinguisticProcessor>> lps = kaf.getLinguisticProcessors(); for (Map.Entry entry : lps.entrySet()) { Element lpsElem = new Element("linguisticProcessors");