All Projects → what-studio → Tossi

what-studio / Tossi

Licence: bsd-3-clause
Chooses correct Korean particle morphs for arbitrary words.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tossi

Hangulize
Korean Alphabet Transcription
Stars: ✭ 184 (+15%)
Mutual labels:  korean, linguistics, localization
Hangulize
Hangulize transcribes non-Korean words into Hangul
Stars: ✭ 152 (-5%)
Mutual labels:  korean, linguistics
Yesterday I Learned
Brainfarts are caused by the rupturing of the cerebral sphincter.
Stars: ✭ 50 (-68.75%)
Mutual labels:  korean, linguistics
KoParadigm
KoParadigm: Korean Inflectional Paradigm Generator
Stars: ✭ 48 (-70%)
Mutual labels:  linguistics, korean
Roenglishre
An unofficial english translation project for Korea Ragnarok Online (kRO).
Stars: ✭ 121 (-24.37%)
Mutual labels:  korean, localization
Punic
PHP translation and localization made easy!
Stars: ✭ 133 (-16.87%)
Mutual labels:  localization
Jquery.ime
jQuery based input methods library
Stars: ✭ 145 (-9.37%)
Mutual labels:  localization
Hierarchical loc
Deep image retrieval for efficient 6-DoF localization
Stars: ✭ 131 (-18.12%)
Mutual labels:  localization
Localization
🌐 Localization package for Laravel
Stars: ✭ 142 (-11.25%)
Mutual labels:  localization
Openibl
[ECCV-2020 (spotlight)] Self-supervising Fine-grained Region Similarities for Large-scale Image Localization. 🌏 PyTorch open-source toolbox for image-based localization (place recognition).
Stars: ✭ 128 (-20%)
Mutual labels:  localization
Inko
🇰🇷영타를 한글로, 한타를 영어로 변환해주는 자바스크립트 오픈소스 라이브러리
Stars: ✭ 143 (-10.62%)
Mutual labels:  korean
Toolbelt.blazor.i18ntext
The class library that provides the ability to localize texts on your Blazor app!
Stars: ✭ 134 (-16.25%)
Mutual labels:  localization
Koalanlp
KoalaNLP = Korean + Scala + NLP. 한국어 형태소 및 구문 분석기의 모음입니다.
Stars: ✭ 146 (-8.75%)
Mutual labels:  korean
Javascript Style Guide
Airbnb JavaScript 스타일 가이드
Stars: ✭ 132 (-17.5%)
Mutual labels:  korean
I18n Extract
Manage localization with static analysis. 🔍
Stars: ✭ 152 (-5%)
Mutual labels:  localization
Autolocalization
iOS Auto Localization for xib and storyboard
Stars: ✭ 128 (-20%)
Mutual labels:  localization
The Road To Learn React Korean
🇰🇷 리액트 도움닫기 - The the Road to learn React (2018) [Deprecated]
Stars: ✭ 140 (-12.5%)
Mutual labels:  korean
Pytorch Tutorials Kr
🇰🇷PyTorch에서 제공하는 튜토리얼의 한국어 번역을 위한 저장소입니다. (Translate PyTorch tutorials in Korean🇰🇷)
Stars: ✭ 148 (-7.5%)
Mutual labels:  korean
Kor Law For Dev
개발자들이 숙지해야할 한국의 법률을 모았습니다.
Stars: ✭ 140 (-12.5%)
Mutual labels:  korean
Ipa Dict
Monolingual wordlists with pronunciation information in IPA
Stars: ✭ 139 (-13.12%)
Mutual labels:  linguistics

토씨

Build Status Coverage Status README in English

'토씨'는 '조사'의 순우리말 이름입니다. 토씨 라이브러리는 임의의 단어 뒤에 올 가장 자연스러운 한국어 조사 형태를 골라줍니다.

설치

$ pip install tossi

사용법

>>> import tossi
>>> tossi.postfix(u'집', u'(으)로')
집으로
>>> tossi.postfix(u'말', u'으로는')
말로는
>>> tossi.postfix(u'대한민국', u'은(는)')
대한민국은
>>> tossi.postfix(u'민주공화국', u'다')
민주공화국이다

자연스러운 조사 선택

, , 만~, 에~, 께~, 뿐~, 하~, 보다~, 밖에~, 같이~, 부터~, 까지~, 마저~, 조차~, 마냥~, 처럼~, 커녕~에는 어떤 단어가 앞서도 형태가 변하지 않습니다:

나오, 모리안, 키홀, 나오, 모리안, 키홀

반면 은(는), 이(가), 을(를), 과(와)~는 앞선 단어의 마지막 음절의 받침 유무에 따라 형태가 달라집니다:

나오, 모리안, 키홀

(으)로~도 비슷한 규칙을 따르지만 앞선 받침이 일 경우엔 받침이 없는 것과 같게 취급합니다:

나오, 모리안으로, 키홀

서술격 조사 (이)다는 어미가 활용되어 다양한 형태로 변형될 수 있습니다:

나오지만, 모리안이지만, 키홀이에요, 나오예요

토씨는 가장 자연스러운 조사 형태를 선택합니다. 만약 어떤 형태가 자연스러운지 알 수 없을 때에는 은(는), (으)로처럼 모든 형태를 병기합니다:

>>> tossi.postfix(u'벽돌', u'으로')
벽돌로
>>> tossi.postfix(u'짚', u'으로')
짚으로
>>> tossi.postfix(u'黃金', u'으로')
黃金()

단어가 숫자로 끝나더라도 자연스러운 조사 형태가 선택됩니다:

>>> tossi.postfix(u'레벨 10', u'이')
레벨 10
>>> tossi.postfix(u'레벨 999', u'이')
레벨 999

괄호 속 단어나 구두점은 조사 형태를 선택할 때 참고하지 않습니다:

>>> tossi.postfix(u'나뭇가지(만렙)', u'을')
나뭇가지(만렙)

병기 순서

조사의 형태를 모두 병기해야할 때 병기할 순서를 고를 수 있습니다. 가령 대부분의 인자가 일본어 단어일 경우엔 단어가 모음으로 끝날 확률이 높습니다. 이 경우 기본형인 은(는) 스타일보단 는(은) 스타일이 더 자연스러울 수 있습니다:

>>> tolerance_style = tossi.parse_tolerance_style(u'는(은)')
>>> tossi.postfix(u'さくら', u'이', tolerance_style=tolerance_style)
さくら가()

은(는), (은)는, 는(은), (는)은 네 가지 스타일 중 프로젝트에 맞는 것을 고르세요.

API

tossi.pick(word, morph) -> str

word에 자연스럽게 뒤따르는 조사 형태를 구합니다.

>>> tossi.pick(u'토씨', '은')

>>> tossi.pick(u'우리말', '은')

tossi.postfix(word, morph) -> str

단어와 조사를 자연스럽게 연결합니다.

>>> tossi.postfix(u'토씨', '은')
토씨는
>>> tossi.postfix(u'우리말', '은')
우리말은

tossi.parse(morph) -> Particle

문자열로 된 조사 표기로부터 조사 객체를 얻습니다.

>>> tossi.parse(u'으로')
<Particle: u'(으)로'>
>>> tossi.parse(u'(은)는')
<Particle: u'은(는)'>
>>> tossi.parse(u'이면')
<Particle: u'(이)'>

Particle[word[:morph]] -> str

word에 뒤따르는 표기를 구합니다.

>>> Eun = tossi.parse(u'은')
>>> Eun[u'라면']

>>> Eun[u'라볶이']

morph를 지정해서 어미에 변화를 줄 수 있습니다.

>>> Euro = tossi.parse(u'으로')
>>> Euro[u'라면':u'으론']
으론
>>> Euro[u'라볶이':u'으론']

만든이와 사용권

넥슨 왓 스튜디오이흥섭김찬웅이 만들었고 제3조항을 포함하는 BSD 허가서를 채택했습니다.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].