Improved deinflection
This commit is contained in:
parent
14f855ee75
commit
125df215dd
@ -31,7 +31,7 @@ class Deinflection {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const tag in this.tags) {
|
for (const tag of this.tags) {
|
||||||
if (this.searchTags(tag, tags)) {
|
if (this.searchTags(tag, tags)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ class Deinflection {
|
|||||||
const variants = rules[rule];
|
const variants = rules[rule];
|
||||||
for (const v of variants) {
|
for (const v of variants) {
|
||||||
let allowed = this.tags.length === 0;
|
let allowed = this.tags.length === 0;
|
||||||
for (const tag in this.tags) {
|
for (const tag of this.tags) {
|
||||||
if (this.searchTags(tag, v.tagsIn)) {
|
if (this.searchTags(tag, v.tagsIn)) {
|
||||||
allowed = true;
|
allowed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -61,7 +61,7 @@ class Dictionary {
|
|||||||
expression: e,
|
expression: e,
|
||||||
reading: r,
|
reading: r,
|
||||||
glossary: g,
|
glossary: g,
|
||||||
tags: t
|
tags: t.split(' ')
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user