tesseract: simplify
This commit is contained in:
parent
1b64fc9360
commit
808cadd390
|
@ -5,14 +5,6 @@ let
|
|||
version = "${majVersion}.02";
|
||||
|
||||
f = lang : sha256 : let
|
||||
src = fetchurl {
|
||||
url = "http://tesseract-ocr.googlecode.com/files/${lang}.traineddata.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
in
|
||||
"gunzip -c ${src} > $out/share/tessdata/${lang}.traineddata";
|
||||
|
||||
f2 = lang : sha256 : let
|
||||
src = fetchurl {
|
||||
url = "http://tesseract-ocr.googlecode.com/files/tesseract-ocr-${majVersion}.${lang}.tar.gz";
|
||||
inherit sha256;
|
||||
|
@ -21,12 +13,12 @@ let
|
|||
"tar xfvz ${src} -C $out/share/ --strip=1";
|
||||
|
||||
extraLanguages = ''
|
||||
${f2 "cat" "0d1smiv1b3k9ay2s05sl7q08mb3ln4w5iiiymv2cs8g8333z8jl9"}
|
||||
${f2 "rus" "059336mkhsj9m3hwfb818xjlxkcdpy7wfgr62qwz65cx914xl709"}
|
||||
${f2 "spa" "1c9iza5mbahd9pa7znnq8yv09v5kz3gbd2sarcgcgc1ps1jc437l"}
|
||||
${f2 "nld" "162acxp1yb6gyki2is3ay2msalmfcsnrlsd9wml2ja05k94m6bjy"}
|
||||
${f2 "eng" "1y5xf794n832s3lymzlsdm2s9nlrd2v27jjjp0fd9xp7c2ah4461"}
|
||||
${f2 "slv" "0rqng43435cly32idxm1lvxkcippvc3xpxbfizwq5j0155ym00dr"}
|
||||
${f "cat" "0d1smiv1b3k9ay2s05sl7q08mb3ln4w5iiiymv2cs8g8333z8jl9"}
|
||||
${f "rus" "059336mkhsj9m3hwfb818xjlxkcdpy7wfgr62qwz65cx914xl709"}
|
||||
${f "spa" "1c9iza5mbahd9pa7znnq8yv09v5kz3gbd2sarcgcgc1ps1jc437l"}
|
||||
${f "nld" "162acxp1yb6gyki2is3ay2msalmfcsnrlsd9wml2ja05k94m6bjy"}
|
||||
${f "eng" "1y5xf794n832s3lymzlsdm2s9nlrd2v27jjjp0fd9xp7c2ah4461"}
|
||||
${f "slv" "0rqng43435cly32idxm1lvxkcippvc3xpxbfizwq5j0155ym00dr"}
|
||||
'';
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in New Issue