TwoDimensionalCounter<String,String> unigramTagger =
new TwoDimensionalCounter<String,String>();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(treeFile), "UTF-8"));
TreeReaderFactory trf = new SpanishTreeReaderFactory();
TreeReader tr = trf.newTreeReader(br);
for(Tree t; (t = tr.readTree()) != null;) {
updateTagger(unigramTagger, t);
}
tr.close(); //Closes the underlying reader