C3_W2 Natural Language Entity Extraction got incorrect grade

Hi guys!
I completed the Natural Language Entity Extraction but the autograder give me incorrect function in the # UNQ_C3 and # UNQ_C4 even if the test were passed. I try to donwload the complete notebook but i didnt find the root cause. Can you help me?


can you show what is grader output for those two cells you are mentioning having issue.

A screenshot of the grader output.

Hi deepti,
yes of course this is the screenshot

Whenever this kind of error comes, it means although you are passing the test, the auto-grader has programmed that grader cell in a particular pattern and when it is not similar to the pattern they have set the codes, you will get this error.

Yeah i suspected that, but i can’t download the full code right now and i wasnt be able to check

Hello Alberto,

UNQ_C3 errors

  1. Create an input mask which has integer 1 for each token in the β€˜tokens’ list
    input_mask = [1 for token in tokens]

input_ids, which holds the numerical ids of each token. So using input_ids create the list but with right function to make the token list, which would be??

  1. for the below code, this is probably a mistake you did by unknowingly, you have used incorrect input while masking to its max length :slight_smile:
    Do the same to pad the input_mask so its length is max_seq_length

  2. UNQ_C4 error
    The range for i is incorrect here as
    In words, this formulas is saying, calculate the sum and start scores of start position β€˜i’ and end position β€˜j’, given the constraint that the start β€˜i’ is either before or at the end position β€˜j’; then find the positions β€˜i’ and β€˜j’ where this sum is the highest

set the range for i
for i in range(1,n): # complete this line


1 Like

Thanks Deepti