refactor(tokenizer): _tokenize char-by-char 루프를 re.sub으로 교체#288
Merged
lovit merged 1 commit intorefactor-2026from Mar 10, 2026
Merged
refactor(tokenizer): _tokenize char-by-char 루프를 re.sub으로 교체#288lovit merged 1 commit intorefactor-2026from
lovit merged 1 commit intorefactor-2026from
Conversation
This was referenced Mar 10, 2026
- 파이프라인마다 findall + char-by-char 순회 → pattern.sub(lambda m: f" {m.group()} ", s)
- 코드 라인 수 절반 이하로 감소 (34줄 → 13줄)
- % 포매팅 제거 (f-string으로 자연 대체, #282 해소)
- 빈 문자열 가드 추가 (if not words: return [])
- 타입 어노테이션 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
_tokenize내부의findall+ char-by-char 순회 로직을pattern.sub(lambda m: f" {m.group()} ", s)로 교체%포매팅 제거 — f-string으로 자연 대체 (style(tokenizer): RegexTokenizer._tokenize % 포매팅을 f-string으로 변환 #282 해소)if not words: return [])변경 전/후
관련 이슈
Closes #281
Closes #282
🤖 Generated with Claude Code