cgpotts / cs224u

Code for Stanford CS224u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minor error in sanity check test_op_unigrams_phi

neodelphis opened this issue · 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!