We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home
  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Artificial Intelligence
  3. Natural Language Processing
  4. Similarity Scores

Similarity Scores

Problem
Submissions
Leaderboard
Discussions

You are provided with four documents, numbered 1 to 4, each with a single sentence of text. Determine the identifier of the document which is the most similar to the first document, as computed according to the TF-IDF scores.

  1. I'd like an apple.
  2. An apple a day keeps the doctor away.
  3. Never compare an apple to an orange.
  4. I prefer scikit-learn to orange.

Output the integer (which may be either 2 or 3 or 4), leaving no leading or trailing spaces.

You may either compute the answer manually and submit it in plain-text mode, or submit a program which computes the answer, in a language of your choice.

Author

PRASHANTB1984

Difficulty

Hard

Max Score

10

Submitted By

2104

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Helpdesk
  • Careers
  • Terms Of Service
  • Privacy Policy

Cookie support is required to access HackerRank

Seems like cookies are disabled on this browser, please enable them to open this website