Testing and results

After training the model, we tested it against our test dataset and obtained reasonably coherent dialogue. There is one very important issue: the context of the communication. Hence, depending on the dataset that is used, the result will be in its context. For our context, the results that were obtained were very reasonable, and they satisfied our three measures of performance—informativeness (non-repeating turns), high coherence, and simplicity in answering (this is related to the forward-looking function).

import data_parserfrom gensim.models import KeyedVectorsfrom seq_model import Chatbotimport tensorflow as tfimport numpy as npimport helper as h

Next, declare the paths to the various model that are already trained.  ...

Get Python Reinforcement Learning Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.