I have go the following error? Any advice?
Hi @pongyuenlam,
At this stage, you should debug your code by printing intermediate values at each step, from variable definition to its usage. This will help you identify why you are comparing a string variable to an integer variable using <
. Feel free to share your code with me in Private Messages, and I can provide more specific assistance.
Hope this helps! Feel free to ask if you need further assistance.
Hello @pongyuenlam
I found a similar discussion on the forum. Kindly check
Hi @pongyuenlam
So you are doing course in reverse order You already completed Course 3 I suppose of NLP.
In case the issue still persist, the link shared by @jenitta.jebaraj is a good one but chances of your error encounter could be also from different code lines than mentioned in the linked comment.
So before to make debug the code first you need to understand the difference between string and integer.
Strings is more often used to store textual information, such as names, addresses, and descriptions. They are always enclosed in quotation marks in most programming languages, either single quotes (’ ') or double quotes (“ “) where as an integer, on the other hand, is a whole number that can be either positive, negative, or zero.
So go back and check in UNQ_C1 GRADED FUNCTION: create_dictionaries, if you did not creates a tag or tag counts that includes integer and string values. The best way to check is as mentioned by the mentor @Alireza_Saei to include #print statement below codes where you could suspect such mistake and resolve your issue.
If the issue still persist, you can send codes to check to the mentor who asked you first for reviewing. If still issue persist or you not able to understand, let me know.
Regards
DP
@Deepti_Prasad Yes, I had completed course one, NLP with Classification and Vector Spaces, and course four, NLP with Attention Models, at Deeplearning.ai because I had to learn about these topics for a NLP course at Stanford. I have completed the Stanford NLP course now, and so I am back to learn about course two and course three of NLP at Deeplearning.ai. Alireaz has helped me to identify one code error in the index for tag_counts. So, I can pass exercise 3 now. It is a great community here. Thank you!