diff --git a/checker.js b/checker.js
index 52a1342..ee9aba9 100644
--- a/checker.js
+++ b/checker.js
@@ -124,6 +124,15 @@ function loadFiles(files) {
});
}
result = result.then(() => {
+ console.log("Unknown words:");
+ console.log(token);
+
+ let words = [];
+ for (let k of Object.keys(token).sort()) {
+ words.push("
" + k.replace("<", "<").replace(">", ">") + ": " + token[k] + "
");
+ }
+ addListItem("" + words.join("") + "");
+
setStatusText("Completed!", 2000);
});
}
@@ -267,6 +276,15 @@ function checkTranslation(s, t, lang) {
if (tokenizer) {
var path = tokenizer.tokenize(t);
+ var w;
+ for (let t of path) {
+ w = t.surface_form;
+ if (isNaN(w) && t.word_type == "UNKNOWN") {
+ if (t.indexOf(w) == -1) {
+ token[w] = (token[w] === undefined) ? 1 : token[w] + 1;
+ }
+ }
+ }
console.log(path);
}