4 ms·
It'd be useful to use the histograms to distinguish between different programming languages for automatic language detections of something like gists.
by iamwil 14y ago
It'd be useful to use the histograms to distinguish between different programming languages for automatic language detections of something like gists.
- obtu 14y agohighlight.js [1] does this, though by running highlighters rather than using some learning-based mechanism. It feels wasteful to run this on display rather than storage, though. SourceClassifier [2] also works, though with less languages. And here's [3] an implementation made with Bayes and Go. [1] http://softwaremaniacs.org/soft/highlight/en/ http://softwaremaniacs.org/soft/highlight/en/ http://softwaremaniacs.org/media/soft/highlight/test.html http://softwaremaniacs.org/media/soft/highlight/test.html [2] http://blog.chrislowis.co.uk/2009/01/04/identify-programming-languages-with-source-classifier.html http://blog.chrislowis.co.uk/2009/01/04/identify-programming... [3] https://github.com/octplane/go-code-classifier https://github.com/octplane/go-code-classifier