Skip to content
Back to skills

Japanese Transliteration Normalization

ASecurity

Converts Japanese scripts (Hiragana, Katakana, Kanji) to romanized ASCII using pykakasi for cross-script entity matching.

  • 61 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
toolspython

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill japanese-transliteration-normalization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Japanese Transliteration Normalization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Japanese Transliteration Normalization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-japanese-transliteration-normalization/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-japanese-transliteration-normalization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nlp-japanese-transliteration-normalization
description: >
  Converts Japanese scripts (Hiragana, Katakana, Kanji) to romanized ASCII using pykakasi for cross-script entity matching.
---
# Japanese Transliteration Normalization

## Overview

Multilingual entity matching fails when the same entity appears in different scripts — "東京タワー" and "Tokyo Tower" won't match by string similarity. Pykakasi converts Japanese Hiragana, Katakana, and Kanji to romanized ASCII (romaji), enabling standard string similarity metrics to work across scripts. Apply selectively to Japanese records before computing matching features.

## Quick Start

```python
import pykakasi

def romanize_japanese(df, text_cols, country_col="country"):
    """Convert Japanese text fields to romaji for cross-script matching."""
    kks = pykakasi.kakasi()
    
    def convert_text(text):
        if not isinstance(text, str):
            return text
        result = kks.convert(text)
        return " ".join([item["hepburn"] for item in result])
    
    jp_mask = df[country_col] == "JP"
    for col in text_cols:
        df.loc[jp_mask, col] = df.loc[jp_mask, col].apply(convert_text)
    return df

# Romanize name and address fields for Japanese records
df = romanize_japanese(df, ["name", "address", "city", "state"])
```

## Workflow

1. Filter records by country/locale to identify Japanese text
2. Apply pykakasi converter to each text field
3. Use Hepburn romanization (most common standard)
4. Proceed with standard string similarity computation on romanized text

## Key Decisions

- **Romanization standard**: Hepburn (default) vs Kunrei-shiki — Hepburn is more internationally recognized
- **Selective application**: Only convert Japanese records; applying to non-Japanese text wastes time
- **Other languages**: For Chinese use pypinyin, for Korean use korean-romanizer
- **Install**: `pip install pykakasi`

## References

- [Public: 0.861 | PyKakasi & Radian Coordinates](https://www.kaggle.com/code/nlztrk/public-0-861-pykakasi-radian-coordinates)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.