Skip to content

fix: add missing type definitions from StrUtils.h - #39

Merged
kkweon merged 2 commits into
codingpot:mainfrom
phddy:v0.21.0
Oct 15, 2025
Merged

fix: add missing type definitions from StrUtils.h#39
kkweon merged 2 commits into
codingpot:mainfrom
phddy:v0.21.0

Conversation

@phddy

@phddy phddy commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

안녕하세요

VV, VA, VX, XSA 태그에 불규칙 활용여부를 명시하는 접미사 -R와 -I 덧붙는 부분 누락되어 있어 추가 하였습니다.

반영 부탁드립니다.
감사합니다.

@kkweon kkweon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread postype.go
@kkweon
kkweon merged commit 8eb509f into codingpot:main Oct 15, 2025
2 checks passed
@phddy
phddy deleted the v0.21.0 branch October 15, 2025 04:36
kkweon added a commit that referenced this pull request Aug 12, 2026
The generated postype.go did not compile: POS_P, POS_PV and POS_PA were
all emitted as "P", which produced duplicate cases in the isValid switch.

Rewrite the generator to evaluate POSTag enum initializers the way the
C++ compiler does and to transcribe tagToString/tagRToString, instead of
relying on hardcoded special cases and an "ends with i" heuristic. That
corrects three mappings that never matched upstream:

  - pa = p + 1 == max, so tagToString returns "@", not "P"
  - pvi/pai fall through the irregular switch default, so both are "@",
    not "PV-I"/"PA-I"
  - the -R variants are reachable only through tagRToString, which is
    what kiwi_res_tag calls; dropping them made ParsePOSType fail on
    ordinary sentences such as "편지를 받았다", re-introducing #39

Deduplicate the isValid switch by value so aliases can no longer break
the build, keep POS_USER_0..4 as deprecated aliases so the rename does
not break downstream code, and add a regression test covering both the
-R tags and a regular conjugation through Analyze.

Verify the generated code inside the sync workflow: pull requests opened
with GITHUB_TOKEN do not trigger CI, so nothing was checking it.
kkweon added a commit that referenced this pull request Aug 12, 2026
The generated postype.go did not compile: POS_P, POS_PV and POS_PA were
all emitted as "P", which produced duplicate cases in the isValid switch.

Rewrite the generator to evaluate POSTag enum initializers the way the
C++ compiler does and to transcribe tagToString/tagRToString, instead of
relying on hardcoded special cases and an "ends with i" heuristic. That
corrects three mappings that never matched upstream:

  - pa = p + 1 == max, so tagToString returns "@", not "P"
  - pvi/pai fall through the irregular switch default, so both are "@",
    not "PV-I"/"PA-I"
  - the -R variants are reachable only through tagRToString, which is
    what kiwi_res_tag calls; dropping them made ParsePOSType fail on
    ordinary sentences such as "편지를 받았다", re-introducing #39

Deduplicate the isValid switch by value so aliases can no longer break
the build, keep POS_USER_0..4 as deprecated aliases so the rename does
not break downstream code, and add a regression test covering both the
-R tags and a regular conjugation through Analyze.

Verify the generated code inside the sync workflow: pull requests opened
with GITHUB_TOKEN do not trigger CI, so nothing was checking it.
kkweon added a commit that referenced this pull request Aug 12, 2026
The generated postype.go did not compile: POS_P, POS_PV and POS_PA were
all emitted as "P", which produced duplicate cases in the isValid switch.

Rewrite the generator to evaluate POSTag enum initializers the way the
C++ compiler does and to transcribe tagToString/tagRToString, instead of
relying on hardcoded special cases and an "ends with i" heuristic. That
corrects three mappings that never matched upstream:

  - pa = p + 1 == max, so tagToString returns "@", not "P"
  - pvi/pai fall through the irregular switch default, so both are "@",
    not "PV-I"/"PA-I"
  - the -R variants are reachable only through tagRToString, which is
    what kiwi_res_tag calls; dropping them made ParsePOSType fail on
    ordinary sentences such as "편지를 받았다", re-introducing #39

Deduplicate the isValid switch by value so aliases can no longer break
the build, keep POS_USER_0..4 as deprecated aliases so the rename does
not break downstream code, and add a regression test covering both the
-R tags and a regular conjugation through Analyze.

Verify the generated code inside the sync workflow: pull requests opened
with GITHUB_TOKEN do not trigger CI, so nothing was checking it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants