diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-07-05 18:23:56 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-07-05 18:23:56 +0200 |
commit | 4e32a1942ff2478b557af1b900b3f3282d7ce55b (patch) | |
tree | dda6cc88d4113d691cf8a16c49f3e13890b9d67d /api | |
parent | 5b0b8c82a8477cfe49a538f267805488daa7f5bd (diff) |
fix examples/furigana-html.ts
Diffstat (limited to 'api')
-rw-r--r-- | api/word.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/word.ts b/api/word.ts index 4d77d97..b7fc3e6 100644 --- a/api/word.ts +++ b/api/word.ts @@ -4,7 +4,7 @@ import { ParseToken } from "../language/types.ts"; import Japanese, { JapaneseFormatter } from "./japanese.ts"; import "../util/string.ts"; -import { Tag } from "../language/tags.ts"; +import { Tag, TagGroup } from "../language/tags.ts"; export default class Word extends APIBase { /** @prop dictionary form of verb if this word is a verb */ @@ -28,7 +28,7 @@ export default class Word extends APIBase { this.filler = false; input = input as ParseToken; this.base = new Japanese(input.writing, input.reading); - if (input.tags.anyOf(Object.values(Tag.Class.Verb))) { + if (input.tags.anyOf(TagGroup.Conjugable as string[])) { var writingCommon = input.writing.cmpLen(input.source); var readingCommon = input.reading.cmpLen(input.source); var stemLength = Math.max(writingCommon, readingCommon); @@ -39,7 +39,7 @@ export default class Word extends APIBase { } else { this.text = this.base; } - this.outputKanji = !input.source.kanaOnly(); // only output kanji if input also uses kanji + this.outputKanji = input.source.hasKanji(); // only output kanji if input also uses kanji } } |