web mining: last update for keaddon
This commit is contained in:
parent
bc50b297ea
commit
994b78ac56
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user