|
37 | 37 | # .. code:: python |
38 | 38 | # |
39 | 39 | # > hello? |
40 | | -# bot: hello . |
| 40 | +# Bot: hello . |
41 | 41 | # > where am I? |
42 | | -# bot: you re in a hospital . |
| 42 | +# Bot: you re in a hospital . |
43 | 43 | # > who are you? |
44 | | -# bot: i m a lawyer . |
| 44 | +# Bot: i m a lawyer . |
45 | 45 | # > how are you doing? |
46 | | -# bot: i m fine . |
| 46 | +# Bot: i m fine . |
47 | 47 | # > are you my friend? |
48 | | -# bot: no . |
| 48 | +# Bot: no . |
49 | 49 | # > you're under arrest |
50 | | -# bot: i m trying to help you ! |
| 50 | +# Bot: i m trying to help you ! |
51 | 51 | # > i'm just kidding |
52 | | -# bot: i m sorry . |
| 52 | +# Bot: i m sorry . |
53 | 53 | # > where are you from? |
54 | | -# bot: san francisco . |
| 54 | +# Bot: san francisco . |
55 | 55 | # > it's time for me to leave |
56 | | -# bot: i know . |
| 56 | +# Bot: i know . |
57 | 57 | # > goodbye |
58 | | -# bot: goodbye . |
| 58 | +# Bot: goodbye . |
59 | 59 | # |
60 | 60 | # **Tutorial Highlights** |
61 | 61 | # |
@@ -159,9 +159,8 @@ def printLines(file, n=10): |
159 | 159 | # Create formatted data file |
160 | 160 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
161 | 161 | # |
162 | | -# Now it is time to use the functions that we defined above to create an |
163 | | -# appropriately formatted data file. Each line of this new file will |
164 | | -# contain a tab-separated *query sentence* and a *response sentence* pair. |
| 162 | +# For convenience, we'll create a nicely formatted data file in which each line |
| 163 | +# contains a tab-separated *query sentence* and a *response sentence* pair. |
165 | 164 | # |
166 | 165 | # The following functions facilitate the parsing of the raw |
167 | 166 | # *movie_lines.txt* data file. |
@@ -459,8 +458,8 @@ def trimRareWords(voc, pairs, MIN_COUNT): |
459 | 458 | # Prepare Data for Models |
460 | 459 | # ----------------------- |
461 | 460 | # |
462 | | -# Although we have spent a great effort preparing and massaging our data |
463 | | -# into a nice vocabulary object and list of sentence pairs, our models |
| 461 | +# Although we have put a great deal of effort into preparing and massaging our |
| 462 | +# data into a nice vocabulary object and list of sentence pairs, our models |
464 | 463 | # will ultimately expect numerical torch tensors as inputs. One way to |
465 | 464 | # prepare the processed data for the models can be found in the `seq2seq |
466 | 465 | # translation |
|
0 commit comments