Why does the test expect -1 instead of <unk>

In assigment for week 3. the test seem to expect and checks for (-1) instead on . I think my answer is correct. why is the test is expecting (-1)

Wrong number of unknown tokens in the corpus. Check the unknown token value and how you are using it.
Expected: 5
Got: 0.
Wrong output values.
Expected: [[‘sky’, ‘is’, ‘blue’, ‘.’], [‘-1’, ‘are’, ‘-1’, ‘.’], [‘space’, ‘is’, ‘infinite’, ‘-1’], [‘-1’, ‘-1’, ‘sky’, ‘is’, ‘red’]]
Got: [[‘sky’, ‘is’, ‘blue’, ‘.’], [‘’, ‘are’, ‘’, ‘.’], [‘space’, ‘is’, ‘infinite’, ‘’], [‘’, ‘’, ‘sky’, ‘is’, ‘red’]].

the above unk was formatted out by the email. Here is the outcome of the test

Expected: [[‘sky’, ‘is’, ‘blue’, ‘.’], [‘-1’, ‘are’, ‘-1’, ‘.’], [‘space’, ‘is’, ‘infinite’, ‘-1’], [‘-1’, ‘-1’, ‘sky’, ‘is’, ‘red’]]
Got: [[‘sky’, ‘is’, ‘blue’, ‘.’], [‘’, ‘are’, ‘’, ‘.’], [‘space’, ‘is’, ‘infinite’, ‘’, [‘’, ‘’, ‘sky’, ‘is’, ‘red’]]

this is the test w3_unittest.test_replace_oov_words_by_unk(replace_oov_words_by_unk)

the email is formating out unk to “” but why is the test is comparing to -1

Hi @Fares_Bagh

The test checks if you use the unknown_token= parameter value instead of hard coding <unk> token in your implementation.

In the particular case, one of the test case checks your function with unknown_token="-1" and if you hard coded the unknown token value in your implementation, you would fail the test.

Cheers

P.S. use \ for escaping characters (for example, \<unk> is displayed as <unk>)

Great. Thank you very much I completely missed the point that have unknown_token is a parameter.