summaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-09-10 18:57:00 -0700
committerAlex Yatskov <alex@foosoft.net>2016-09-10 18:57:00 -0700
commit05ac93128539cf4be5417a50728329c3ae070580 (patch)
treef9a4bfec98acec6343cce4e4da5010ab389ff0f6 /ext/bg/js/translator.js
parent133abb6f585bee94fcdee23689779042e3ccfd65 (diff)
Work on deinflector
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 5768c3d6..8938162a 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -59,12 +59,12 @@ class Translator {
for (let i = text.length; i > 0; --i) {
const term = text.slice(0, i);
const dfs = this.deinflector.deinflect(term, t => {
- const tags = [];
+ const tagSets = [];
for (const d of this.dictionary.findTerm(t)) {
- tags.push(d.tags);
+ tagSets.push(d.tags);
}
- return tags;
+ return tagSets;
});
if (dfs === null) {
@@ -114,7 +114,7 @@ class Translator {
length = Math.max(length, result.source.length);
}
- return {definitions: definitions, length: length};
+ return {definitions, length};
}
findKanji(text) {