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
  • Hiring developers?
  1. Prepare
  2. Artificial Intelligence
  3. Natural Language Processing
  4. Language Detection

Language Detection

Problem
Submissions
Leaderboard
Discussions

Given a snippet of text in English, French, German, or Spanish, detect the snippet's language and print the language name. You may build an offline model for this. The snippet may contain one or more lines.

You may make no more than 15 submissions for this problem, during the contest.

Input Format

One or more lines of text.

Constraints

Output Format

Print the snippet's language (in Title Case, as written above) on a new line.

Sample Input

The story of Rip Van Winkle is set in the years before and after the American Revolutionary War. In a pleasant village, at the foot of New York's Catskill Mountains, lives kindly Rip Van Winkle, a Dutch villager. Van Winkle enjoys solitary activities in the wilderness, but he is also loved by all in town—especially the children to whom he tells stories and gives toys. However, he tends to shirk hard work, to his nagging wife's dismay, which has caused his home and farm to fall into disarray. One autumn day, to escape his wife's nagging, Van Winkle wanders up the mountains with his dog, Wolf. Hearing his name called out, Rip sees a man wearing antiquated Dutch clothing; he is carrying a keg up the mountain and requires help. 

Sample Output

English

Explanation

The text snippet's language is English.

Author

PRASHANTB1984

Difficulty

Medium

Max Score

25

Submitted By

702

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