udgraph-projectivize 0.8.0

Projectivization/deprojectivization for universal dependency graphs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::fs::File;
use std::io::BufReader;

use conllu::io::{ReadSentence, Reader};
use udgraph::graph::Sentence;

pub fn read_sentences(filename: &str) -> Vec<Sentence> {
    Reader::new(BufReader::new(File::open(filename).unwrap()))
        .sentences()
        .map(|s| s.unwrap())
        .collect()
}