text-quality

Detect quality of (digitized) text.

https://github.com/lahter/htr-quality-classifier

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary

Keywords

classification htr machine-learning neural-networks scikit-learn
Last synced: 4 months ago · JSON representation ·

Repository

Detect quality of (digitized) text.

Basic Info
  • Host: GitHub
  • Owner: LAHTeR
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 3.25 MB
Statistics
  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • Open Issues: 5
  • Releases: 10
Topics
classification htr machine-learning neural-networks scikit-learn
Created almost 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.dev.md

text_quality developer documentation

If you're looking for user documentation, go here.

Development install

```shell

Create a virtual environment, e.g. with

python3 -m venv env

activate virtual environment

source env/bin/activate

make sure to have a recent version of pip and setuptools

python3 -m pip install --upgrade pip setuptools

(from the project root directory)

install text_quality as an editable package

python3 -m pip install --no-cache-dir --editable .

install development dependencies

python3 -m pip install --no-cache-dir --editable .[dev] ```

Afterwards check that the install directory is present in the PATH environment variable.

Running the tests

There are two ways to run tests.

The first way requires an activated virtual environment with the development tools installed:

shell pytest -v

The second is to use tox, which can be installed separately (e.g. with pip install tox), i.e. not necessarily inside the virtual environment you use for installing text_quality, but then builds the necessary virtual environments itself by simply running:

shell tox

Testing with tox allows for keeping the testing environment separate from your development environment. The development environment will typically accumulate (old) packages during development that interfere with testing; this problem is avoided by testing with tox.

Test coverage

In addition to just running the tests to see if they pass, they can be used for coverage statistics, i.e. to determine how much of the package's code is actually executed during tests. In an activated virtual environment with the development tools installed, inside the package directory, run:

shell coverage run

This runs tests and stores the result in a .coverage file. To see the results on the command line, run

shell coverage report

coverage can also generate output in HTML and other formats; see coverage help for more information.

Running linters locally

For linting we will use prospector and to sort imports we will use isort. Running the linters requires an activated virtual environment with the development tools installed.

```shell

linter

prospector

recursively check import style for the text_quality module only

isort --check-only text_quality

recursively check import style for the text_quality module only and show

any proposed changes as a diff

isort --check-only --diff text_quality

recursively fix import style for the text_quality module only

isort text_quality ```

To fix readability of your code style you can use yapf.

You can enable automatic linting with prospector and isort on commit by enabling the git hook from .githooks/pre-commit, like so:

shell git config --local core.hooksPath .githooks

Generating the Architecture Diagram

The architecture diagram is stored in the classestextquality.svg file, and displayed in the README.md file. To update it, use pyreverse from the pylint package:

shell pyreverse --output svg --project text_quality text_quality

Generating the API docs

shell cd docs make html

The documentation will be in docs/_build/html

If you do not have make use

shell sphinx-build -b html docs docs/_build/html

To find undocumented Python objects run

shell cd docs make coverage cat _build/coverage/python.txt

To test snippets in documentation run

shell cd docs make doctest

Versioning

Bumping the version across all files is done with bumpversion, e.g.

shell bumpversion major bumpversion minor bumpversion patch

Making a release

This section describes how to make a release in 3 parts:

  1. preparation
  2. making a release on PyPI
  3. making a release on GitHub

(1/3) Preparation

  1. Update the (don't forget to update links at bottom of page)
  2. Verify that the information in CITATION.cff is correct, and that .zenodo.json contains equivalent data
  3. Make sure the version has been updated.
  4. Run the unit tests with pytest -v

SKIP: (2/3) PyPI Release

Publishing an updated package on PyPI manually is not necessary for this project. Instead, the Build and Publish Workflow is triggered automatically when a new release is created on GitHub in the next step.

(3/3) GitHub Release

Make a release on GitHub. Create a new tag in the form v<X.X.X>, where <X.X.X> is the version number as specified in the versioning section.

This will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it (see Zenodo project page).

Owner

  • Name: LAHTeR
  • Login: LAHTeR
  • Kind: organization

Citation (CITATION.cff)

# YAML 1.2
---
cff-version: "1.2.0"
title: "text_quality"
authors:
  - family-names: Schnober
    given-names: Carsten
    orcid: "https://orcid.org/0000-0001-9139-1577"
date-released: 2023-11-16
doi: https://zenodo.org/doi/10.5281/zenodo.8189892
version: "0.3.1"
repository-code: "git@github.com:laHTeR/htr-quality-classifier"
keywords:
  - htr
  - ocr
message: "If you use this software, please cite it using these metadata."
license: GPL-3.0

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 11
  • Total pull requests: 4
  • Average time to close issues: 9 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.45
  • Average comments per pull request: 1.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • carschno (10)
  • bvreede (1)
Pull Request Authors
  • carschno (4)
Top Labels
Issue Labels
enhancement (5) documentation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 17 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: text-quality

A package to determine the quality of a a digitized text, from a handwritten script or scanned print (HTR/OCR output).

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 17 Last month
Rankings
Dependent packages count: 7.1%
Average: 26.9%
Dependent repos count: 30.4%
Forks count: 30.6%
Stargazers count: 39.4%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/cffconvert.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action main composite
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/markdown-link-check.yml actions
  • actions/checkout v3 composite
  • gaurav-nelson/github-action-markdown-link-check v1 composite
.github/workflows/publish-to-test-pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/sonarcloud.yml actions
  • SonarSource/sonarcloud-github-action master composite
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
pyproject.toml pypi
setup.py pypi