info:ocr

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
info:ocr [2022/08/16 11:59] – [GUI] radeffinfo:ocr [2024/05/16 02:51] (Version actuelle) radeff
Ligne 46: Ligne 46:
     tesseract page$i.png $OUTPUT$i -l fra     tesseract page$i.png $OUTPUT$i -l fra
 done</code> done</code>
-http://www.tristancollins.me/computing/ocr-using-tesseract-on-multipage-pdfs/ 
  
 +==== Liens ====
  
-http://code.google.com/p/tesseract-ocr/+  * https://github.com/tesseract-ocr/tesseract/blob/main/README.md 
 +  * http://www.tristancollins.me/computing/ocr-using-tesseract-on-multipage-pdfs/ 
 +  * https://azlinux.fr/tesseract/|Comment utiliser Tesseract pour extraire du texte à partir d'images
  
 marche nickel! marche nickel!
-===== Russe ===== 
- 
-  * https://pyimagesearch.com/2020/08/03/tesseract-ocr-for-non-english-languages/ 
-  * https://github.com/tesseract-ocr/tessdata/blob/main/rus.traineddata 
- 
-    mv rus.traineddata /usr/share/tesseract-ocr/4.00/tessdata/ 
- 
-Ou encore plus simple 
-    sudo apt-get install tesseract-ocr-rus 
- 
 ===== GUI ===== ===== GUI =====
  
Ligne 73: Ligne 65:
 et bien sûr le dico français si vous ne l'avez pas déjà et bien sûr le dico français si vous ne l'avez pas déjà
     sudo apt install hunspell-fr         sudo apt install hunspell-fr    
 +
 +===== Russe =====
 +
 +  * https://pyimagesearch.com/2020/08/03/tesseract-ocr-for-non-english-languages/
 +  * https://github.com/tesseract-ocr/tessdata/blob/main/rus.traineddata
 +
 +    mv rus.traineddata /usr/share/tesseract-ocr/4.00/tessdata/
 +
 +Ou encore plus simple
 +    sudo apt-get install tesseract-ocr-rus
 +
 +==== exemple de script bash pour le russe ====
 +<code bash>    
 +#!/usr/bin/bash
 +# ocr-ru: convert (optical character recognition) jpg russian voc to text/csv file
 +# usage: ocr-ru then translate it and drill it with anki
 +# copyleft radeff.red - use it at your own risk!
 +ladate=$(date +'%Y%m%d')
 +echo "ocr which russian image?"
 +ls *.jpg
 +read i
 +convert $i $i.png
 +tesseract $i.png $ladate -l rus
 +rm $i.png
 +echo "conversion ok, edit "$ladate".txt now"
 +#delete empty lines
 +sed -i '/^$/d' $ladate.txt
 +#delete line with only spaces
 +sed -i '/^ *$/d' $ladate.txt
 +#delete end line with strange char from whatsapp
 +sed -i '/^ $/d' $ladate.txt
 +mv $ladate.txt $ladate.csv
 +geany $ladate".csv"& 
 +</code>
  • info/ocr.1660643972.txt.gz
  • Dernière modification : 2022/08/16 11:59
  • de radeff