News for hackers. Stuff that matters.
Re:GitHub's language detection is broken by dclowd9901 on Friday March 14, 2014 @09:33AM (#7398579)
I think if I was writing a language detector, it would have these features:

- learning heuristics based on user suggestion.

- extension filtering to differentiate similar languages.

- the algo would use prominence and placement of white space and non-word characters to create the DNA of a language. If the language scores below a threshold against the DNA, it doesn't presume, it asks the user. If a language scores high against this DNA, it still allows used override. Whenever a user would submit their indicator, its file source would be used to train the heuristic.

Re:GitHub's language detection is broken by Allan_Smithee on Friday March 14, 2014 @09:41AM (#7398624)
This is because you likely think before you code.