Spelling.Dictionary

g GObject.Object GObject.Object Spelling.Dictionary Spelling.Dictionary GObject.Object->Spelling.Dictionary

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_word (word)

contains_word (word, word_len)

get_code ()

get_extra_word_chars ()

ignore_word (word)

list_corrections (word, word_len)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

code

str

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Spelling.Dictionary(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Spelling.DictionaryClass

Abstract base class for spellchecking dictionaries.

add_word(word)
Parameters:

word (str) – a word to be added

Adds word to the dictionary.

contains_word(word, word_len)
Parameters:
  • word (str) – a word to be checked

  • word_len (int) – length of the word, in bytes

Returns:

True if the dictionary contains the word

Return type:

bool

Checks if the dictionary contains word.

get_code()
Returns:

the language code of the dictionary

Return type:

str or None

Gets the language code of the dictionary, or None if undefined.

get_extra_word_chars()
Returns:

extra word characters

Return type:

str

Gets the extra word characters of the dictionary.

ignore_word(word)
Parameters:

word (str) – a word to be ignored

Requests the dictionary to ignore word.

list_corrections(word, word_len)
Parameters:
  • word (str) – a word to be checked

  • word_len (int) – the length of word, or -1 if word is zero-terminated

Returns:

A list of possible corrections, or None.

Return type:

[str] or None

Retrieves a list of possible corrections for word.

Property Details

Spelling.Dictionary.props.code
Name:

code

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The language code, for example en_US.