Skip to content

๐Ÿ‡ฐ๐Ÿ‡ท ์˜ํƒ€๋ฅผ ํ•œ๊ธ€๋กœ, ํ•œํƒ€๋ฅผ ์˜์–ด๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” Kotlin ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ (Implementation of inko.js)

License

Notifications You must be signed in to change notification settings

kimcore/inko.kt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Inko.kt

Open Source Library, Converting Misspelled English characters into Korean letters (& vice versa)
Kotlin implementation of Inko.js, also works in Java!


์„ค์น˜

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.kimcore", "inko.kt", "1.2")
}

์‚ฌ์šฉ๋ฒ•

inko.kt๋Š” ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•˜๊ฑฐ๋‚˜, ์ฝ”ํ‹€๋ฆฐ์˜ extension property๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

import com.github.kimcore.inko.Inko
import com.github.kimcore.inko.Inko.Companion.asKorean
import com.github.kimcore.inko.Inko.Companion.asEnglish

val inko = Inko()

// ์˜์–ด (en) -> ํ•œ๊ธ€ (ko)
println(inko.en2ko("dkssudgktpdy!")) // ์•ˆ๋…•ํ•˜์„ธ์š”!
println("dkssudgktpdy!".asKorean) // ์•ˆ๋…•ํ•˜์„ธ์š”!

// ํ•œ๊ธ€ (ko) -> ์˜์–ด (en)
println(inko.ko2en("ใ…—๋””ใ…ฃใ…, ์žฌ๊น…!")) // hello, world!
println("ใ…—๋””ใ…ฃใ…, ์žฌ๊น…!".asEnglish) // hello, world!

์„ค์ •

์ด๋ฆ„ ํƒ€์ž… ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
allowDoubleConsonant Boolean false ๋ณต์ž์Œ ์„ค์ •์—ฌ๋ถ€

์˜ˆ์‹œ:

import com.github.kimcore.Inko
import com.github.kimcore.Inko.Companion.asKoreanWithDoubleConsonant

// Inko ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ• ๋•Œ ์„ค์ • ๋ถ€์—ฌํ•˜๊ธฐ
val inko = Inko(allowDoubleConsonant = true)

// allowDoubleConsonant ๋ณ€์ˆ˜๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ ์„ค์ • ๋ถ€์—ฌํ•˜๊ธฐ
inko.allowDoubleConsonant = true

// en2ko ํ•จ์ˆ˜์˜ ์ธ์ž๋กœ ์„ค์ • ๋ถ€์—ฌํ•˜๊ธฐ
inko.en2ko("dhk toswm!", allowDoubleConsonant = true)

// Extension property ์‚ฌ์šฉ์‹œ, String.asKoreanWithDoubleConsonant ์‚ฌ์šฉ
"dhk toswm!".asKoreanWithDoubleConsonant

๊ด€๋ จ ํ”„๋กœ์ ํŠธ

๊ธฐ์—ฌํ•˜๊ธฐ

์ด ์˜คํ”ˆ์†Œ์Šค ํ”„๋กœ์ ํŠธ์— ๋ˆ„๊ตฌ๋‚˜ ๊ธฐ์—ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ์—ฌํ•˜๊ณ  ์‹ถ์€ ๋ถ„๋“ค์€ ์ด ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ ํฌํฌํ•œ ํ›„ ํ’€๋ฆฌํ€˜์ŠคํŠธ ์š”์ฒญํ•ด์ฃผ์„ธ์š”!

๋ผ์ด์„ ์Šค

Inko.kt ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” MIT ๋ผ์ด์„ ์Šค๋ฅผ ๋”ฐ๋ฅด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ LICENSE ํŒŒ์ผ์„ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

๊ฐ์‚ฌํ•œ ๋ถ„๋“ค

  • inko.js ๋ฅผ ๊ฐœ๋ฐœํ•ด์ฃผ์‹  738 ๋‹˜๊ป˜ ์ •๋ง ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค!
  • inko.py ๋ฅผ ๊ฐœ๋ฐœํ•ด์ฃผ์‹  JackCme ๋‹˜ ๋˜ํ•œ ์ •๋ง ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๊ฐœ๋ฐœํ•˜๋ฉฐ ๋งŽ์€ ๋„์›€์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

About

๐Ÿ‡ฐ๐Ÿ‡ท ์˜ํƒ€๋ฅผ ํ•œ๊ธ€๋กœ, ํ•œํƒ€๋ฅผ ์˜์–ด๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” Kotlin ์˜คํ”ˆ์†Œ์Šค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ (Implementation of inko.js)

Topics

Resources

License

Stars

Watchers

Forks

Languages