Browse files

* Added Travis button

* Fixed node 0.6 build
  • Loading branch information...
1 parent e92762c commit 9c6dd8e59203e9a3bc094a6205464167645d33f4 @dachev committed Jan 14, 2012
Showing with 9 additions and 3 deletions.
  1. +1 −2 README.md
  2. +8 −1 test/runner.js
View
3 README.md
@@ -1,6 +1,5 @@
-
# CLD
-
+[![Build Status](https://secure.travis-ci.org/dachev/cld.png)](http://travis-ci.org/#!/dachev/cld)
A straight port of the CLD (Compact Language Detector) library embedded in Google's Chromium browser. The library detects the language from provided Javascript string. It's implemented in C++, with very basic Node bindings. Original work by [Mike McCandless](http://code.google.com/p/chromium-compact-language-detector/)
View
9 test/runner.js
@@ -1,9 +1,16 @@
#!/usr/bin/env node
-var cld = require('../build/default/cld');
+var cld = null;
var data = require('./data');
var assert = require('assert');
+try {
+ cld = require('./build/default/cld');
+} catch(e) {
+ // node v0.5.5+
+ cld = require('./build/Release/cld');
+}
+
function runOne(expectedLangName, text, shouldBeReliable) {
var detectionResult = cld.detect(text);

0 comments on commit 9c6dd8e

Please sign in to comment.