WIP
This commit is contained in:
parent
47ef617eb4
commit
0587399883
@ -116,7 +116,7 @@ class Deinflector {
|
|||||||
deinflect(term, validator) {
|
deinflect(term, validator) {
|
||||||
const node = new Deinflection(term);
|
const node = new Deinflection(term);
|
||||||
return node.deinflect(validator, this.rules).then(success => {
|
return node.deinflect(validator, this.rules).then(success => {
|
||||||
return success ? node.gather() : null;
|
return success ? node.gather() : [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class Translator {
|
|||||||
this.deinflector.deinflect(text.slice(0, i), term => {
|
this.deinflector.deinflect(text.slice(0, i), term => {
|
||||||
return this.dictionary.findTerm(term).then(definitions => definitions.map(def => def.tags));
|
return this.dictionary.findTerm(term).then(definitions => definitions.map(def => def.tags));
|
||||||
}).then(inflects => {
|
}).then(inflects => {
|
||||||
for (const inflect of inflects || []) {
|
for (const inflect of inflects) {
|
||||||
this.processTerm(groups, df.source, df.tags, df.rules, df.root);
|
this.processTerm(groups, df.source, df.tags, df.rules, df.root);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user