ajmc
is work-in-progress python package containing the tools developped for
the AjaxMultiCommentary project.
The project starts from images of classical commentaries and deals with OCR, OLR, and further NLP tasks such as NER and reference resolution.
These steps are covered by the ajmc
's sub-packages:
ajmc.commons
contains shared tools and variables.ajmc.corpora
contains tools to deal with the project's corpora.ajmc.nlp
contains helpers for named entity recognition with HuggingFace transformers.ajmc.ocr
contains helpers and functions to run tesseract and perform coordinate-based evaluation of OCR outputs.ajmc.olr
contains helpers and function to perform layout analysis with YOLOv5 and LayoutLM, as well preparing layout annotation with VIA2.ajmc.text_processing
offers a general framework to deal with ocr-output and store them as canonical jsons.
For a more detailed description of the codebase's architecture and innerworkings, please refer to
the documentation. Introductory notebooks provided in the docs can also
be found in docs/other_pages
Please install ajmc
using git clone https://github.com/AjaxMultiCommentary/ajmc
. setup.py
lists all the required dependencies. For collaborative development, please use a dedicated virtual environment (for instance with conda).
python -m pip install git+'https://github.com/AjaxMultiCommentary/ajmc'
Make sure that you have a local virtualenv activated and pytest installed.
You can then run all tests by invoking:
$ python -m pytest
You can also test a single file (or a single test --- see the pytest docs):
$ python -m pytest "ajmc/search/index.py"