While executing the NER assignment, label_vectorizer, I am getting an error,
TypeError: ‘dict’ object is not callable
Please see attached screenshot.
While executing the NER assignment, label_vectorizer, I am getting an error,
TypeError: ‘dict’ object is not callable
Please see attached screenshot.
You are using incorrect label vectorizer function key
Check point 1 in the below pinned comment.
Regards
DP
I didn’t mention to use value of -1 to be added to label_ids.
Read the instructions carefully
Hi @Deepti_Prasad Are you referring to this portion of the code?
image removed as it has grade cell codes and posting any codes is against community guidelines
Even with 0, the same error is seen.
please don’t post codes on public post. you were allowed to post code for your previous assignment because it was not graded.
you are not reading instructions carefully.
This is what I wrote in that post
for GRADED FUNCTION: label_vectorizer
You have mentioned the below code for element id as empty list
Use the dictionaty tag_map passed as an argument to the label_vectorizer function
element_ids =
HOW TO CORRECT:
The tag_map is a dictionary that maps the tags that you could have to numbers. Run the cell below to see the possible classes you will be predicting. So Use the tag_maps.get function to the token with the corresponding value of -1 under the for token loop
it clearly mentions to use value -1 for element_ids
your code is still incorrect for element_ids
when instruction me tions between tags and numbers, that doesn’t mean you are suppose to use numbers only there, at this place you are suppose to use the value -1.
in the label IDs you only require to pad the element without mentioning any value.
Regards
DP
you actually hard coded the path.
the instruction where it mentions use dictionary
there for element_ids = [ Your code should come here for the instruction I mentioned with tag_map.get keys, where you tag, number it should tag, -1]
then in label_ids, before the grade cell instructions clearly mentions to use value of -1