fix: add missing type definitions from StrUtils.h - #39
Merged
Conversation
3 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요
VV, VA, VX, XSA 태그에 불규칙 활용여부를 명시하는 접미사 -R와 -I 덧붙는 부분 누락되어 있어 추가 하였습니다.
반영 부탁드립니다.
감사합니다.