Skip to content

Quality estimation documentation #11

Quality estimation documentation

Quality estimation documentation #11

name: "Riksdagen Records: OCR Quality Estimation"
on:
pull_request:
branches:
- 'dev'
jobs:
decade-1860:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1860 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1860*
git commit -m "chore (workflow): find MPL and calculate lev for 1860s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1870:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1870 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1870*
git commit -m "chore (workflow): find MPL and calculate lev for 1870s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1880:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1880 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1880*
git commit -m "chore (workflow): find MPL and calculate lev for 1880s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1890:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1890 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1890*
git commit -m "chore (workflow): find MPL and calculate lev for 1890s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1900:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1900 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1900*
git commit -m "chore (workflow): find MPL and calculate lev for 1900s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1910:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1910 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1910*
git commit -m "chore (workflow): find MPL and calculate lev for 1910s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1920:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1920 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1920*
git commit -m "chore (workflow): find MPL and calculate lev for 1920s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1930:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1930 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1930*
git commit -m "chore (workflow): find MPL and calculate lev for 1930s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1940:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1940 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1940*
git commit -m "chore (workflow): find MPL and calculate lev for 1940s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1950:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1950 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1950*
git commit -m "chore (workflow): find MPL and calculate lev for 1950"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1960:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1960 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1960*
git commit -m "chore (workflow): find MPL and calculate lev for 1960s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1970:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1970 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1970*
git commit -m "chore (workflow): find MPL and calculate lev for 1970s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
decade-1980:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Estimate OCR Quality
run: |
python quality/qe_ocr-estimation.py -D 1980 --lev-only
- name: Add and commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add quality/estimates/ocr-estimation/lev-by-decade/1980*
git commit -m "chore (workflow): find MPL and calculate lev for 1980s"
git pull origin ${{ github.head_ref }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
summarize-decadewize-reults:
needs: [decade-1860, decade-1870, decade-1880, decade-1890, decade-1900, decade-1910, decade-1920, decade-1930, decade-1940, decade-1950, decade-1960, decade-1970, decade-1980]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout PR source branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyriksdagen
pip install torchmetrics
pip install nltk
- name: Summarize results
run: |
python quality/qe_ocr-estimation.py --read-lev --concat-lev