コンテンツへスキップ
🛠️ToolsShed

パングラムチェッカー

テキストが英語アルファベット26文字すべてを含むか確認します。

:

このツールについて

パングラムとは、英語のアルファベット26文字すべてを含む文章です。パングラムチェッカーは、あなたのテキストが真のパングラムであるかどうかを即座に判定します。タイポグラファー、フォントデザイナー、キーボードレイアウトテスター、そして文字セット全体をカバーしていることを確認したいライターにとって非常に有用です。テスト文を作成したり、キャラクターセットを検証したり、言語について単純に好奇心を持つ場合でも、このツールは即座にフィードバックを提供します。

パングラムチェッカーを使用するには、テキストを入力フィールドに貼り付けるか入力するだけで、ツールは存在する文字と欠落している文字を即座に表示します。インターフェースは明確にアルファベットのギャップを表示するため、すばやく編集してギャップを埋めることができます。このアプローチは、26文字を手動で数えるよりもはるかに高速です。

よくある質問

コード実装

def is_pangram(text: str) -> bool:
    """Check if text contains all 26 letters of the English alphabet."""
    letters = set(text.lower())
    return set('abcdefghijklmnopqrstuvwxyz').issubset(letters)

def missing_letters(text: str) -> list[str]:
    """Return letters missing from the text."""
    present = set(text.lower())
    return [c for c in 'abcdefghijklmnopqrstuvwxyz' if c not in present]

def pangram_stats(text: str) -> dict:
    present = set(c for c in text.lower() if c.isalpha())
    missing = [c for c in 'abcdefghijklmnopqrstuvwxyz' if c not in present]
    return {
        'is_pangram': len(missing) == 0,
        'present_count': len(present),
        'missing': missing,
        'unique_letters': sorted(present),
    }

examples = [
    "The quick brown fox jumps over the lazy dog",
    "Hello World",
    "Pack my box with five dozen liquor jugs",
]
for text in examples:
    stats = pangram_stats(text)
    print(f"'{text[:30]}...' -> pangram={stats['is_pangram']}, missing={stats['missing']}")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.