aboutsummaryrefslogtreecommitdiff
path: root/ext/jp/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-20 17:52:14 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-20 17:52:14 -0700
commit2d526b7ecd365d1a3eb93326ceb04c13c78bb2a3 (patch)
tree2dbb8fa98959ce23432ebb36bec89597d2eb640b /ext/jp/translator.js
parentd8a630fa2881a0cf012c6548706dde7c4740fe14 (diff)
Some work on deinflector
Diffstat (limited to 'ext/jp/translator.js')
-rw-r--r--ext/jp/translator.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/jp/translator.js b/ext/jp/translator.js
index 79f2b369..c69b6786 100644
--- a/ext/jp/translator.js
+++ b/ext/jp/translator.js
@@ -19,6 +19,7 @@
class Translator {
constructor() {
this.dictionary = new Dictionary();
+ this.deinflector = new Deinflector();
this.initialized = false;
}
@@ -35,6 +36,8 @@ class Translator {
}
$.when.apply($, loaders).done((rules, edict, enamdict, kanjidic) => {
+ this.deinflector.setRules(rules);
+
this.dictionary.addTermDict(edict[0]);
this.dictionary.addTermDict(enamdict[0]);
this.dictionary.addKanjiDict(kanjidic[0]);
@@ -56,6 +59,6 @@ trans.initialize({
enamdict: 'jp/data/enamdict.json',
kanjidic: 'jp/data/kanjidic.json',
}, function() {
- // alert('Loaded');
+ alert('Loaded');
// alert(trans.dictionary.findTerm('猫'));
});