Skip to main content

Tools for searching/indexing dictionaries

Project description

=== dictionary - Interface with system dictionary files ===

This is a GNU/Linux only library that uses dictionary files in “/usr/share/dict” to allow searching dictionaries.

For example, to get all nouns that start with the letter a in /usr/share/dict/american_english_small:

def a_nouns():
        en_us_small = dicttools.getDict("american_english_small")
        while not en_us_small.isFinished():
                time.sleep(1)
        en_us_small = en_us_small.getObject()
        for i in en_us_small.wordType('noun',[[dictionary.STARTS_WITH,'a']]):
                yield i

To get a dictionary, call dicttools.getDict(file: string) where file is a file in /usr/share/dict. You will recieve a DictionaryThread object.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ldicttools-0.1.0-py2.7.egg (5.3 kB) Copy SHA256 hash SHA256 Egg 2.7

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page