Skip to content
Programming language classifier for node.js
Objective-C C++ CoffeeScript Python C JavaScript Other
Find file
Latest commit 4318181 @tj Merge pull request #1 from aardvarrk/master
Added CoffeeScript
Failed to load latest commit information.
test fix test runner labels
training-set Add CoffeeScript language
.gitignore add better-assert
.npmignore npmignore training-set Initial commit
Makefile add train.js
index.js add index.js implementation
memory.json Add CoffeeScript language
package.json add classifier dep
train.js add train.js


Programming language classifier based on harthur's Bayesian classifier module.


$ npm install language-classifier


var lang = require('language-classifier');

lang('for link in links:');
// => "python"

lang(' = function(){}');
// => "javascript"

lang('#include <stdio.h>');
// => "c"


To train simply invoke make memory.

Supported languages

  • ruby
  • python
  • javascript
  • objective-c
  • html
  • css
  • shell
  • c++
  • c
  • coffee-script



Something went wrong with that request. Please try again.