Skip to content

ABCTreebank/abctk.utils.comparative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABC Treebank utilities for comparative annotations

Usage

Manipulate annotation files

abctk.utils.comparative annot [COMMANDS...]

Load a file / dump loaded annotations to a file

abctk.utils.comparative annot \
    load -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-] \
    write -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-]

Obfuscate texts

abctk.utils.comparative annot \
    load -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-] \
    encrypt
    write -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-]

Decrypt texts

First, make a cache from the relevant corpus/corpora.

abctk.utils.comparative BCCWJ cache [FOLDER] cache.pickle

Then load this cache file and decrypt:

abctk.utils.comparative annot \
    load -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-] \
    incorp-text BCCWJ cache.pickle \
    decrypt
    write -e {yaml,jsonl,txt} -s {separate,bracketed} [FILEPATH|-]

How to build a standalone executable

poetry run pyinstaller \
    --name abctk.utils.comparative_linux_x86-64 \
    --onefile \
    --copy-metadata abctk.utils.comparative \
    abctk/utils/comparative/__main__.py