Skip to content

eteamin/async_faspell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-faspell

image

Documentation

faspell is an async library for providing suggestion for Persian spellchecking.

Usage

Here is a simple example to see how to use this library:

import asyncio
import aiofiles

from faspell.spell_checker import SpellChecker

# Hint: database is supposed to be a text file containing persian words separated by \n. e.g. سلام\nسیب\nدرخت
async def test_spellchecker():
   async with aiofiles.open(path_to_db, 'r') as db:
      sp = SpellChecker(await db.read())
      corrected = await sp.correct('متغاضی')
      print(corrected)

loop = asyncio.get_event_loop()
loop.run_until_complete(test_spellchecker())

Produces

['متقاضی']

About

Farsi spellchecker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages