There was a problem compiling the code from your notebook. Details: name 'sentences' is not defined

I’m getting this problem even though I’m using something called “sentences.” Can you help?

Hello @Emrah_Cetin ,

Welcome to the community!!

Yeah sure!
Send me your notebook via dm such that I can check where it went wrong.By clicking on the profile picture, you will see an option to message.There you can attach your notebook. Then we can discuss the issues here, under the topic you created.

With regards,
Nilosree Sengupta

Hello @Emrah_Cetin ,

I have gone through ur notebook.

Under the function def parse_data_from_file(filename) :

You don’t need to again write code to remove stopwords separately. Just use the function written in previous cell directly.
In the hint it’s given:

Use the remove_stopwords function in each sentence.

You haven’t done this.

Rest all are correct.

After that it doesn’t work, kindly go through following links:

With regards,
Nilosree Sengupta

I did everything you said, unfortunately I always get the same error.

Hello @Emrah_Cetin ,

Kindly send ur updated notebook to me again.

With regards,
Nilosree Sengupta

[code removed by mentor]

Hello @Emrah_Cetin ,

Wish you a very Happy New Year!!

I have reciprocated the same from my end using your codes. I am not getting any such error - “name ‘sentences’ is not defined”

Btw your notebook has 1 thing missing: Under def fit_tokenizer(sentences):
You have not passed the <OOV> in the oov_token argument

I am getting 100% grade using your codes with just 1 modification that is just passing <OOV> in the oov_token argument.

If it doesn’t work still , kindly go through following links again :

But still if you don’t get 100%, feel free to let us know.

With regards,
Nilosree Sengupta

1 Like

Hello @Emrah_Cetin ,

Is your problem solved?
If not, feel free let us know!

With regards,
Nilosree Sengupta

Yes, I solved my problem, thank you very much for your help.

Hello @Emrah_Cetin ,

That’s great! You’re welcome!

With regards,
Nilosree Sengupta

1 Like