Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Commit ec5e511

Browse files
committed
Make confidence parameter optional in all add_word methods
1 parent 57b96f0 commit ec5e511

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pyocr/builders.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def start_line(self, box):
273273
"""
274274
raise NotImplementedError("Implement in subclasses")
275275

276-
def add_word(self, word, box, confidence):
276+
def add_word(self, word, box, confidence=0):
277277
"""
278278
Add a word to output.
279279
"""
@@ -615,7 +615,7 @@ def write_file(file_descriptor, boxes):
615615
def start_line(self, box):
616616
pass
617617

618-
def add_word(self, word, box, confidence):
618+
def add_word(self, word, box, confidence=0):
619619
self.word_boxes.append(Box(word, box, confidence))
620620

621621
def end_line(self):
@@ -699,7 +699,7 @@ def start_line(self, box):
699699
return
700700
self.lines.append(LineBox([], box))
701701

702-
def add_word(self, word, box, confidence):
702+
def add_word(self, word, box, confidence=0):
703703
self.lines[-1].word_boxes.append(Box(word, box, confidence))
704704

705705
def end_line(self):

0 commit comments

Comments
 (0)