web mining: last update for keaddon

This commit is contained in:
Michael Scholz 2013-05-05 13:12:02 +02:00
parent bc50b297ea
commit 994b78ac56
3 changed files with 3 additions and 7 deletions

View File

@ -30,10 +30,6 @@ function student(text) {
}
console.log("german: " + deWordCount);
console.log("english: " + enWordCount);
console.log("french: " + frWordCount);
// return specific language
if (deWordCount >= enWordCount && deWordCount >= frWordCount) {
return lang.german;

View File

@ -10,9 +10,9 @@ function tokenize(text) {
}
function arrayContains(a, obj) {
for (var i = 0; i < a.length; i++) {
if (a[i] === obj) {
function arrayContains(array, element) {
for (var i = 0; i < array.length; i++) {
if (array[i] === element) {
return true;
}
}