# Path: lingtools/util/datamanager.py
# def download(url, path=None):
# def unzip(filepath, destpath='.'):


import re
import sys
    import doctest
from lingtools.util import datamanager
                          dict_path)

        for line in dict_file:
            # Skip comments
            if line.startswith(";;;"):
                continue

            # Split the line on double space
            try:
                (word, pron) = line.rstrip().split("  ")
            except ValueError:
                print >> sys.stderr, "Unreadable line in dictionary:", repr(line.rstrip())
                continue

            # If the word is an alternate pron, skip it
            if CMUDict.ALT_RE.match(word):
                continue

            # Reformat
            word = word.lower()
            pron = pron.split()

            # Store the word
            self[word] = pron

        dict_file.close()


def download():
    """Download a current version of CMUDict to the working directory."""

# Path: lingtools/util/datamanager.py
# def download(url, path=None):
# def unzip(filepath, destpath='.'):


# Path: lingtools/corpus/cmudictreader.py
import re
import sys
    import doctest
from lingtools.util import datamanager

                          dict_path)

        for line in dict_file:
            # Skip comments
            if line.startswith(";;;"):
                continue

            # Split the line on double space
            try:
                (word, pron) = line.rstrip().split("  ")
            except ValueError:
                print >> sys.stderr, "Unreadable line in dictionary:", repr(line.rstrip())
                continue

            # If the word is an alternate pron, skip it
            if CMUDict.ALT_RE.match(word):
                continue

            # Reformat
            word = word.lower()
            pron = pron.split()

            # Store the word
            self[word] = pron

        dict_file.close()


def download():
    """Download a current version of CMUDict to the working directory."""

    datamanager.download(CMUDICT_URL)