Skip to main content

EnchantX

An extension of pyenchant package to serve better.

What is EnchantX?

This package is an extension of PyEnchant (which provides a set of Python language bindings for the Enchant spellchecking library). This package is extended to provide most appropriate suggestions based on given text. EnchantX Visualizer is available on the EnchantX website:

http://enchantx.live/

What is Enchant?

Enchant is used to check the spelling of words and suggest corrections for words that are miss-spelled. It can use many popular spellchecking packages to perform this task, including ispell, aspell and MySpell. It is quite flexible at handling multiple dictionaries and multiple languages.

More information is available on the Enchant website:

http://www.abisource.com/enchant/

How do I install it?

Install the package using pip::

$ pip install enchantx

This package will also install its dependency of pyenchant package which bundle a pre-built copy of the underlying enchant library. Users on other platforms will need to install "enchant" using their system package manager (brew on macOS).

Once the software is installed, python's on-line help facilities can get you started. Launch python and issue the following commands:

>>> import enchantx
>>> help(enchantx)

Note: EnchantX requires binary file "GoogleNews-vectors-negative300.bin" to work correctly. By default, It will try to search for the file in the following locations:

  1. "/home/<$user>/.enchantx/"
  2. Inside current working directory

It is recommended to provide the path of binary file while creating the XDict Object.

How do I use it?

>>> import enchantx
>>> spellchecker = enchantx.XDict("/home/ubuntu/GoogleNews-vectors-negative300.bin")
>>> spellchecker.check("wofl")
False
>>> spellchecker.suggest("wofl")
['Wolf', 'wolf', 'wool', 'FOFL', 'ROFL']


>>> example = "quanfiction movie"
>>> spellchecker.check("movie")
True
>>> spellchecker.check("quanfiction")
False

>>> spellchecker.suggest("quanfiction")
['qualification', 'quantification', 'nonfiction']

>>> spellchecker.smart_suggest(word="quanfiction", next_word="movie")
['nonfiction', 'qualification', 'quantification']

Release files for EnchantX 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for EnchantX 0.1.1
File Interpreter ABI Platform
EnchantX-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / EnchantX-0.1.1-py3-none-any.whl

Download URL EnchantX-0.1.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73b4e86bbfeed52f1411ca10e1f1f605cb68e8e91e19d30269f91446154e1765
BLAKE2b-256 checksum
How to use checksums
531f6222c562d51c0f34e45049a2f18452809f9aef612e5b479f46b854b70792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page