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 |
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 |
setTesseractPath(String tesseractPath)
Set tesseract installation folder, 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)
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.