## Tesseract 'main' page |
## Tesseractの 'メイン'ページ |
See the main page for command line syntax and other details. |
コマンドラインの構文およびその他の詳細については、mainページを参照してください。 |
-------------------------------------------- |
-------------------------------------------- |
## Basic Command Line Usage |
##基本的なコマンドラインの使い方 |
See Running Tesseract for basic command line usage. |
基本的なコマンドラインの使い方についてはRunning Tesseractをご覧ください。 |
## FAQ |
## よくある質問 |
See FAQ for more examples and tips. |
その他の例やヒントについてはFAQを参照してください。 |
-------------------------------------------- |
-------------------------------------------- |
## Available OCR Engines in Tesseract 4 |
## Tesseract 4で利用可能なOCRエンジン |
Use --oem 1 for LSTM, --oem 0 for Legacy Tesseract. Please note that Legacy Tesseract models are only included in traineddata files from tessdata repo. |
LSTMには --oem 1 を、Legacy Tesseractには--oem 0 を使用してください。 Legacy Tesseractモデルはtessdataリポジトリの訓練済みデータファイルにのみ含まれています。 |
tesseract input.tiff output --oem 1 -l eng |
tesseract input.tiff output --oem 1 -l eng |
--------------------------------------------- |
--------------------------------------------- |
## Simplest Invocation to OCR an image |
##画像をOCRするための最も簡単な呼び出し |
tesseract imagename outputbase |
tesseract imagename outputbase |
This uses English as the default language and 3 as the Page Segmentation Mode. The default output format is text. |
これはEnglishをデフォルトの言語として、3をPage Segmentation Modeとして使います。デフォルトの出力フォーマットはtextです。 |
osd.traineddata, for Orientation and Segmentation and eng.traineddata and other language data files for English should be in the "tessdata" directory. TESSDATA_PREFIX environment variable should be set to the parent directory of "tessdata" directory. |
Orientation and Segmentation用のosd.traineddataおよび英語用のeng.traineddataおよびその他の言語データファイルは、 "tessdata"ディレクトリになければなりません。 TESSDATA_PREFIX環境変数は、 "tessdata"ディレクトリの親ディレクトリに設定する必要があります。 |
The following command would give the same result as above, if eng.traineddata and osd.traineddata files are in /usr/share/tessdata directory. |
次のコマンドは、eng.traineddataファイルとosd.traineddataファイルが/ usr / share / tessdataディレクトリにある場合、上記と同じ結果になります。 |
tesseract --tessdata-dir /usr/share imagename outputbase -l eng --psm 3 |
tesseract --tessdata-dir / usr / shareイメージ名outputbase -l eng --psm 3 |
____ |
____ |
Following examples use this image which has text in multiple languages. |
次の例では、複数の言語のテキストを含むこの画像を使用しています。 |
|
|
## Using One Language |
##一つの言語を使う |
Add '-l LANG' to the command where LANG is three character language code from the list of supported languages. If this is not given then English language is assumed by default. |
サポートされている言語のリストから、LANGが3文字の言語コードであるコマンドに「-l LANG」を追加します。これが与えられていない場合、英語がデフォルトで想定されます。 |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng -l eng |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng -l eng |
Output |
出力 |
The (quick) [brown] {fox} jumps! |
(素早い)[茶] {キツネ}は飛びます! |
Over the $43,456.78 #90 dog |
43,456.78ドル以上#90犬 |
& duck/goose, as 12.5% of E-mail |
&ダック/ガチョウ、電子メールの12.5% |
from aspammer@website.com is spam. |
aspammer@website.comからのスパムです。 |
Der ,,schnelle” braune Fuchs springt |
Der ,, schnelle” braune Fuchs springt |
fiber den faulen Hund. Le renard brun |
フンの巣窟。ルルナールブラン |
«rapide» saute par-dessus le chien |
≪ラピド≫ラ・パル=デス=ル=ソン |
paresseux. La volpe marrone rapida |
パレス。ラ・ボルペ・マローン・ラピタ |
salta sopra i] cane pigro. El zorro |
サルタ・ソプラ・ケーン・ピグロ。エルゾロ |
marrén répido salta sobre el perro |
MarénrépidoSalta sobre el perro |
perezoso. A raposa marrom répida |
ペレゾソ。ラポサ・マロム・レピダ |
salta sobre 0 C50 preguieoso. |
サルタソーブル0 C50 preguieoso。 |
## Using Multiple Languages |
##多言語を使う |
Add '-l LANG[+LANG]' to the command line to use multiple languages together for recognition |
認識に複数の言語を一緒に使用するには、コマンドラインに '-l LANG [+ LANG]'を追加します。 |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-engdeu -l eng+deu |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-engdeu -l eng + deu |
Output |
出力 |
The (quick) [brown] {fox} jumps! |
(素早い)[茶] {キツネ}は飛びます! |
Over the $43,456.78 #90 dog |
43,456.78ドル以上#90犬 |
& duck/goose, as 12.5% of E-mail |
&ダック/ガチョウ、電子メールの12.5% |
from aspammer@website.com is spam. |
aspammer@website.comからのスパムです。 |
Der „schnelle” braune Fuchs springt |
Der schnelleブラウヌFuchs springt |
über den faulen Hund. Le renard brun |
フーデンルルナールブラン |
«rapide» saute par-dessus le chien |
≪ラピド≫ラ・パル=デス=ル=ソン |
paresseux. La volpe marrone rapida |
パレス。ラ・ボルペ・マローン・ラピタ |
salta sopra il cane pigro. El zorro |
サルタソプライルケインピグロ。エルゾロ |
marrön räpido salta sobre el perro |
MarrénräpidoSalta sobre el perro |
perezoso. A raposa marrom räpida |
ペレゾソ。ラポサ・マロム・レピダ |
salta sobre o cäo preguieoso. |
あなたのレビューを書く |
## Order of multiple languages |
##多言語の順番 |
The output can be different based on the order of languages, so -l eng+hin can give different result than -l hin+eng. |
出力は言語の順序によって異なる可能性があるため、-l eng + hinは-l hin + engとは異なる結果になります。 |
Following examples use a greyscale version of this image which has text in multiple languages - Hindi and English. |
次の例では、このイメージのグレースケールバージョンを使用しています。このイメージには、複数の言語(ヒンディー語と英語)のテキストがあります。 |
|
|
Using English as primary language and then Hindi |
第一言語として英語を使い、次にヒンディー語を使う |
tesseract --tessdata-dir ./ ./testing/bilingual.jpg ./testing/bilingual-enghin -l eng+hin |
tesseract --tessdata-dir ./ ./testing/bilingual.jpg ./testing/bilingual-enghin -l eng + hin |
Output |
出力 |
हिदीसेअंठौजी |
हिदीसेअंठौजी |
HINDI To |
ヒンディー語 |
ENGLISH |
英語 |
— |
- |
Using Hindi as primary language and then English |
ヒンディー語を第一言語として使い、その後英語を使う |
tesseract --tessdata-dir ./ ./testing/bilingual.jpg ./testing/bilingual-hineng -l hin+eng |
tesseract --tessdata-dir ./ ./testing/bilingual.jpg ./testing/bilingual-hineng -l hin + eng |
Output |
出力 |
हिंदी से अंग्रेजी |
この商品を追加しました |
H I N D I T o |
私はいない |
E N G L I S H |
E N G L I S H |
— |
- |
## Searchable pdf output |
##検索可能なpdf出力 |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng -l eng pdf |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng-l eng pdf |
This creates a pdf with the image and a separate searchable text layer with the recognized text. |
これにより、画像と認識されたテキストを含む個別の検索可能なテキストレイヤーを含むPDFが作成されます。 |
tesseract c:\temp\test_ara.jpg -l ara -psm 3 c:\temp\test_ara pdf |
tesseract c:\ temp \ test_ara.jpg -l ara -psm 3 c:\ temp \ test_ara pdf |
Files are attached (source JPG and output PDF) |
ファイルが添付されている(ソースJPGおよび出力PDF) |
|
|
|
|
## HOCR output |
## HOCR出力 |
Use 'hocr' config file by adding hocr at the end of the command to get the HOCR output. |
HOCR出力を取得するには、コマンドの最後にhocrを追加して、 'hocr'設定ファイルを使用します。 |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng -l eng hocr |
tesseract --tessdata-dir ./ ./testing/eurotext.png ./testing/eurotext-eng-l eng hocr |
Partial Output |
部分出力 |