aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display-generator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r--ext/js/display/display-generator.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js
index 9a90502e..53a004c1 100644
--- a/ext/js/display/display-generator.js
+++ b/ext/js/display/display-generator.js
@@ -783,17 +783,27 @@ class DisplayGenerator {
}
_isVerbOrAdjective(wordClasses) {
+ let isVerbOrAdjective = false;
+ let isSuruVerb = false;
+ let isNoun = false;
for (const wordClass of wordClasses) {
switch (wordClass) {
case 'v1':
case 'v5':
- case 'vs':
case 'vk':
case 'vz':
case 'adj-i':
- return true;
+ isVerbOrAdjective = true;
+ break;
+ case 'vs':
+ isVerbOrAdjective = true;
+ isSuruVerb = true;
+ break;
+ case 'n':
+ isNoun = true;
+ break;
}
}
- return false;
+ return isVerbOrAdjective && !(isSuruVerb && isNoun);
}
}