Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[tegaki-wagomu] Small kana support.
  • Loading branch information
mblondel committed May 29, 2010
1 parent ddfd689 commit 408394a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tegaki-engines/tegaki-wagomu/tegakiwagomu.py
Expand Up @@ -25,7 +25,7 @@
import struct
from array import array

from tegaki.recognizer import Recognizer, RecognizerError
from tegaki.recognizer import Results, Recognizer, RecognizerError
from tegaki.trainer import Trainer, TrainerError
from tegaki.arrayutils import array_flatten
from tegaki.dictutils import SortedDict
Expand Down Expand Up @@ -231,7 +231,7 @@ def open(self, path):
if not ret:
raise RecognizerError, self._recognizer.get_error_message()

def recognize(self, writing, n=10):
def _recognize(self, writing, n=10):
n_strokes = writing.get_n_strokes()
feat = self.get_features(writing)
nfeat = len(feat)
Expand All @@ -248,7 +248,7 @@ def recognize(self, writing, n=10):
utf8 = unichr(res.get_unicode(i)).encode("utf8")
candidates.append((utf8, res.get_distance(i)))

return candidates
return Results(candidates)

RECOGNIZER_CLASS = WagomuRecognizer

Expand Down

0 comments on commit 408394a

Please sign in to comment.