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.commonscontains shared tools and variables.ajmc.corporacontains tools to deal with the project's corpora.ajmc.nlpcontains helpers for named entity recognition with HuggingFace transformers.ajmc.ocrcontains helpers and functions to run tesseract and perform coordinate-based evaluation of OCR outputs.ajmc.olrcontains helpers and function to perform layout analysis with YOLOv5 and LayoutLM, as well preparing layout annotation with VIA2.ajmc.text_processingoffers 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 pytestYou can also test a single file (or a single test --- see the pytest docs):
$ python -m pytest "ajmc/search/index.py"Code in this repository was produced in the context of the Ajax Multi-Commentary project, funded by the Swiss National Science Foundation under an Ambizione grant PZ00P1_186033.