} catch (IOException ex) {
Logger.getLogger(STFex.class.getName()).log(Level.SEVERE, null, ex);
}
}
STFex fexer = new STFex(stPriorMod);
POSTagger posT = (posConfig == null) ? null : POSTagger.posTaggerFactory(posConfig);
if(posT != null) { fexer.useMultiPOS(true); } else { fexer.useMultiPOS(false); }
for(List<Word> sentence : corp) {
Map<Integer, TaggedWord> sent = new HashMap<Integer, TaggedWord>(sentence.size());
int index = 0;
if(posT == null) {
for(Word w : sentence) { sent.put(index++, new TaggedWord(w)); }
} else {
List<TaggedWord> posTagging = posT.tagSentence(sentence);
for(TaggedWord tw : posTagging) { sent.put(index++, tw); }
}
List<Collection<Pair<String,Double>>> ftss = fexer.getSentenceFeatures(sent, true);
for(Collection<Pair<String,Double>> fts : ftss) {
index = 0;