Skip to content

Commit

Permalink
split_preedit() -> preedit_components().
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed May 7, 2010
1 parent 17bde64 commit 7366804
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def __possibly_update_config(self):
# }

def __update(self):
prefix, midasi, suffix = self.__skk.split_preedit()
prefix, midasi, suffix = self.__skk.preedit_components()
midasi_start = len(prefix)
suffix_start = midasi_start + len(midasi)
suffix_end = suffix_start + len(suffix)
Expand Down
8 changes: 6 additions & 2 deletions engine/skk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,11 @@ def __merge_candidates(self, usr_candidates, sys_candidates):
[candidate for candidate in sys_candidates
if candidate not in usr_candidates]

def split_preedit(self):
def preedit_components(self):
'''Return a tuple representing the current preedit text. The
format of the tuple is (PREFIX, MIDASI, SUFFIX). For example PREFIX
will include "▽", MIDASI is "かんが", and SUFFIX is "*えr" in
okuri-ari conversion.'''
if self.__conv_state == CONV_STATE_NONE:
if self.__rom_kana_state:
return (u'', self.__rom_kana_state[1], u'')
Expand Down Expand Up @@ -1213,7 +1217,7 @@ def split_preedit(self):
(self.__auto_start_henkan_keyword or u''))
return (u'', u'', u'')

preedit = property(lambda self: ''.join(self.split_preedit()))
preedit = property(lambda self: ''.join(self.preedit_components()))

def __convert_nn(self, state):
output, pending, tree = state
Expand Down

0 comments on commit 7366804

Please sign in to comment.