-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom paths for corpus data #467
Comments
@gunthercox Planning to write like this, any suggestions/comments? @@ -9,6 +9,7 @@ class Trainer(object):
def __init__(self, storage, **kwargs):
self.storage = storage
+ self.corpus_path = None
self.logger = logging.getLogger(__name__)
def train(self, *args, **kwargs):
@@ -54,6 +55,10 @@ class Trainer(object):
return result
+ def import_for_training(self, file_path):
+ self.corpus_path = file_path
+
+
def export_for_training(self, file_path='./export.json'):
"""
Create a file from the database that can be used to
@@ -100,7 +105,7 @@ class ChatterBotCorpusTrainer(Trainer):
super(ChatterBotCorpusTrainer, self).__init__(storage, **kwargs)
from .corpus import Corpus
- self.corpus = Corpus()
+ self.corpus = Corpus(self.corpus_path)
def train(self, *corpora):
trainer = ListTrainer(self.storage) |
@vkosuri Looks good to me 👍 |
I like this to be integrated asap! |
Sure 👍
…On 21-Dec-2016 12:18, "Raja Simon" ***@***.***> wrote:
I like this to be integrated asap!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#467 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANCAAcCoRG0Rs25sLHEnQ1s10oB_fRpaks5rKMvbgaJpZM4LEHSY>
.
|
Can you make the pull request so I can check it and also does it support for adding my own custom adapters...? i.e)
|
Sorry for my prev message I just saw this https://chatterbot.readthedocs.io/en/stable/logic/create-a-logic-adapter.html#directory-structure |
@vkosuri Shall I have the patch now ? |
Sure
|
I think it would be good option to specify custom paths for corpus data, currently its system specified path only
The text was updated successfully, but these errors were encountered: