I'm 98% sure that Google has an API for detecting the language of CODE blocks, much like this, but for code. I found it before, but I can't seem to find it again. Surprisingly difficult to find. Anyone have a link?
+1
A:
Google Code Search uses meta data to 'make sure' (see http://www.google.com/help/codesearch_packagemap.html) but I don't know what they use to autodetect.
John Sheehan
2009-07-22 05:58:00
How do you know Google code search doesn't detect the language? From that page, "Our software locates source code files within those archives, and *detects the language* and license". Although I don't know if that's just based on file extension. How does prettify guess the language?
Mark
2009-07-22 06:08:55
You're right. I assumed from the FAQ that the package files were what it used, but it only uses those to 'make sure' http://www.google.com/help/faq_codesearch.html#packagemap
John Sheehan
2009-07-22 06:11:22