Crates.io | rs-conllu |
lib.rs | rs-conllu |
version | 0.2.0 |
source | src |
created_at | 2023-04-22 07:52:19.808149 |
updated_at | 2024-07-29 19:01:55.095674 |
description | A parser for the CoNLL-U format of the Universal Dependencies project. |
homepage | |
repository | |
max_upload_size | |
id | 845862 |
size | 38,342 |
This project aims to provide a parser for the CoNLL-U format of the Universal Dependencies project: https://universaldependencies.org/format.html.
Parse a file in CoNLL-U format and iterate over the containing sentences.
let file = File::open("example.conllu").unwrap();
let doc = parse_file(file);
for sentence in doc {
for token in sentence.unwrap() {
println!("{}", token.form);
}
}
Parsing happens in a "flat" manner, relations between tokens are not respected.