this mode provides simple utilities for editing and viewing CoNLL-U files.
you can watch the following demo for an idea of what it can do:
| key binding | description |
|---|---|
C-c C-a | align columns (inserts no real whitespace) in the selected region (defaults to the current sentence) |
C-c C-u | unalign columns in the selected region (defaults to current sentence) |
M-n | unalign current sentence, go to the next one, and align it |
M-p | unalign current sentence, go to the previous one, and align it |
C-N | move to field number N in a token line (C-c 0 moves to field number 10, i.e. MISC) |
C-c C-h | move point to head token of present token |
- highlighting comments, and
upostaganddeprelfields - truncate lines by default
- show newline and tab characters using
whitespace.el - aligning and unaligning column fields
- jumping to next or previous sentence
- in a token line, jump to its
head
if you’d like to have a feature implemented, you should file at ticket at the issue tracker. here is our wishlist of what we would like to implement in the future:
- hiding columns
- call a parser to create CoNLL-U output from a sentence
- call external visualization tool
- validating CoNLL-U file
- …
in your .emacs:
(autoload 'conllu-mode "conllu-mode" "Major mode for editing CoNLL-U files." t)
(add-to-list 'auto-mode-alist '("\\.conllu\\'" . conllu-mode))you may install the latest versions from MELPA, or proceed to a manual installation:
set MELPA up if you haven’t already and then do:
M-x package-install RET conllu-mode
first you must install the dependencies: assuming you have a standard Emacs distribution, the only package needed which is probably not installed yet is parsec.
after having installed parsec, clone the repo, as in:
$ cd ~/some/path/
$ git clone https://github.com/odanoburu/conllu-modemake sure the repository in is emacs load path with
(add-to-list 'load-path "~/some/path/conllu-mode")
in your .emacs.
contributions are welcome! even comments from experienced elispers are welcome. just send an email or open an issue – if you’d like a suggestion on what to work on, take a look at the open issues or at the missing features (above).
