diff options
Diffstat (limited to 'language/parser.ts')
-rw-r--r-- | language/parser.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/language/parser.ts b/language/parser.ts index 40bdd81..6398595 100644 --- a/language/parser.ts +++ b/language/parser.ts @@ -1,15 +1,10 @@ -import { Tag } from "./tags.ts"; +import { Tag, TagGroup } from "./tags.ts"; import { ParseResult, InputSentenceProps, ParseDepth } from "./types.ts"; import DB from "../db/db.ts"; import "../util/array.ts"; import "../util/set.ts"; import { DeepPartial } from "../util/types.ts"; -const CONJUGABLE_TAGS = [ - ...Object.values(Tag.Class.Verb), - ...Object.values(Tag.Class.Adjective), -]; - // TODO: rename Parser to Search /** @summary main Parser class */ export default class Parser { @@ -71,7 +66,7 @@ export default class Parser { // deconjugated words if (result.depth > 0) { // check if this word can be conjugated at all - if (!result.tags.anyOf(CONJUGABLE_TAGS)) return false; + if (!result.tags.anyOf(TagGroup.Conjugable as string[])) return false; // ignore other wrong deconjugations if (result.tags.includes(Tag.Class.Verb.U) && |