ALL the imports

pull/13/head
bobloy 7 years ago
parent 5d9ea59386
commit 6364b209d1

@ -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(

@ -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')

@ -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()

@ -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):

Loading…
Cancel
Save