Improved deinflection

This commit is contained in:
Alex Yatskov 2016-03-24 20:13:43 -07:00
parent 14f855ee75
commit 125df215dd
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class Deinflection {
return true;
}
for (const tag in this.tags) {
for (const tag of this.tags) {
if (this.searchTags(tag, tags)) {
return true;
}
@ -51,7 +51,7 @@ class Deinflection {
const variants = rules[rule];
for (const v of variants) {
let allowed = this.tags.length === 0;
for (const tag in this.tags) {
for (const tag of this.tags) {
if (this.searchTags(tag, v.tagsIn)) {
allowed = true;
break;

View File

@ -61,7 +61,7 @@ class Dictionary {
expression: e,
reading: r,
glossary: g,
tags: t
tags: t.split(' ')
};
});
}