fix: 路線名IPAから共通接尾辞(線/本線/支線)を除去#1412
Conversation
Line names like セイブイケブクロセン were converted to IPA as "seibɯikebɯkɯɾoseɴ", but English TTS reads these as "Seibu Ikebukuro Line", making the trailing "seɴ" incorrect. Strip common suffixes (セン, ホンセン, シセン) before IPA conversion so only the proper name portion is transcribed. シンカンセン (Shinkansen) is preserved as it is used as-is in English. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough駅名カタカナから既知のカタカナ接尾辞を取り除く公開関数 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
stationapi/src/domain/ipa.rs (1)
6-7: ドキュメントコメントの精度向上を推奨ドキュメントコメントに「線/本線/支線/新幹線」と記載されていますが、新幹線は除去対象ではなく例外として保護されています。実際の動作と一致するよう、コメントを修正することを推奨します。
📝 提案修正
-/// Strip a common line-name suffix (線/本線/支線/新幹線) from a katakana string. +/// Strip a common line-name suffix (線/本線/支線) from a katakana string. +/// Note: 新幹線 (Shinkansen) is preserved as an exception since it's used as-is in English.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stationapi/src/domain/ipa.rs` around lines 6 - 7, ドキュメントコメントが実際の挙動と一致していません。stationapi/src/domain/ipa.rs の「線名サフィックスを除去する関数(説明文の先頭行)」のコメントから「新幹線」を除外し、代わりに「新幹線は除去対象ではなく例外として保護される」旨を明記して、コメントを実装に合わせて正確に修正してください(参照箇所:当該ファイルのライン名サフィックス除去関数のドキュメントコメント)。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@stationapi/src/domain/ipa.rs`:
- Around line 6-7: ドキュメントコメントが実際の挙動と一致していません。stationapi/src/domain/ipa.rs
の「線名サフィックスを除去する関数(説明文の先頭行)」のコメントから「新幹線」を除外し、代わりに「新幹線は除去対象ではなく例外として保護される」旨を明記して、コメントを実装に合わせて正確に修正してください(参照箇所:当該ファイルのライン名サフィックス除去関数のドキュメントコメント)。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fc7a4bd9-295f-4007-b848-593008deac53
📒 Files selected for processing (2)
stationapi/src/domain/ipa.rsstationapi/src/use_case/dto/line.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
strip_line_name_suffix()関数をipa.rsに追加し、line.rsのDTO変換で適用Test plan
strip_line_name_suffixのユニットテスト追加(セン/ホンセン/シセン除去、シンカンセン保護、ライン等の非対象、空stemの保護)🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート