{"id":13776577,"url":"https://github.com/what-studio/tossi","last_synced_at":"2025-12-28T22:19:14.828Z","repository":{"id":62585037,"uuid":"60787998","full_name":"what-studio/tossi","owner":"what-studio","description":"Chooses correct Korean particle morphs for arbitrary words.","archived":false,"fork":false,"pushed_at":"2018-01-23T11:21:17.000Z","size":50,"stargazers_count":197,"open_issues_count":2,"forks_count":10,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-10T02:43:32.978Z","etag":null,"topics":["korean","linguistics","localization","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/what-studio.png","metadata":{"files":{"readme":"README.en.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-09T16:03:26.000Z","updated_at":"2025-02-09T02:05:48.000Z","dependencies_parsed_at":"2022-11-03T22:04:13.207Z","dependency_job_id":null,"html_url":"https://github.com/what-studio/tossi","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/what-studio%2Ftossi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/what-studio%2Ftossi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/what-studio%2Ftossi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/what-studio%2Ftossi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/what-studio","download_url":"https://codeload.github.com/what-studio/tossi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253551614,"owners_count":21926323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["korean","linguistics","localization","python"],"created_at":"2024-08-03T18:00:29.377Z","updated_at":"2025-12-28T22:19:09.774Z","avatar_url":"https://github.com/what-studio.png","language":"Python","funding_links":[],"categories":["Programming Languages"],"sub_categories":["Python"],"readme":"# Tossi\n\n[![Build Status](\n  https://travis-ci.org/what-studio/tossi.svg?branch=master\n)](https://travis-ci.org/what-studio/tossi)\n[![Coverage Status](\n  https://coveralls.io/repos/github/what-studio/tossi/badge.svg?branch=master\n)](https://coveralls.io/r/what-studio/tossi)\n[![README in English](\n  https://img.shields.io/badge/readme-korean-blue.svg?style=flat\n)](README.en.md)\n\n\"Tossi(토씨)\" is a pure-Korean name for grammatical particles.  Some of Korean\nparticles has allomorphic variant forms depending on a leading word.  The Tossi\nlibrary determines most natural form.\n\n## Installation\n\n```console\n$ pip install tossi\n```\n\n## Usage\n\n```python\n\u003e\u003e\u003e import tossi\n\u003e\u003e\u003e tossi.postfix_particle(u'집', u'(으)로')\n집으로\n\u003e\u003e\u003e tossi.postfix_particle(u'말', u'으로는')\n말로는\n\u003e\u003e\u003e tossi.postfix_particle(u'대한민국', u'은(는)')\n대한민국은\n\u003e\u003e\u003e tossi.postfix_particle(u'민주공화국', u'다')\n민주공화국이다\n```\n\n## Natural Form for Particles\n\nThese particles do not have allomorphic variant.  They always appear in same\nform: `의`, `도`, `만~`, `에~`, `께~`, `뿐~`, `하~`, `보다~`, `밖에~`, `같이~`,\n`부터~`, `까지~`, `마저~`, `조차~`, `마냥~`, `처럼~`, and `커녕~`:\n\n\u003e 나오**의**, 모리안**의**, 키홀**의**, 나오**도**, 모리안**도**, 키홀**도**\n\nMeanwhile, these particles appear in different form depending on whether the\nleading word have a final consonant or not: `은(는)`, `이(가)`, `을(를)`, and\n`과(와)~`:\n\n\u003e 나오**는**, 모리안**은**, 키홀**은**\n\n`(으)로~` also have similar rule but if the final consonant is `ㄹ`, it appears\nsame with after non final consonant:\n\n\u003e 나오**로**, 모리안**으로**, 키홀**로**\n\n`(이)다` which is a predicative particle have more diverse forms.  Its end can\nbe inflected in general:\n\n\u003e 나오**지만**, 모리안**이지만**, 키홀**이에요**, 나오**예요**\n\nTossi tries to determine most natural form for particles.  But if it fails to\ndo, determines both forms like `은(는)` or `(으)로` for tolerance:\n\n```python\n\u003e\u003e\u003e tossi.postfix_particle(u'벽돌', u'으로')\n벽돌로\n\u003e\u003e\u003e tossi.postfix_particle(u'짚', u'으로')\n짚으로\n\u003e\u003e\u003e tossi.postfix_particle(u'黃金', u'으로')\n黃金(으)로\n```\n\nIf the leading word ends with number, a natural form can be determined:\n\n```python\n\u003e\u003e\u003e tossi.postfix_particle(u'레벨 10', u'이')\n레벨 10이\n\u003e\u003e\u003e tossi.postfix_particle(u'레벨 999', u'이')\n레벨 999가\n```\n\nWords in a parentheses are ignored:\n\n```python\n\u003e\u003e\u003e tossi.postfix_particle(u'나뭇가지(만렙)', u'을')\n나뭇가지(만렙)를\n```\n\n## Tolerance Styles\n\nWhen Tossi can't determine the natural form, the result includes the both\nforms.  In this case, you can choose the order of the forms.  For example, if\nthe most words are Japanese, they probably will not end with final consonants.\nTherefore `는(은)` is better than `은(는)` which is the default style:\n\n```python\n\u003e\u003e\u003e tolerance_style = tossi.parse_tolerance_style(u'는(은)')\n\u003e\u003e\u003e tossi.postfix_particle(u'さくら', u'이', tolerance_style=tolerance_style)\nさくら가(이)\n```\n\nChoose one of `은(는)`, `(은)는`, `는(은)`, `(는)은` for your project.\n\n## Licensing\n\nWritten by [Heungsub Lee][sublee] and [Chanwoong Kim][kexplo] at\n[What! Studio][what-studio] in [Nexon][nexon], and distributed under\n[the BSD 3-Clause license][bsd-3-clause].\n\n[nexon]: http://nexon.com/\n[what-studio]: https://github.com/what-studio\n[sublee]: http://subl.ee/\n[kexplo]: http://chanwoong.kim/\n[bsd-3-clause]: http://opensource.org/licenses/BSD-3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhat-studio%2Ftossi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhat-studio%2Ftossi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhat-studio%2Ftossi/lists"}