2016-02-12 11 views
5

एंचेंट पुस्तकालय के लिए अलग परिणाम (मोहित कर 1.6.6)एंचेंट शब्दकोश

मैक OSX 10.11.12 (एल कैप्टन) में:

>>> import enchant 
>>> d = enchant.Dict("en_US") 
>>> d.suggest("prfomnc") 
['performance', 'prominence', 'preform', 'perform'] 

लिनक्स Ubuntu 14.04 LTS में:

>>> import enchant 
>>> d = enchant.Dict("en_US") 
>>> d.suggest("prfomnc") 
['princedom', 'preferment', 'preform'] 

कोई विचार क्यों मुझे "सुझाव" कार्यक्षमता के लिए एनएलटीके में अलग-अलग परिणाम और अन्य विकल्प मिलते हैं?


मैक ओएस

>>> enchant.list_dicts() 
[('de_DE', <Enchant: Myspell Provider>), ('en_AU', <Enchant: Myspell Provider>), ('en_GB', <Enchant: Myspell Provider>), ('en_US', <Enchant: Myspell Provider>), ('fr_FR', <Enchant: Myspell Provider>)] 

उबंटू

>>> enchant.list_dicts() 
[('en', <Enchant: Aspell Provider>), ('en_CA', <Enchant: Aspell Provider>), ('en_GB', <Enchant: Aspell Provider>), ('en_US', <Enchant: Aspell Provider>), ('en_ZA', <Enchant: Myspell Provider>), ('en_AU', <Enchant: Myspell Provider>)] 

मेरी उबंटू में करने की कोशिश की:

>>> b = enchant.Broker() 
>>> b.set_ordering("en_US","myspell,aspell") 
>>> b.set_ordering("*","aspell,myspell") 
>>> b.request_dict("en_US").provider 
<Enchant: Myspell Provider> 
>>> b.request_dict("en_GB").provider 
<Enchant: Aspell Provider> 
>>> d.suggest("prfomnc") 
['princedom', 'preferment', 'preform'] 

लेकिन फिर भी एक ही परिणाम

उत्तर

1

enchant लाइब्रेरी एक जादू-सुधार पुस्तकालय नहीं है। इसके बजाए, यह एक एग्रीगेटर है, जो विभिन्न प्रकार के समर्थित सिस्टमों के साथ एक इंटरफेसिंग खोज रहा है।

the documentation:

से एंचेंट एक ही बार में भरी हुई कई बैकेंड होने में सक्षम है।

Aspell/Pspell (intends to replace Ispell) 
Ispell (old as sin, could be interpreted as a defacto standard) 
MySpell/Hunspell (an OOo project, also used by Mozilla) 
Uspell (primarily Yiddish, Hebrew, and Eastern European languages - hosted in AbiWord's CVS under the module "uspell") 
Hspell (Hebrew) 
Zemberek (Turkish) 
Voikko (Finnish) 
AppleSpell (Mac OSX) 

सूचना पिछले एक: वर्तमान में, एंचेंट 8 बैकेंड है?

मुझे संदेह है कि इसकी पुष्टि करने के लिए किसी भी ऊर्जा का खर्च किए बिना, आपको अलग-अलग परिणाम मिल रहे हैं क्योंकि आपके मैकोज़ सिस्टम और आपके लिनक्स सिस्टम में अलग-अलग वर्तनी सॉफ़्टवेयर स्थापित हैं, या शायद उनके पास एक ही सॉफ़्टवेयर इंस्टॉल है लेकिन हो सकता है कि वे enchant द्वारा उपयोग किए गए सर्चपाथ में अलग-अलग ऑर्डर।