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
0
votes
1 answer

Install enchant C library in ProQuest' TDM Studio (which use an AWS SageMaker server)

Im in trouble installing Install enchant C library in AWS SageMaker. I follow these steps (I sent the commands from jupyter-notebook -in python language- to terminal using os.system, and os.popen -for got outputs of terminal- ): (1st) Ask for…
0
votes
0 answers

Find all possible "real" word combinations from list in Python, up to x amount of words

I've been experimenting with itertools, combinations and enchant to find all possible (English) words from a list of characters, up to a set (x) amount of words, with no character limit for each word. Can't seem to find/create what I am looking for.…
0
votes
1 answer

Heroku Buildpack directory missing after creation in compile step

I have a buildpack make to compile enchant dictionaries, and it's having issues having the directory persisting after the dyno deployment. Below is the relevant snippet. DEFAULT_DIR_ENCHANT_DICTS="/app/.enchant/myspell" mkdir -p…
kckaiwei
  • 416
  • 7
  • 18
0
votes
1 answer

Similar Package like Enchant in R

I have a query. There is a package in python called "Enchant" Enchant is a module in python which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a word exists…
0
votes
1 answer

ignore punctuation when checking if a word is an English word

I am looking for the best way to correct potential misspells for words in a string, without taking the punctuation into account. I do not want to strip it before doing that evaluation as this would alter the final edited string. My current approach…
Asddfg
  • 237
  • 3
  • 13
0
votes
2 answers

COLAB ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

Could anyone please help me to fix this? I am trying to install pyenchant in colab to perform a possible suggestion if a word is spelled wrongly. I would like to use pyenchant. This is what I tried; !pip install pyenchant==1.6.8 but it output the…
Mass17
  • 1,555
  • 2
  • 14
  • 29
0
votes
1 answer

Not able to import enchant on jupyter notebook

I have created a different environment for python 3.6.7 32-bit Windows for pyenchant. I have done pip install pyenchant. It was successfully installed. From the command prompt I am able to import the library and also run the example. But when from…
0
votes
1 answer

IndexError: list index out of range - enchant

I'm trying to use python to correct the spelling of a large corpus (about 100000 phrases): Having bought a large carpet I was expecting a large package accordingly and surprised by its very small size I wanted to verify that the content was…
marin
  • 923
  • 2
  • 18
  • 26
0
votes
1 answer

Incorrect output using count on text file spelling errors

I am trying to count the number of spelling errors in a number of text files in a directory, using python and enchant. This is my code: for file in os.listdir(path): if file.endswith(".txt"): f = open(file, 'r', encoding = 'Latin-1') …
firefly
  • 339
  • 2
  • 10
0
votes
1 answer

wamp installation existing warning for opcache and enchant

I installed the wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b.exe under windows 10. When i start up, i found that the plugin opcache and enchant existing warning flag. At the same time, I found there php error log: [18-Mar-2016 12:40:29…
Ming Yan
  • 1
  • 1
0
votes
2 answers

Py2exe enchant error

Hi i compiled my python script that includes enchant and when i try to execute my program i get the following error ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel…
Agis Soleas
  • 343
  • 1
  • 4
  • 21
0
votes
1 answer

Enchant does not work on wamp server, compilation error

I have enabled enchant on my wamp server(V 2.4.9), I am using PHP(V 5.5.12), when I start the server I get the following warning: PHP Startup:enchant: Unable to initialize module Module compiled with module API=20100525, PHP compiled with module…
dreamPr
  • 321
  • 1
  • 2
  • 14
0
votes
1 answer

TinyMce 4 spellcheck - enchant couldn't find dictionary

I've a strange problem with the latest TinyMce 4 spellchecker plugin - it couldn't find the dictionary files. I've downloaded the dictionaries from the textmaker repo and placed them under tinymce/plugins/spellchecker/dicts. The returned error is: …
user3845133
0
votes
1 answer

Installing Enchant Library + PyEnchant

I'm currently trying to install the Enchant library in order to use it with PyEnchant for a project I'm working on. I've checked out the source from the official SVN repo and found a document instructing me how to correctly build the source into a…
TOFFster
  • 53
  • 3
  • 9
0
votes
1 answer

Enchant.Js Frame issue

Im creating a game, and found some problem, see Line 4, i declare attackFrame variable, means when its in attack mode, the frame change into this sequence, and in line 15 I change it back to normal frame, But after this step, when it go back into…