conllu
CoNLL-U Parser parses a CoNLL-U formatted string into a nested python dictionary
What it is and what it does
conllu is a lightweight parser that converts CoNLL-U formatted text—a standard annotation format used in natural language processing and linguistic research—into Python data structures. CoNLL-U is the output format of many NLP pipelines and dependency parsers, encoding tokens with their linguistic properties (part-of-speech tags, lemmas, morphological features, syntactic dependencies). The parser converts this text into nested dictionaries and TokenList objects that you can query, filter, and manipulate programmatically.
The package has zero runtime dependencies and is designed for simplicity: it's about 300 lines of code with full type hints for IDE autocompletion. It supports both one-shot parsing of entire files and incremental parsing via generators for memory efficiency on large datasets. You can filter tokens by field values (including nested features), modify parsed structures, and serialize them back to CoNLL-U format.
Use it for:
- Parse output from dependency parsers (like spaCy or UDPipe) to extract and analyze syntactic relationships in text.
- Filter linguistic annotations by part-of-speech, morphological features, or dependency relations for corpus analysis.
- Modify or augment CoNLL-U annotations programmatically and write the results back to file.
- Process large annotated corpora incrementally without loading entire files into memory.
- Build NLP pipelines that consume Universal Dependencies formatted data as intermediate representations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses CoNLL-U formatted text (a standard NLP annotation format) into nested Python dictionaries with full type support, enabling programmatic access to linguistic dependency structures.
Yes. Zero dependencies, active maintenance, no known vulnerabilities, and MIT licensing make it a safe, lightweight choice. Install it if you work with CoNLL-U data from NLP tools or linguistic corpora. The only gotcha is the Python 3.8+ requirement; if you're on an older version, pin to conllu==4.5.3 or earlier.
Install
conllu on PyPI
pip
pip install conlluuv
uv add conllupoetry
poetry add conlluInstalling conllu
Before you install
Low friction: no runtime dependencies, pure Python wheel, actively maintained with last commit 2026-08-05. Requires Python 3.8 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution with attribution; no restrictions on commercial or proprietary use.
Quickstart
from conllu import parse
data = """# text = Example
1\tThe\tthe\tDET\tDT\t_\t2\tdet\t_\t_
2\tdog\tdog\tNOUN\tNN\t_\t0\troot\t_\t_
"""
sentences = parse(data)
print(sentences[0][0]['form']) # 'The'
Requires Python 3.8 or later; CoNLL-U input must follow the Universal Dependencies format specification.
Verify before relying
- Whether the package handles malformed or incomplete CoNLL-U input gracefully or raises exceptions.
- Performance characteristics for very large files beyond the mentioned 'over a megabyte' threshold.
- Whether full type support includes runtime type checking or only static type hints for editors.
Package facts
| License | The MIT License (MIT) Copyright (c) 2016 Emil Stenström Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 670 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 405,897/month — #6,898 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: conllu-6.0.0-py3-none-any.whl
Keywords: conllu, conll, conll-u, parser, nlp
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
ginzaGiNZA is a Japanese NLP library that performs…
permissive · top 15,000 on PyPI
spanishconjugatorConjugates Spanish verbs by tense, mood, and…
permissive · top 15,000 on PyPI
polyglotPolyglot is a multilingual natural language…
copyleft · top 15,000 on PyPI
udapiUdapi is a Python framework for reading,…
copyleft · top 15,000 on PyPI
udtoolsValidates CoNLL-U format files against…
copyleft · top 15,000 on PyPI
wordninjaSplits concatenated words into their…
unclear · top 5,000 on PyPI
tokenizerTokenizes Icelandic text into words,…
permissive · top 15,000 on PyPI
gruutGruut tokenizes, cleans, and converts text to…
permissive · top 15,000 on PyPI
segtokSplits Indo-European text into sentences and…
permissive · top 15,000 on PyPI
hassilParses natural language sentences into…
permissive · top 15,000 on PyPI