/** * tag 'span' of 'doc' according to the Penn Tree Bank tag set. Words are assigned annotations of * type 'type' with feature cat = a Penn tag. */ public void annotate(Document doc, Span span, String type) { for (int i = 0; i < posTable.length; i++) tagTable[i] = new String[] {type, "cat", posTable[i], posTable[i]}; annotator = new HMMannotator(posh); annotator.setTagTable(tagTable); annotator.setBItag(false); annotator.setTrace(trace); annotator.annotateSpan(doc, span); }