Questions tagged [enchant]

Enchant is a wrapper library for various spellchecking back-ends like Aspell or MySpell. It's part of the AbiWord project.

Enchant (libenchant) provides a uniform abstraction layer for multiple common spell-checking libraries.

The intent is to provide plug-in spellchecking capabilities to word processors and text editors by bridging the gap to spellcheckers that are already installed on a system.

The library is written in C/C++ and provides C/C++ bindings natively. There also are 3rd-party bindings for other programming languages, for example for Python, PHP, Ruby.

The public API of the Enchant library:

  • enchant_broker_describe — Enumerates the Enchant providers
  • enchant_broker_dict_exists — Whether a dictionary exists or not. Using non-empty tag
  • enchant_broker_free_dict — Free a dictionary resource
  • enchant_broker_free — Free the broker resource and its dictionaries
  • enchant_broker_get_error — Returns the last error of the broker
  • enchant_broker_init — create a new broker object capable of requesting
  • enchant_broker_list_dicts — Returns a list of available dictionaries
  • enchant_broker_request_dict — create a new dictionary using a tag
  • enchant_broker_request_pwl_dict — creates a dictionary using a PWL file
  • enchant_broker_set_ordering — Declares a preference of dictionaries to use for the language
  • enchant_dict_add_to_personal — add a word to personal word list
  • enchant_dict_add_to_session — add 'word' to this spell-checking session
  • enchant_dict_check — Check whether a word is correctly spelled or not
  • enchant_dict_describe — Describes an individual dictionary
  • enchant_dict_get_error — Returns the last error of the current spelling-session
  • enchant_dict_is_in_session — whether or not 'word' exists in this spelling-session
  • enchant_dict_quick_check — Check the word is correctly spelled and provide suggestions
  • enchant_dict_store_replacement — Add a correction for a word
  • enchant_dict_suggest — Will return a list of values if any of those pre-conditions are not met

Also see:

52 questions
1
vote
1 answer

Grouping words by their similarity

I have a huge dictionary/dataframe of German words and how often they appeared in a huge text corpus. For example: der 23245 die 23599 das 23959 eine …
johnnydoe
  • 382
  • 2
  • 12
1
vote
1 answer

How to install enchant C library for pyenchant on python anywhere

On python anywhere, you aren't allowed to use sudo. So I can't run sudo apt-get install python-enchant I tried to use linuxbrew to install enchant however, I can't install linuxbrew because the script requires sudo. This script gives me an error…
cmcdev
  • 75
  • 9
1
vote
0 answers

Check orthography in pandas data frame column using Enchant library

I'm new to pandas and enchant. I want to check orthography in short sentences using python. I have a pandas data frame: id_num word 1 live haapy 2 know more 3 ssweam good 4 eeat little 5 dream…
1
vote
1 answer

Ignore certain words when spell checking with Enchant

I am spell checking some files with Python Enchant, and want it to ignore proper nouns. The trade off between it correcting incorrectly spelled proper nouns and incorrectly 'correcting' ones it doesn't know seems too large (although any advice on…
firefly
  • 339
  • 2
  • 10
1
vote
1 answer

How do I install pyenchant in CentOS?

I am using CentOS 5 with Python 2.7 installed. I am trying to install pyenchant library, but failed in all the cases. Used pip install pyenchant - This produced the following error - AttributeError: /usr/lib64/libenchant.so.1: undefined symbol:…
gogs09
  • 169
  • 2
  • 16
1
vote
0 answers

pyenchant recognizes lower case words, but not when they start with an upper case letter

I'm trying to use pyenchant to spell-check English and Bulgarian text. I have an issue where in English, words are recognized both when they are lower case and when they start with an upper case letter. For example: >>> d = Dict('en_GB') >>>…
1
vote
2 answers

Problems with 'pyenchant', CentOS (& El Capitan)

Problem Statement I am having problems running a python file that import's the enchant library. I've installed the enchant module with the following command: $ pip install -U pyenchant > Requirement already up-to-date: pyenchant in…
Rowan Kaag
  • 113
  • 2
  • 9
1
vote
0 answers

Having trouble with PyEnchant installation on El Capitan

It's possible I should just open this is an issue on the Enchant package, but it could definitely be something I'm missing too. I'm using El Capitan and python 2.7. I tried a few things: pip install penchant seems to successfully install…
user
  • 621
  • 1
  • 9
  • 21
1
vote
1 answer

Can't install pyenchant on windows even after I installed enchant manually

I installed pyenchant using "pip install pyenchant" then I installed from the enchant website "ABIWord" and added it to the computer path. Then when I ran "import enchent" from the python console I got: ImportError: The 'enchant' C library was not…
Lea
  • 110
  • 7
1
vote
1 answer

PHP enchant not working

I want to use enchant in my PHP code (I am running WAMP server). I have enabled enchant extension in php.ini and I also added PHP path to system variables. When I start the server it shows the following error PHP Startup: Unable to load dynamic…
dreamPr
  • 321
  • 1
  • 2
  • 14
1
vote
1 answer

Python - Enchant package in Windows

I installed "pynenchant" package in python using pip install pynenchant and it is installed successfully. When I imported it in Python using, import enchant I get following error message ImportError: The 'enchant' C library was not found. Please…
1
vote
1 answer

How to force enchant to use Hunspell in php

Is there a way to force php's enchant module to use a particular spell checking engine? I have libs for aspell, myspell, hunspell, etc. installed. When requesting a dict, it seems I can only specify a language tag like 'en_US', etc without any real…
techfoobar
  • 65,616
  • 14
  • 114
  • 135
1
vote
0 answers

Spell Check with pyenchant in python for other than English

I am using pyenchant in python for spell checking. My code is working properly for English but now I want to make it universal for other languages also. For this, First I need to confirm that a particular word belongs the selected language or not.…
1
vote
2 answers

PyEnchant 'correcting' words in dictionary to words not in dictionary

I'm attempting to take large amounts of natural language from a web forum and correct the spelling with PyEnchant. The text is often informal, and about medical issues, so I have created a text file "test.pwl" containing relevant medical words, chat…
user2437842
  • 139
  • 1
  • 10
1
vote
2 answers

Php, enchant library, how to choose dictionary (like aspell or myspell)

I'm trying Enchant spell library. I have a script that works fine, But I would be able to choose between several dictionaries (Aspell or Myspell) So as I tried this function enchant_broker_set_dict_path, but it seems to have no effects. And this…