How to set myspell as enchant main dictionary provider instead of aspell?

111 views
Skip to first unread message

Egawati Panjei

unread,
Jul 16, 2014, 4:30:32 PM7/16/14
to pyencha...@googlegroups.com

Hi I wonder how can I set myspell as enchant provider instead of aspell?

I am trying to use myspell as main dictionary provider for enchant and but got the following result when executing these lines of codes:

>>> import enchant

>>> enchant.list_dicts()

[('en', <Enchant: Aspell Provider>), ('en_CA', <Enchant: Aspell Provider>), ('en_GB', <Enchant: Aspell Provider>), ('en_US', <Enchant: Aspell Provider>), ('es', <Enchant: Aspell Provider>), ('ru', <Enchant: Aspell Provider>), ('uk', <Enchant: Aspell Provider>), ('es_ES', <Enchant: Myspell Provider>), ('tet_ID', <Enchant: Myspell Provider>)]

>>> b = enchant.Broker()

>>> b.describe()

[<Enchant: Aspell Provider>, <Enchant: Ispell Provider>, <Enchant: Myspell Provider>]

>>> b.set_ordering("*","myspell")

>>> b.request_dict("uk").provider

<Enchant: Aspell Provider>

>>> d =  b.request_dict("uk")

>>> d.suggest("analytical")

["\xd0\xb1'\xd1\x8e", "\xd0\xbf'\xd1\x8e", "\xd0\xb2'\xd1\x8e", '\xd1\x80-\xd0\xbd', '\xd1\x94', '\xd1\x96', '\xd1\x8f', '\xd1\x83', '\xd0\xb2', '\xd0\xb7', '\xd1\x97\xd1\x97', '\xd1\x97\xd0\xb9', '\xd1\x8e\xd1\x81', '\xd1\x8e\xd1\x82', '\xd1\x8e\xd0\xb7', '\xd0\xb0\xd1\x85', '\xd0\xb0\xd1\x81', '\xd0\xb0\xd0\xb6', '\xd0\xb0\xd0\xb7', '\xd0\xb0\xd1\x87', '\xd0\xb1\xd0\xb0', '\xd0\xb1\xd0\xb8', '\xd0\xb1\xd0\xbe', '\xd1\x86\xd1\x8e', '\xd1\x86\xd0\xb5', '\xd1\x86\xd1\x8f', '\xd0\xb4\xd0\xb5', '\xd0\xb4\xd0\xbe', '\xd0\xb5\xd1\x85', '\xd1\x84\xd0\xb0', '\xd0\xb3\xd0\xb0', '\xd0\xb3\xd1\x83', '\xd0\xb8\xd1\x82', '\xd0\xbb\xd1\x8f', '\xd0\xbc\xd0\xb8', '\xd0\xbc\xd0\xbc', '\xd0\xbd\xd0\xb0', '\xd0\xbd\xd0\xb5', '\xd0\xbd\xd1\x83', '\xd0\xbe\xd0\xb1', '\xd0\xbe\xd1\x85', '\xd0\xbe\xd0\xb9', '\xd0\xbe\xd0\xbc', '\xd0\xbe\xd1\x82', '\xd0\xbf\xd0\xb0', '\xd0\xbf\xd0\xbe', '\xd1\x8f\xd0\xba', '\xd1\x8f\xd0\xbb', '\xd1\x8f\xd1\x80', '\xd1\x80\xd0\xb5', '\xd1\x82\xd0\xb0', '\xd1\x82\xd0\xb5', '\xd1\x82\xd0\xb8', '\xd1\x82\xd0\xbe', '\xd1\x82\xd1\x83', '\xd1\x83\xd0\xbc', '\xd0\xb6\xd0\xb5', '\xd0\xb2\xd0\xb8', '\xd0\xb7\xd0\xb0', '\xd1\x89\xd0\xb5', '\xd1\x89\xd0\xbe', '\xd1\x87\xd0\xb8', '\xd0\x9e\xd0\xb1', '\xd0\x9f\xd0\xb0', '\xd0\xaf\xd0\xbd', '\xd0\x92\xd0\x92', '\xd0\xbd\xd1\x96', '\xd0\xbd\xd0\xbc']

>>> 


Reply all
Reply to author
Forward
0 new messages