Menu
  • HOME
  • TAGS

How to deserialize a CoNLL format dependency tree with ClearNLP?

java,nlp,deserialization,parse-tree,clearnlp

Found the answer, so sharing the wisdom on SO :-) ... The deserialization can be done using the TSVReader in the edu.emory.clir.clearnlp.reader package. public void readCoNLL(String inputFile) throws Exception { TSVReader reader = new TSVReader(0, 1, 2, 4, 5, 6, 7); reader.open(new FileInputStream(inputFile)); DEPTree tree; while ((tree = reader.next()) !=...