Bug fixes

This commit is contained in:
Louis Calas
2019-10-08 23:54:22 +02:00
parent 925d7d8f6f
commit 540b9ca512
8 changed files with 40 additions and 89 deletions

View File

@@ -1,45 +0,0 @@
package net.sourceforge.tess4j;
import java.awt.Rectangle;
/**
* Encapsulates Tesseract results.
*/
class Word {
private final String text;
private final float confidence;
private final Rectangle rect;
public Word(String text, float confidence, Rectangle rect) {
this.text = text;
this.confidence = confidence;
this.rect = rect;
}
/**
* @return the text
*/
public String getText() {
return text;
}
/**
* @return the confidence
*/
public float getConfidence() {
return confidence;
}
/**
* @return the bounding box
*/
public Rectangle getRect() {
return rect;
}
@Override
public String toString() {
return String.format("%s\t[Confidence: %f Bounding box: %d %d %d %d]", text, confidence, rect.x, rect.y, rect.width, rect.height);
}
}