|
|
|
@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
@ -32,6 +33,7 @@ public class OcrServiceImpl implements OcrApi {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<String> getText(String path) {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
StopWatch watch = new StopWatch();
|
|
|
|
|
|
|
|
|
@ -63,6 +65,11 @@ public class OcrServiceImpl implements OcrApi {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return texts;
|
|
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
log.error(ex.getMessage(), ex);
|
|
|
|
|
return Collections.emptyList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|