language-detection
How to detect language of user entered text? [closed]
This Language Detection Library for Java should give more than 99% accuracy for 53 languages. Alternatively, there is Apache Tika, a library for content analysis that offers much more than just language detection.
What differences, if any, between C++03 and C++11 can be detected at run-time?
Core Language Accessing an enumerator using ::: template<int> struct int_ { }; template<typename T> bool isCpp0xImpl(int_<T::X>*) { return true; } template<typename T> bool isCpp0xImpl(…) { return false; } enum A { X }; bool isCpp0x() { return isCpp0xImpl<A>(0); } You can also abuse the new keywords struct a { }; struct b { a a1, … Read more
Detecting programming language from a snippet [closed]
I think that the method used in spam filters would work very well. You split the snippet into words. Then you compare the occurences of these words with known snippets, and compute the probability that this snippet is written in language X for every language you’re interested in. http://en.wikipedia.org/wiki/Bayesian_spam_filtering If you have the basic mechanism … Read more