theme |
---|
white |
💡 Consistency 💡 Less manual work
- Part 1: Dealing with versions
WSL2 uses a random network from the 172.16.0.0/12 RFC1918 private IP address block. And our VPN uses that address block, too, with a route metric of 1
(= most preferred.)
This breaks networking for WSL2. Meh!
While messing around with the interface/route metric of the VPN network may work around the problem, it also reduces the priority of the VPN. We do not really want this. Additionally, changing the interface metric does not seem to be permanent, so it requires more work when it breaks again.
import glob | |
import json | |
FIELDS = ["gt", "ocr", "cer", "wer", "n_characters", "n_words"] | |
FILES = glob.glob("*.json") | |
print("file;" + ";".join(FIELDS)) | |
for f in FILES: |
from bs4 import BeautifulSoup | |
import glob | |
METRICS = ["CER", "WER", "WER (order independent)"] | |
FILES = glob.glob("*.html") | |
print("file;" + ";".join(METRICS)) | |
To reproduce:
git clone https://github.com/OCR-D/olena.git OCR-D-olena
cd OCR-D-olena
./configure --disable-dependency-tracking --enable-scribo
make -j8
_jpageviewer_jar=~/opt/jpageviewer/JPageViewer.jar | |
if [ -e "$_jpageviewer_jar" ]; then | |
jpageviewer() { | |
# --resolve-dir defaults to the file's directory | |
_jpageviewer_resolve_dir=`dirname "$1"` | |
# ... unless a mets.xml file exists one directory down (OCR-D workspace) | |
if [ -e "$_jpageviewer_resolve_dir"/../mets.xml ]; then | |
_jpageviewer_resolve_dir="$_jpageviewer_resolve_dir"/.. | |
fi |
#!/bin/sh | |
# Fix mets.xml for easy cases | |
xmlstarlet sel -N mets=http://www.loc.gov/METS/ -t -m "//mets:FLocat" -v "@xlink:href" -n mets.xml | while read f; do | |
if echo "$f" | grep -q "^http://"; then | |
continue | |
fi | |
if [ ! -e $f ]; then | |
echo "$f does not exist" |
1 netz rosenkohl 1 zwiebel etwas gemüsebrühe
3el erdnussbutter 1-2el sojasoße etwas zitronensaft (nach geschmack) heißes wasser
nicht probiert: zucker