public class TesseractOCRConfig extends Object implements Serializable
TesseractOCRConfig config = new TesseractOCRConfig();
config.setTesseractPath(tesseractFolder);
parseContext.set(TesseractOCRConfig.class, config);
Constructor and Description |
---|
TesseractOCRConfig()
Default contructor.
|
TesseractOCRConfig(InputStream is)
Loads properties from InputStream and then tries to close InputStream.
|
Modifier and Type | Method and Description |
---|---|
String |
getLanguage() |
int |
getMaxFileSizeToOcr() |
int |
getMinFileSizeToOcr() |
String |
getPageSegMode() |
String |
getTessdataPath() |
String |
getTesseractPath() |
int |
getTimeout() |
void |
setLanguage(String language)
Set tesseract language dictionary to be used.
|
void |
setMaxFileSizeToOcr(int maxFileSizeToOcr)
Set maximum file size to submit file to ocr.
|
void |
setMinFileSizeToOcr(int minFileSizeToOcr)
Set minimum file size to submit file to ocr.
|
void |
setPageSegMode(String pageSegMode)
Set tesseract page segmentation mode.
|
void |
setTessdataPath(String tessdataPath)
Set the path to the 'tessdata' folder, which contains language files and config files.
|
void |
setTesseractPath(String tesseractPath)
Set the path to the Tesseract executable, needed if it is not on system path.
|
void |
setTimeout(int timeout)
Set maximum time (seconds) to wait for the ocring process to terminate.
|
public TesseractOCRConfig()
public TesseractOCRConfig(InputStream is)
is
- public String getTesseractPath()
public void setTesseractPath(String tesseractPath)
Note that if you set this value, it is highly recommended that you also
set the path to the 'tessdata' folder using setTessdataPath(java.lang.String)
.
public String getTessdataPath()
setTessdataPath(String tessdataPath)
public void setTessdataPath(String tessdataPath)
public String getLanguage()
setLanguage(String language)
public void setLanguage(String language)
public String getPageSegMode()
setPageSegMode(String pageSegMode)
public void setPageSegMode(String pageSegMode)
public int getMinFileSizeToOcr()
public void setMinFileSizeToOcr(int minFileSizeToOcr)
public int getMaxFileSizeToOcr()
public void setMaxFileSizeToOcr(int maxFileSizeToOcr)
public void setTimeout(int timeout)
public int getTimeout()
setTimeout(int timeout)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.