How to use the unidic.DICDIR function in unidic

To help you get started, we’ve selected a few unidic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SamuraiT / mecab-python3 / src / MeCab / __init__.py View on Github external
def try_import_unidic():
    """Import unidic or unidic-lite if available. Return dicdir.

    This is specifically for dictionaries installed via pip.
    """
    try:
        import unidic
        return unidic.DICDIR
    except ImportError:
        try:
            import unidic_lite
            return unidic_lite.DICDIR
        except ImportError:
            # This is OK, just give up.
            return

unidic

UniDic packaged for Python

MIT
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Popular unidic functions

Similar packages