A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://textblob.readthedocs.io/en/dev/_modules/textblob/exceptions.html below:

textblob.exceptions — TextBlob 0.19.0 documentation

Source code for textblob.exceptions
MISSING_CORPUS_MESSAGE = """
Looks like you are missing some required data for this feature.

To download the necessary data, simply run

    python -m textblob.download_corpora

or use the NLTK downloader to download the missing data: http://nltk.org/data.html
If this doesn't fix the problem, file an issue at https://github.com/sloria/TextBlob/issues.
"""



[docs]
class TextBlobError(Exception):
    """A TextBlob-related error."""

    pass



TextBlobException = TextBlobError  # Backwards compat



[docs]
class MissingCorpusError(TextBlobError):
    """Exception thrown when a user tries to use a feature that requires a
    dataset or model that the user does not have on their system.
    """

    def __init__(self, message=MISSING_CORPUS_MESSAGE, *args, **kwargs):
        super().__init__(message, *args, **kwargs)



MissingCorpusException = MissingCorpusError  # Backwards compat



[docs]
class DeprecationError(TextBlobError):
    """Raised when user uses a deprecated feature."""

    pass




[docs]
class TranslatorError(TextBlobError):
    """Raised when an error occurs during language translation or detection."""

    pass




[docs]
class NotTranslated(TranslatorError):
    """Raised when text is unchanged after translation. This may be due to the language
    being unsupported by the translator.
    """

    pass




[docs]
class FormatError(TextBlobError):
    """Raised if a data file with an unsupported format is passed to a classifier."""

    pass


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4