|
|
@ -97,7 +97,8 @@ abstract class Reader{ |
|
|
|
List<Box> readRegions = new ArrayList<>(); |
|
|
|
List<Box> readRegions = new ArrayList<>(); |
|
|
|
String readAllBoxes() { |
|
|
|
String readAllBoxes() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Process p = Runtime.getRuntime().exec("cat testBoxes.txt"); |
|
|
|
Process p = Runtime.getRuntime().exec(new String[]{"python3","runocr.py","ja"}); |
|
|
|
|
|
|
|
while (p.isAlive()); |
|
|
|
InputStreamReader result = new InputStreamReader(p.getInputStream()); |
|
|
|
InputStreamReader result = new InputStreamReader(p.getInputStream()); |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
while (result.ready()) { |
|
|
|
while (result.ready()) { |
|
|
|