summaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-08 15:33:45 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-08 15:33:45 -0800
commit148291d3a7cea096317c1c8d22f06f6e18cfdcfb (patch)
tree7ac7bb03cc980d3c1bd6cbdb84f6a8b6851012b9 /ext/bg/js/translator.js
parent0498ea5d361867f34b6b813178a39709e8bea68e (diff)
WIP
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index bdd606b7..8710f568 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -82,6 +82,12 @@ class Translator {
});
}
+ findTermGrouped(text, dictionaries, enableSoftKatakanaSearch) {
+ return this.findTerm(text, dictionaries, enableSoftKatakanaSearch).then(({length, definitions}) => {
+ return {length, definitions: groupTermDefs(definitions)};
+ });
+ }
+
findKanji(text, dictionaries) {
const processed = {}, promises = [];
for (const c of text) {