diacritics: `strip_diacritics(text, "en")` raises a message that blames native spelling, and en has no diacritizer
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
scriptconv/diacritics.py の 496 行目あたりで strip_diacritics を読み、506 行目の raise ValueError の前に overlay-diacritics テーブルがどのように参照されるかを追ってください。次に、en の動作が tests/test_arabic_diacritics_routing.py でカバーされている diacritize と比較してください。strip_diacritics("café", "en") で再現し、その後、overlay マークなしのケースとネイティブ綴りのケースを分けて、en が正しいメッセージを受け取る(または diacritize に合わせて変更なしで通る)ようにしてください。完了の形は、新しい en の動作をアサートするテストと、既存の diacritics テストが引き続き通ることです。
索引モデルが issue の本文から書いたものです。
説明
🤖 Auto-generated by Claude Sonnet 5.5 (claude-sonnet-5-5) via Claude Code — NOT human-reviewed. Verify before acting.
Verified: scriptconv origin/dev 8688aa5. Each output below comes from a run in a fresh Python 3.12 environment with
python -I, installed from that checkout.
Observed
strip_diacritics raises ValueError for en with a message that blames the native spelling of English. English has no diacritizer in scriptconv, so there is no overlay mark to strip. The message gives the wrong reason.
ValueError: cannot strip diacritics for lang='en': its diacritics are part of the native orthography, so removal would corrupt the spelling. strip is defined only for overlay diacritics (Arabic/Hebrew vocalization, East-Slavic/Turkic stress).
diacritize("hello", "en") returns hello with no error (tests/test_arabic_diacritics_routing.py, test_two_letter_tags_other_than_ar_need_no_linguatag).
Expected
The message names the real reason: scriptconv has no overlay diacritics for en. The docstring of strip_diacritics says it "Raises ValueError where the diacritics are spelling, as in European Portuguese". English is not such a language. A language with no diacritizer needs its own message, or strip_diacritics returns the text unchanged, as diacritize does.
Reproduce
from scriptconv.diacritics import strip_diacritics
strip_diacritics("café", "en")
Where
scriptconv/diacritics.py, strip_diacritics (line 496): the raise ValueError( at line 506 runs for every tag with no overlay marks, whatever the reason.
- 主要言語
- Python
- スター
- 4
- フォーク
- 1
- 平均マージ
- 8時間 20分
- マージ済み PR(30日)
- 128
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TigreGotico/scriptconv のほかの issue
-
docs(notation): the ipa_to_arpa section does not name the tied and non-syllabic diphthong formsオープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
TigreGotico/scriptconv#445 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TigreGotico/scriptconv#443 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
TigreGotico/scriptconv#440 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
TigreGotico/scriptconv#436 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TigreGotico/scriptconv#435 ·
メンテナーはふだん 1 日以内に返信
TigreGotico/scriptconv の issue をすべて見る
似ている issue
-
Triage-Needed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pulp/pulp-oci-images#875 ·
-
intake mcp-intake needs-human-review priority:high type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Ikalus1988/MisakaNet#5718 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
facebookresearch/autoform-bot#872 ·
メンテナーはふだん 1 日以内に返信
-
Dataset.to_json() writes "Value": [] for an empty sequence対応中かも @DG47 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
area: docs area: providers/oci priority: p3 size: S type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
finos/open-resource-broker#933 ·
メンテナーはふだん 1 日以内に返信