metadata {

authority_id: iso
id: 3602-1989
language: iso-639-2:jpn
source_script: Hrkt
destination_script: Latn
name: "ISO 3602:1989 documentation -- Romanization of Japanese (kana script)"
url: https://www.iso.org/standard/9029.html
creation_date: 1989
adoption_date: 1989
description: |
  Establishes a system for the romanization of the present-day
  Japanese written language. Unrestricted application for the system
  requires that the romanizer possess a detailed knowledge of the
  language in its present-day written form.

notes:

}

tests {

test "かんおう", "kan’ô"
test "かのう", "kanô"
test "きんゆう", "kin’yû"
test "とうきょう", "tôkyô"
test "がっ•こう", "gakkô"
test "かごっま", "kagomma"
test "ぽっぽっや", "poppoyya"
test "てっら", "terra"
test "にゃっほー", "nyahhô"
test "ゴッホ", "gohho"
test "おも•う", "omou"
test "こうし", "kôsi"
test "こう•し", "kôsi" #格子
test "こ•うし", "kousi" #子牛
test "ぎゃあ", "gyâ"

}

dependency “mext-jpn-Hrkt-Latn-1954”, as: hrktlatn

stage {

# RULES
# Remove morpheme boundary marker after sokuon っ/ッ
sub capture(any("っッ")) + "•", ref( 1 )

run map.hrktlatn.stage.main

# POSTRULES
# Remove morpheme boundary marker
sub "•", ""

# Use ’ instead of '
sub "'", "’"

}