From 7d178ce8a9dbac5b2e0b92284c5f8c84531a6624 Mon Sep 17 00:00:00 2001 From: Nikita Orlov Date: Wed, 12 Feb 2020 18:46:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=20?= =?UTF-8?q?=D0=B2=D1=81=D0=B5=20=D0=BD=D0=B0=D0=BA=D0=BE=D0=BF=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=D0=B7=20tupolev-r?= =?UTF-8?q?ecog.cont?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/vcs.xml | 6 +++++ add-fonts-to-ocr.sh | 7 +++++ training/0base.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 .idea/vcs.xml create mode 100755 add-fonts-to-ocr.sh create mode 100644 training/0base.md diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/add-fonts-to-ocr.sh b/add-fonts-to-ocr.sh new file mode 100755 index 0000000..1555068 --- /dev/null +++ b/add-fonts-to-ocr.sh @@ -0,0 +1,7 @@ +if [ ! -d $FONTS_DIR ]; then + echo "set FONTS_DIR envvar"; exit 1 +fi +LNG_DIR=/vagrant/init/langdata/rus +text2image --find_fonts --fonts_dir $FONTS_DIR \ + --text $LNG_DIR/rus.training_text --min_coverage .9 \ + --outputbase $LNG_DIR/rus |& grep raw | sed -e 's/ :.*/@ \\/g' | sed -e "s/^/ '/" | sed -e "s/@/'/g" > $LNG_DIR/fontslist.txt \ No newline at end of file diff --git a/training/0base.md b/training/0base.md new file mode 100644 index 0000000..07855f5 --- /dev/null +++ b/training/0base.md @@ -0,0 +1,62 @@ +```shell script +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example10.png stdout +Detected 4 diacritics + + +1-16 0ЕТ 113696-81 +2-17 0СТ 113696-61 + + + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example9.png stdout + + +Штамп для одсечки +контура и продивки +отверстия + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example8.png stdout +ло посабке ведущей звездочки и корзины сцепления +3 Лазы поб сегментных шпонок фрезеровать фрезой + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example7.png stdout +Вал сцепления +двигателей Д-5, Д-6, +Д-8 + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example6.png stdout +ВСЧД5-8.002.000.24.01.17 + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example5.png stdout +Empty page!! +Empty page!! + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example5.png stdout +Empty page!! +Empty page!! + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example4.png stdout + + +Стобка ("солдатик") регулировочного +Винта сцепления фёиготелео ДА-Д8 + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example3.png stdout +СВО Д\-8.002.16.01.2017 + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example1.png stdout +Редуктор +СВорочный чертех + +СОорочный чертеж + +vagrant@debian10:/vagrant$ tesseract -l rus data/ocr/example2.png stdout +Detected 9 diacritics +Прим. Установку на картере дбиготеля производить +через алюм. шадбы толщиноо 0.5-1 мм. + +Фиксация относительно рычага сцепления и положение +тросика сцепления осуществляется подбором шайб + + +``` \ No newline at end of file