Problem with CFDICT

20 views
Skip to first unread message

dor...@gmail.com

unread,
Sep 25, 2013, 6:52:59 AM9/25/13
to cjklib...@googlegroups.com
Hi,

I use cjklib quite frequently and it's a very useful tool for me.
I used until now CEDICT and didn't get any problem but recently I made some tests with CFDICT and observed a problem:
the word 哪儿 gives the following error here below (I tested with a few words and it worked, this is the first one with that problem):

File "C:\Python27\lib\site-packages\cjklib-0.3.2-py2.7.egg\cjklib\dictionary\format.py", line 151, in format
    for idx, entity in enumerate(reading.split(' ')):
AttributeError: 'NoneType' object has no attribute 'split'
.

Here is the code to reproduce it:
from cjklib.dictionary import *

d = CFDICT()
result = d.getFor(u'哪儿')

Any idea of the cause and do you have any temporary workaround ?

      Thank you,

           Xavier



Christoph Burgmer

unread,
Oct 8, 2013, 5:49:27 PM10/8/13
to cjklib...@googlegroups.com, dor...@gmail.com
Hi Xavier,

a bit late but, is it possible that the entry is just missing a Pinyin entry? Or maybe an esoteric one (read "invalid")?

-Christoph

Xavier Baele

unread,
Oct 10, 2013, 5:37:17 AM10/10/13
to Christoph Burgmer, cjklib...@googlegroups.com
Hi,

the pinyin is "na3 r" in the french dictionary while in the english one it's "na3 r5", could it be the problem?

        THX,

          Xavier

Christoph Burgmer

unread,
Oct 10, 2013, 4:25:36 PM10/10/13
to cjklib...@googlegroups.com, Christoph Burgmer, dor...@gmail.com
Sounds reasonable.

I checked the settings for CFDICT and they share the same ones with CEDICT. However there seems to be a difference here. If this entry you mention is the only one that doesn't have the fifth tone marked with a number 5, then that should probably be corrected with CFDICT. If that is the general format of CFDCT that should probably be fixed then with cjklib.

-Christoph

Xavier Baele

unread,
Oct 16, 2013, 5:24:41 AM10/16/13
to Christoph Burgmer, cjklib...@googlegroups.com
Indeed.
I will check that and tell you.

      Xavier
Reply all
Reply to author
Forward
0 new messages