๐ฝ
This is not the Repo you are looking for! New development is taking place in gitlab.com/pdylong/romanize
Romanize
Romanizes a String of Hangul Characters
This is the swift library written in swift version 4.0
Features
- fluent API
- fully configurable jamo romanization
- configurable syllable divider
- generate random hangul syllables
- API backwards compatibility
Installation
Install it with the Swift Package Manager.
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "YourApp",
products: [
.executable(name: "YourApp", targets: ["YourApp"]),
],
dependencies: [
.Package(url: "https://github.com/creekpld/romanize.git", from: "1.0.0")
],
targets: [
.target(
name: "YourApp",
dependencies: ["Romanize"],
path: "Sources"),
]
)
Usage
or
import Romanize
romanize("์๋
ํ์ธ์") // --> annyeong haseyo
romanize("์๋
ํ์ธ์", true) // --> an-nyeong ha-se-yo
Usage with fluent API
Romanize()
// set a custom syllable divider
.set(divider: "_")
// customize all jamos and romanization
.set(headJamo: .ใ
, romanization: "M")
.romanize("๋ฏธ์ํ์ง๋ง ์ ๋ ์ด ๊ทผ์ฒ ์ฌ๋์ด ์๋์์", true)
// --> Mi_an_ha_ji_Man jeo_neun i geun_cheo sa_ram_i a_ni_ye_yo
Other Features
Romanize()
// generate 10 random hangul syllables
.genHan(10)
// something like this --> ๋ฏ์ ์กฎํฆ๋จํ
์ตซ๋ฉซ์พ์
Other Implementations
License
Romanize is available as open source under the terms of the MIT License.