From 5b0b8c82a8477cfe49a538f267805488daa7f5bd Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 3 Jul 2023 16:38:56 +0200 Subject: more correct sentence parsing --- db/dict/deinflections.sql | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'db') diff --git a/db/dict/deinflections.sql b/db/dict/deinflections.sql index d13f313..ff177e2 100644 --- a/db/dict/deinflections.sql +++ b/db/dict/deinflections.sql @@ -116,21 +116,26 @@ insert into deinflection_temp values ('infl:suffix:tari', 'きたり', 'きた', 'a', 'k'), ('infl:suffix:tari', '来たり', '来た', 'a', 'k'), + -- -sa (adjective->noun) + ('infl:suffix:sa class:noun', 'さ', '', 'a', 'na'), + ('infl:suffix:sa class:noun', 'さ', 'い', 'a', 'i'), + -- auxiliary rules ('class:verb:suru-included', 'する', '', 's', ''); -- deconjugate suru verbs into stem -- rule/bitmask lookup table create temporary table rule_map (tag, name, mask); insert into rule_map values - (null, 'a', -1 ), -- all (allow all rules in) - (null, '', 0 ), -- (nothing) - ('infl:reason:ru', 'ru', 1 << 0), -- 一段活用 (ichidan a.k.a. ru-verbs in tae kim's japanese grammar guide) - ('infl:reason:u', 'u', 1 << 1), -- 五段活用 (godan a.k.a. u-verbs in tae kim's japanese grammar guide) - ('infl:reason:suru', 's', 1 << 2), -- する (suru) - ('infl:reason:kuru', 'k', 1 << 3), -- くる (kuru) - (null, 'z', 1 << 4), -- ずる (zuru) - ('infl:reason:adj-i', 'i', 1 << 5), -- 形容詞 (i-adjective) - (null, 'iru', 1 << 6); -- 〜いる (temporary iru for progressive tense) + (null, 'a', -1 ), -- all (allow all rules in) + (null, '', 0 ), -- (nothing) + ('infl:reason:ru', 'ru', 1 << 0), -- 一段活用 (ichidan a.k.a. ru-verbs in tae kim's japanese grammar guide) + ('infl:reason:u', 'u', 1 << 1), -- 五段活用 (godan a.k.a. u-verbs in tae kim's japanese grammar guide) + ('infl:reason:suru', 's', 1 << 2), -- する (suru) + ('infl:reason:kuru', 'k', 1 << 3), -- くる (kuru) + (null, 'z', 1 << 4), -- ずる (zuru) + ('infl:reason:adj:i', 'i', 1 << 5), -- 形容詞 (i-adjective) + (null, 'iru', 1 << 6), -- 〜いる (temporary iru for progressive tense) + ('infl:reason:adj:na', 'na', 1 << 7); -- 形容動詞 (na-adjective) -- add tags to db insert into deinflection_rules (mask, tag) -- cgit v1.2.3