IPA辞書拡充・列車種別みすず追加・駅名表記修正をmasterへ反映 - #1628
Merged
Merged
Conversation
* バス路線でGetStationsByLineIdが0件になる問題を種別なし駅一覧へのフォールバックで修正 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LM9j6JJciEV1jmhLTt7Hod * 復元したフォールバック関数とテストフィクスチャにdocコメントを追加 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LM9j6JJciEV1jmhLTt7Hod --------- Co-authored-by: Claude <noreply@anthropic.com>
飯田線・中央本線・篠ノ井線・信越本線を直通する快速「みすず」を、 2016年3月26日改正の停車パターンで追加する。 長野行きのみ停車する駅(大田切・赤木・下島・田畑・伊那新町)と 飯田行きのみ停車する駅(桜町・伊那上郷・伊那本郷)があるため、 既存の宗谷(type_cd 216/217)に倣い direction 違いの2種別に分割し、 一部通過(pass=2)を使わず停車・通過で表現する。 Claude-Session: https://claude.ai/code/session_01F7x9LCgjfC5cbQ6n9xfN3Y Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
tools/ipa_audit.rs は stationapi/src/domain/ipa.rs を include! して単独の
rustc でビルドするため cargo のターゲットに含まれず、ipa.rs が TTS セグメント
方式へリファクタされた際の関数リネームに追従できていなかった。
- romanized_name_to_ipa() は廃止済みのため station_name_to_ipa("", Some(name))
に置換する。カタカナ引数を空にすることでカタカナへのフォールバックを抑止し、
ローマ字表記だけで IPA を解決できるかという元の判定意図を保つ。
- word_to_ipa() は後継の word_to_tts_segments() に置換する。
Claude-Session: https://claude.ai/code/session_01Px4SXdeBULB87KqD1TzKfy
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
station_name_r / station_name_rn がいずれも "Kii-Hosoakwa" となっており、 "Hosokawa" の k と a が入れ替わった綴り誤りだった。カタカナ (キイホソカワ) と住所 (和歌山県伊都郡高野町大字細川) から Hosokawa が正しい。 make ipa-audit で唯一の未解決名として残っていたもので、修正により romaji_to_katakana がそのまま解決し kʲi.i hosokawa を返すようになる。 cargo run -p data_validator は [VALID] No errors reported。 Claude-Session: https://claude.ai/code/session_01Px4SXdeBULB87KqD1TzKfy Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
make ipa-audit が報告する未解決名 61 件 (lines 1 / stations 59 / train_types 1) を解消する。 - lookup_english_word_ipa に 60 語を追加する。英語・カタカナ外来語由来の語 (Disney / Resort / Bayside / Screen / Vogel など) と、romaji_to_katakana が解釈できない訓令式・非ヘボン式表記 (Sirokanedai / Tamati / Mitumatu / Hatchonawate / 3chōme など) の両方を対象とする。日本語読みの IPA は katakana_to_ipa() の出力に合わせ、長音のみ既存エントリと同じ ː 表記に畳んだ。 - 日本式ローマ字のサーカムフレックス長音 (â/î/û/ê/ô) をトークン文字として 受け付け、マクロンと同じ規則で母音列へ展開する。従来は区切り文字扱いのため "Kyûjômae" が "Ky" / "j" / "mae" に割れて読みが崩れていた。 - camelCase 分割で現れる "sea" を追加する。"DisneySea" が「セア」と誤読されて いたが、名前全体としては解決扱いのため監査に現れないケースだった。 CSV 全 12,094 名称の name_roman_ipa を変更前後で突き合わせ、差分 56 件が すべて意図した改善であることを確認済み。残る未解決 1 件は Kii-Hosoakwa で、 CSV 側の綴り誤り (正: Kii-Hosokawa) のため辞書では扱わない。 Claude-Session: https://claude.ai/code/session_01Px4SXdeBULB87KqD1TzKfy Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🚉 停車駅の変更2 件の新しい停車パターン
🆕 みすず (Misuzu) - 飯田線 / 中央本線 / 篠ノ井線 / 信越本線type_cd=542, line_group_cd=1169 変更内容: 60 駅追加 全駅リスト (60駅)
🆕 みすず (Misuzu) - 飯田線 / 中央本線 / 篠ノ井線type_cd=543, line_group_cd=1170 変更内容: 46 駅追加 全駅リスト (46駅)
|
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.
概要
dev に蓄積された IPA 辞書の拡充、列車種別「みすず」の追加、駅名表記および
make ipa-auditの不具合修正を master へ反映します。変更の種類
変更内容
stationapi/src/domain/ipa.rs、Refs IPA辞書を拡充してローマ字駅名の未解決を61件から1件に削減 #1626)data/4!types.csvに 2 種別、data/5!station_station_types.csvに 106 件の駅紐付け、Refs 列車種別「みすず」を長野方面・飯田方面の2系統で追加 #1624)Kii-HosoakwaをKii-Hosokawaに修正(data/3!stations.csv、Refs 紀伊細川の英字表記の綴り誤りを修正 #1627)make ipa-auditが旧 IPA 関数名を参照してコンパイルできない問題を修正(tools/ipa_audit.rs、Refs make ipa-auditが旧IPA関数名の参照でコンパイルできない問題を修正 #1625)補足: #1622(バス路線で
GetStationsByLineIdが 0 件になる問題の修正)もorigin/master..origin/devのコミットに含まれますが、同内容が Hotfix #1623 で先に master へ反映済みのため、本 PR のファイル差分には現れません。テスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ることcargo test(SQLX_OFFLINE=true)が通ることデータ変更を含むため
cargo run -p data_validatorも実行し、[VALID] No errors reported.を確認しました。cargo testは 41 passed / 0 failed(9 ignored)です。関連Issue
スクリーンショット(任意)