Skip to content
Programming language classifier for node.js
Objective-C C++ CoffeeScript Python C JavaScript Other
Latest commit 4318181 Dec 11, 2012 @tj Merge pull request #1 from aardvarrk/master
Added CoffeeScript
Failed to load latest commit information.
test
training-set Add CoffeeScript language Nov 17, 2012
.gitignore add better-assert Nov 16, 2012
.npmignore
History.md
Makefile
Readme.md
index.js
memory.json
package.json add classifier dep Nov 16, 2012
train.js

Readme.md

language-classifier

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

Installation

$ npm install language-classifier

Example

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

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

lang('Foo.prototype.bar = function(){}');
// => "javascript"

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

Training

To train simply invoke make memory.

Supported languages

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

License

MIT

Something went wrong with that request. Please try again.