summaryrefslogtreecommitdiff
path: root/gir/test.py
blob: 3a4e701e9b1498d4f3c930f8256d0930e8a02336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-
from gi.repository import GObject
from gi.repository import Anthy

anthy = Anthy.GContext()
anthy.set_encoding(Anthy.UTF8_ENCODING)
anthy.init_personality()
anthy.do_set_personality('ibus__ibus_symbol')
anthy.set_string('てすと')
anthy.resize_segment(0, -1)
print anthy.get_nr_segments()
print anthy.get_nr_candidates(0)
print anthy.get_segment(0, 0)
print anthy.commit_segment(0, 0)
anthy.set_prediction_string('てすと')
print anthy.get_nr_predictions()
print anthy.get_prediction(0)
print anthy.commit_prediction(0)