I added tess-two library in build.gradle like below
implementation 'com.rmtheis:tess-two:9.1.0'
and I want to recognize mathematical expression,symbol with TessBaseApi() so i need set true textord_equation_detect but i don't know how to do this.The code I wrote using TessBaseApi is as follows
public static boolean init(AssetManager assetManager){
mTess = new TessBaseAPI();
String datapath = CommonUtils.APP_PATH;
File dir =new File(datapath + "tessdata/");
if(!dir.exists()) {
dir.mkdir();
try {
InputStream inStream = assetManager.open("CSDL/eng.traineddata");
FileOutputStream outStream = new FileOutputStream(datapath + "tessdata/eng.traineddata");
byte[] buffer = new byte[1024];
int readCount = 0;
while (((readCount = inStream.read(buffer)) != -1)) {
outStream.write(buffer, 0, readCount);
}
outStream.flush();
outStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
mTess.init(datapath,"eng");
return true;
}
How can i set true textord_equation_detect? Can you help me please?