Why is the accuracy less?

I compared all the jokes. Each joke is correct. I removed the commas from each joke because of csv.

kindly provide your jokes.csv file , which you are using to check accuracy.

For any file that I upload, it is giving an accuracy of 52%

kindly provide a link to your code so that i am able to have a look on your approach and understand if there is any mistake.

Hey @rustagi.abhin ,
Kindly your code file if your doubt is not yet resolved.

Please check the link

hey @rustagi.abhin ,
The problem is that it is not necessary that you ave to remove all the comma’s from sentences.
Just give it a try don’t remove these commas if they are in between a sentence , and then upload your .csv file , and see what result do you achieve.

and one thing more , you can directly use pandas feature to generate csv from json , it will help you to reduce your line of code for generating that all_data.csv file .

Thank You.
Happy learning :slight_smile:.

I uploaded one without removing the commas. Still the same accuracy

hey can you please upload your code file ,that you used to submit data without commas. Kindly share the link again.

Hey @rustagi.abhin, I checked your code and have edited it so that you will be able to generate a csv file that gives 100% accuracy. I am sending you a pull request , you can refer to that code.

The problem with your code earlier was that you removed all the commas and hence got only 52% accuracy(as the jokes containing commas originally did not match with your solution) . Then when you did not remove the commas , the csv file you generated was not generated properly. The csv file splits into columns depending upon the comma. So the jokes containing commas got splitted into 2 or more columns.

The right approach for this is to use pandas DataFrame for generating the csv file.

Hope this helps.
All the best :slight_smile:

Thank you @Aayushkh_333 , for helping @rustagi.abhin to understand what actually was the problem in his code.

@rustagi.abhin , if your doubt is resolved, then kindly mark this doubt as resolved and also do provide your valuable feedback to help us to improve this platform and provide you with better learning experience.

Thank You.
Happy Coding :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.