diff --git a/week03_lm/seminar.ipynb b/week03_lm/seminar.ipynb index 90297594..7c2df9a3 100644 --- a/week03_lm/seminar.ipynb +++ b/week03_lm/seminar.ipynb @@ -191,7 +191,10 @@ "assert len(dummy_counts[('_UNK_', '_UNK_')]) == 78\n", "assert dummy_counts['_UNK_', 'a']['note'] == 3\n", "assert dummy_counts['p', '=']['np'] == 2\n", - "assert dummy_counts['author', '.']['_EOS_'] == 1" + "assert dummy_counts['author', '.']['_EOS_'] == 1\n", + "\n", + "single_counts = count_ngrams(dummy_lines, n=1)\n", + "assert single_counts[()][EOS] == len(dummy_lines)" ] }, {