konglish 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/index.cjs +10265 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +10261 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Konglish
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Konglish - 콩글리시 변환기
|
|
2
|
+
|
|
3
|
+
영어/외래어 문장을 한국어 발음 표기로 바꿔주는 TypeScript 라이브러리입니다.
|
|
4
|
+
영어는 발음매칭이 어렵기 때문에, 커스텀사전을 사용해서 매칭했습니다.
|
|
5
|
+
사전에 없는 단어라면, cmu-pronouncing-dictionary를 사용해 한국어 발음으로 변환했습니다.
|
|
6
|
+
|
|
7
|
+
## 설치
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add konglish
|
|
11
|
+
# 또는
|
|
12
|
+
npm install konglish
|
|
13
|
+
yarn add konglish
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 사용법
|
|
17
|
+
|
|
18
|
+
### 간편 호출
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { latinToHangul } from "konglish";
|
|
22
|
+
|
|
23
|
+
latinToHangul("good morning"); // "굿 모닝"
|
|
24
|
+
latinToHangul("coffee time"); // "커피 타임"
|
|
25
|
+
latinToHangul("family vacation"); // "패밀리 베케이션"
|
|
26
|
+
latinToHangul("weekend movie night"); // "위켄드 무비 나이트"
|
|
27
|
+
latinToHangul("happy birthday"); // "해피 버스데이"
|
|
28
|
+
latinToHangul("pizza party"); // "피자 파티"
|
|
29
|
+
latinToHangul("music festival"); // "뮤직 페스티벌"
|
|
30
|
+
latinToHangul("new project"); // "뉴 프로젝트"
|
|
31
|
+
latinToHangul("thank you"); // "땡큐"
|
|
32
|
+
latinToHangul("see you soon!"); // "씨 유 순!"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 클래스 호출
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { Konglish } from "konglish";
|
|
39
|
+
|
|
40
|
+
const konglish = new Konglish({
|
|
41
|
+
dictionary: {
|
|
42
|
+
latte: ["라떼"],
|
|
43
|
+
meetup: ["밋업"],
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
konglish.latinToHangul("latte meetup"); // "라떼 밋업"
|
|
48
|
+
konglish.latinToHangul("simple lunch menu"); // "심플 런치 메뉴"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## 라이선스
|
|
53
|
+
|
|
54
|
+
[MIT](./LICENSE)
|