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.js27
1 files changed, 1 insertions, 26 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js
index 53a004c1..51950a3e 100644
--- a/ext/js/display/display-generator.js
+++ b/ext/js/display/display-generator.js
@@ -768,7 +768,7 @@ class DisplayGenerator {
_getPitchAccentCategories(reading, pronunciations, wordClasses, headwordIndex) {
if (pronunciations.length === 0) { return null; }
- const isVerbOrAdjective = this._isVerbOrAdjective(wordClasses);
+ const isVerbOrAdjective = DictionaryDataUtil.isNonNounVerbOrAdjective(wordClasses);
const categories = new Set();
for (const pronunciation of pronunciations) {
if (pronunciation.headwordIndex !== headwordIndex) { continue; }
@@ -781,29 +781,4 @@ class DisplayGenerator {
}
return categories.size > 0 ? [...categories].join(' ') : null;
}
-
- _isVerbOrAdjective(wordClasses) {
- let isVerbOrAdjective = false;
- let isSuruVerb = false;
- let isNoun = false;
- for (const wordClass of wordClasses) {
- switch (wordClass) {
- case 'v1':
- case 'v5':
- case 'vk':
- case 'vz':
- case 'adj-i':
- isVerbOrAdjective = true;
- break;
- case 'vs':
- isVerbOrAdjective = true;
- isSuruVerb = true;
- break;
- case 'n':
- isNoun = true;
- break;
- }
- }
- return isVerbOrAdjective && !(isSuruVerb && isNoun);
- }
}