cgpotts/cs224u

minor error in sanity check test_op_unigrams_phi

neodelphis opened this issue · 2 comments

in hw2_sst.ipynb

I think you meant amazing instead of enlightening in expected
(BTW: Thank you so much for your amazing work)

def test_op_unigrams_phi(func):
    tree = Tree.fromstring("""(4 (2 NLU) (4 (2 is) (4 amazing)))""")
    expected = {"enlightening": 1}
    result = func(tree)
    assert result == expected, \
        ("Error for `op_unigrams_phi`: "
         "Got `{}` which differs from `expected` "
         "in `test_op_unigrams_phi`".format(result))

@neodelphis Thank you for this, and my apologize for letting it sit for a while. A bug in a test – so painful!

Fixed with 30f1b25