Anthy.GContext

g Anthy.GContext Anthy.GContext GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Anthy.GContext GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

set_logger (level)

commit_prediction (nth_seg)

commit_segment (nth_seg, nth_lookup)

do_set_personality (dict_name)

get_nr_candidates (nth_seg)

get_nr_predictions ()

get_nr_segments ()

get_prediction (nth_seg)

get_segment (nth_seg, nth_lookup)

init_personality ()

resize_segment (nth, resize)

set_encoding (encoding)

set_prediction_string (string)

set_string (string)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.InitiallyUnowned

r

pdummy

[object]

r

Class Details

class Anthy.GContext(**kwargs)
Bases:

GObject.InitiallyUnowned

Abstract:

No

Structure:

Anthy.GContextClass

An Anthy.GContext is an object that handles conversion strings.

classmethod new()
Returns:

A newly allocated Anthy.GContext

Return type:

Anthy.GContext

New an #AnthyGobject.

classmethod set_logger(level)
Parameters:

level (int) – Log level

Set Anthy log level.

commit_prediction(nth_seg)
Parameters:

nth_seg (int) – Nth segment

Return type:

int

Commit a prediction string with ntg_seg .

commit_segment(nth_seg, nth_lookup)
Parameters:
  • nth_seg (int) – Nth segment

  • nth_lookup (int) – Nth lookup

Return type:

int

Commit a string with ntg_seg and nth_lookup.

do_set_personality(dict_name)
Parameters:

dict_name (str) – a Dictionary name

Return type:

int

Set a personal dictionary.

get_nr_candidates(nth_seg)
Parameters:

nth_seg (int) –

Returns:

The number of the candidates

Return type:

int

The number of the candidates

get_nr_predictions()
Returns:

The number of the converted segments in the current prediction string.

Return type:

int

The number of the converted segments in the current prediction string.

get_nr_segments()
Returns:

The number of the converted segments

Return type:

int

The number of the converted segments

get_prediction(nth_seg)
Parameters:

nth_seg (int) – Nth segment

Returns:

A newly assigned string.

Return type:

str

A newly assigned string with ntg_seg .

get_segment(nth_seg, nth_lookup)
Parameters:
  • nth_seg (int) – Nth segment

  • nth_lookup (int) – Nth lookup

Returns:

A newly assigned string.

Return type:

str

A newly assigned string with ntg_seg and nth_lookup .

init_personality()

Initialize the personal dictionaries.

resize_segment(nth, resize)
Parameters:
  • nth (int) – nth segment

  • resize (int) – size

Resize the nth segment.

set_encoding(encoding)
Parameters:

encoding (int) – An encoding

Return type:

int

Set an encoding.

set_prediction_string(string)
Parameters:

string (str) – A prediction string

Return type:

int

Set a prediction string.

set_string(string)
Parameters:

string (str) – A conversion string

Return type:

int

Set a conversion string.