summaryrefslogtreecommitdiff
path: root/ext/jp
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-24 20:13:43 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-24 20:13:43 -0700
commit125df215dd06355f26e117e8fd20e2d6a9ee1c22 (patch)
tree7ffef0d9923434753ffd013c383412fd8df0eb7e /ext/jp
parent14f855ee75c6c95ac1c6c3f3b655dd0ae8c0e7ff (diff)
Improved deinflection
Diffstat (limited to 'ext/jp')
-rw-r--r--ext/jp/deinflector.js4
-rw-r--r--ext/jp/dictionary.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/jp/deinflector.js b/ext/jp/deinflector.js
index 3dd233eb..8c23de81 100644
--- a/ext/jp/deinflector.js
+++ b/ext/jp/deinflector.js
@@ -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;
diff --git a/ext/jp/dictionary.js b/ext/jp/dictionary.js
index e9e81503..eff54890 100644
--- a/ext/jp/dictionary.js
+++ b/ext/jp/dictionary.js
@@ -61,7 +61,7 @@ class Dictionary {
expression: e,
reading: r,
glossary: g,
- tags: t
+ tags: t.split(' ')
};
});
}