Learn R Programming

audubon (version 0.5.1)

strj_romanize: Romanize Japanese Hiragana and Katakana

Description

Romanize Japanese Hiragana and Katakana

Usage

strj_romanize(
  text,
  config = c("wikipedia", "traditional hepburn", "modified hepburn", "kunrei", "nihon")
)

Value

A character vector.

Arguments

text

Character vector. If elements are composed of except but hiragana and katakana letters, those letters are dropped from the return value.

config

Configuration used to romanize. Default is wikipedia.

Details

There are several ways to romanize Japanese. Using this implementation, you can convert hiragana and katakana as 5 different styles; the wikipedia style, the traditional hepburn style, the modified hepburn style, the kunrei style, and the nihon style.

Note that all of these styles return a slightly different form of stringi::stri_trans_general(text, "Any-latn").

See Also

Examples

Run this code
strj_romanize(
  paste0(
    "\u3042\u306e\u30a4\u30fc\u30cf\u30c8",
    "\u30fc\u30f4\u30a9\u306e\u3059\u304d",
    "\u3068\u304a\u3063\u305f\u98a8"
  )
)

Run the code above in your browser using DataLab