This would be fairly easy to implement using the existing searchcode API (already a DDH plugin) and not require additional software installed.

You just need to pass the snippet though like so

and then sum up each of the types to make a guess as to the language. Assuming its a real snippet it would work fairly well as all the language detection is already done with support for over 80 languages.
posted by [UserVoice Anonymous] • 5 years and 6 months ago Link