Rosetta is a naive bayes classifier that analyzes source files to determine the programming language. To do this it has to be trained with a large set of language samples.