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
History.md Initial commit
Makefile add train.js
Readme.md
index.js add index.js implementation
memory.json Add CoffeeScript language
package.json add classifier dep
train.js add 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.