diff --git a/chatter/chatterbot/chatterbot.py b/chatter/chatterbot/chatterbot.py index 765e47c..988482f 100644 --- a/chatter/chatterbot/chatterbot.py +++ b/chatter/chatterbot/chatterbot.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import logging -from . import utils +from chatter.chatterbot import utils from chatter.chatterbot.input import InputAdapter from chatter.chatterbot.output import OutputAdapter from chatter.chatterbot.storage import StorageAdapter @@ -139,7 +139,7 @@ class ChatBot(object): """ Learn that the statement provided is a valid response. """ - from .conversation import Response + from chatter.chatterbot.conversation import Response if previous_statement: statement.add_response( diff --git a/chatter/chatterbot/comparisons.py b/chatter/chatterbot/comparisons.py index 59efa95..5e253a0 100644 --- a/chatter/chatterbot/comparisons.py +++ b/chatter/chatterbot/comparisons.py @@ -92,7 +92,7 @@ class SynsetDistance(Comparator): """ Download required NLTK corpora if they have not already been downloaded. """ - from .utils import nltk_download_corpus + from chatter.chatterbot.utils import nltk_download_corpus nltk_download_corpus('corpora/wordnet') @@ -100,7 +100,7 @@ class SynsetDistance(Comparator): """ Download required NLTK corpora if they have not already been downloaded. """ - from .utils import nltk_download_corpus + from chatter.chatterbot.utils import nltk_download_corpus nltk_download_corpus('tokenizers/punkt') @@ -108,7 +108,7 @@ class SynsetDistance(Comparator): """ Download required NLTK corpora if they have not already been downloaded. """ - from .utils import nltk_download_corpus + from chatter.chatterbot.utils import nltk_download_corpus nltk_download_corpus('corpora/stopwords') @@ -177,7 +177,7 @@ class SentimentComparison(Comparator): Download the NLTK vader lexicon for sentiment analysis that is required for this algorithm to run. """ - from .utils import nltk_download_corpus + from chatter.chatterbot.utils import nltk_download_corpus nltk_download_corpus('sentiment/vader_lexicon') @@ -252,7 +252,7 @@ class JaccardSimilarity(Comparator): Download the NLTK wordnet corpora that is required for this algorithm to run only if the corpora has not already been downloaded. """ - from .utils import nltk_download_corpus + from chatter.chatterbot.utils import nltk_download_corpus nltk_download_corpus('corpora/wordnet') diff --git a/chatter/chatterbot/trainers.py b/chatter/chatterbot/trainers.py index 042019e..f3a4165 100644 --- a/chatter/chatterbot/trainers.py +++ b/chatter/chatterbot/trainers.py @@ -2,8 +2,8 @@ import logging import os import sys -from . import utils -from .conversation import Statement, Response +from chatter.chatterbot import utils +from chatter.chatterbot.conversation import Statement, Response class Trainer(object): @@ -127,7 +127,7 @@ class ChatterBotCorpusTrainer(Trainer): def __init__(self, storage, **kwargs): super(ChatterBotCorpusTrainer, self).__init__(storage, **kwargs) - from .corpus import Corpus + from chatter.chatterbot.corpus import Corpus self.corpus = Corpus() diff --git a/chatter/chatterbot/utils.py b/chatter/chatterbot/utils.py index e18549e..9785bd4 100644 --- a/chatter/chatterbot/utils.py +++ b/chatter/chatterbot/utils.py @@ -46,7 +46,7 @@ def validate_adapter_class(validate_class, adapter_class): :raises: Adapter.InvalidAdapterTypeException """ - from .adapters import Adapter + from chatter.chatterbot.adapters import Adapter # If a dictionary was passed in, check if it has an import_path attribute if isinstance(validate_class, dict):