Skip to main content

A rule-based politeness styler for the Korean Language

Project description

Politely

PyPI version Workflow status Open in Streamlit Open In Colab Code style: black Hits Downloads Downloads

A rule-based politeness styler for the Korean language
image

Quick Start ๐Ÿš€

1๏ธโƒฃ Install politely

pip3 install politely

2๏ธโƒฃ Split your text into sentences

Split your text into sentences with whatever tools you prefer. Here, we use kiwipiepy for the sake of demonstration:

from kiwipiepy import Kiwi
# an excerpt from ๋™๋ฐฑ๊ฝƒ (๊น€์œ ์ •)
text = """์ž”์†Œ๋ฆฌ๋ฅผ ๋‘๋ฃจ ๋Š˜์–ด๋†“๋‹ค๊ฐ€ ๋‚จ์ด ๋“ค์„๊นŒ๋ด ์†์œผ๋กœ ์ž…์„ ํ‹€์–ด๋ง‰๊ณ ๋Š” ๊ทธ ์†์—์„œ ๊น”๊น”๋Œ„๋‹ค. ๋ณ„๋กœ ์šฐ์Šค์šธ ๊ฒƒ๋„ ์—†๋Š”๋ฐ ๋‚ ์”จ๊ฐ€ ํ’€๋ฆฌ๋”๋‹ˆ ์ด ๋†ˆ์˜ ๊ณ„์ง‘์• ๊ฐ€ ๋ฏธ์ณค๋‚˜ ํ•˜๊ณ  ์˜์‹ฌํ•˜์˜€๋‹ค.
๊ฒŒ๋‹ค๊ฐ€ ์กฐ๊ธˆ ๋’ค์—๋Š” ์ œ ์ง‘๊ป˜๋ฅผ ํ• ๊ธˆํ• ๊ธˆ ๋Œ์•„๋ณด๋”๋‹ˆ ํ–‰์ฃผ์น˜๋งˆ์˜ ์†์œผ๋กœ ๊ผˆ๋˜ ๋ฐ”๋ฅธ์†์„ ๋ฝ‘์•„์„œ ๋‚˜์˜ ํ„ฑ๋ฐ‘์œผ๋กœ ๋ถˆ์‘ฅ ๋‚ด๋ฏธ๋Š” ๊ฒƒ์ด๋‹ค. 
์–ธ์ œ ๊ตฌ์› ๋Š”์ง€ ๋”์šด ๊น€์ด ํ™ฑ ๋ผ์น˜๋Š” ๊ตต์€ ๊ฐ์ž ์„ธ ๊ฐœ๊ฐ€ ์†์— ๋ฟŒ๋“ฏ์ด ์ฅ์˜€๋‹ค. "๋Š ์ง‘์—” ์ด๊ฑฐ ์—†์ง€?" ํ•˜๊ณ  ์ƒ์ƒ‰์žˆ๋Š” ํฐ์†Œ๋ฆฌ๋ฅผ ํ•˜๊ณ ๋Š” ์ œ๊ฐ€ ์ค€ ๊ฒƒ์„ ๋‚จ์ด ์•Œ๋ฉด์€ ํฐ์ผ๋‚ ํ…Œ๋‹ˆ ์—ฌ๊ธฐ์„œ ์–ผ๋ฅธ ๋จน์–ด ๋ฒ„๋ฆฌ๋ž€๋‹ค.
๊ทธ๋ฆฌ๊ณ  ๋˜ ํ•˜๋Š” ์†Œ๋ฆฌ๊ฐ€, "๋„ˆ ๋ด„๊ฐ์ž๊ฐ€ ๋ง›์žˆ๋‹จ๋‹ค." "๋‚œ ๊ฐ์ž ์•ˆ ๋จน๋Š”๋‹ค. ๋„ˆ๋‚˜ ๋จน์–ด๋ผ." ๋‚˜๋Š” ๊ณ ๊ฐœ๋„ ๋Œ๋ฆฌ์ง€ ์•Š๊ณ  ์ผํ•˜๋˜ ์†์œผ๋กœ ๊ทธ ๊ฐ์ž๋ฅผ ๋„๋กœ ์–ด๊นจ ๋„ˆ๋จธ๋กœ ์‘ฅ ๋ฐ€์–ด ๋ฒ„๋ ธ๋‹ค.
๊ทธ๋žฌ๋”๋‹ˆ ๊ทธ๋ž˜๋„ ๊ฐ€๋Š” ๊ธฐ์ƒ‰์ด ์—†๊ณ , ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์Œ”๊ทผ์Œ”๊ทผํ•˜๊ณ  ์‹ฌ์ƒ์น˜ ์•Š๊ฒŒ ์ˆจ์†Œ๋ฆฌ๊ฐ€ ์ ์  ๊ฑฐ์น ์–ด์ง„๋‹ค. ์ด๊ฑด ๋˜ ๋ญ์•ผ ์‹ถ์–ด์„œ ๊ทธ๋•Œ์—์•ผ ๋น„๋กœ์†Œ ๋Œ์•„๋‹ค๋ณด๋‹ˆ ๋‚˜๋Š” ์ฐธ์œผ๋กœ ๋†€๋ž๋‹ค.
์šฐ๋ฆฌ๊ฐ€ ์ด ๋™๋„ค์— ๋“ค์–ด์˜จ ๊ฒƒ์€ ๊ทผ ์‚ผ๋…„์งธ ๋˜์–ด์˜ค์ง€๋งŒ ์—ฌํƒœ๊ป ๊ฐ€๋ฌด์žก์žกํ•œ ์ ์ˆœ์ด์˜ ์–ผ๊ตด์ด ์ด๋ ‡๊ฒŒ๊นŒ์ง€ ํ™๋‹น๋ฌด์ฒ˜๋Ÿผ ์ƒˆ๋นจ๊ฐœ์ง„ ๋ฒ•์ด ์—†์—ˆ๋‹ค.
๊ฒŒ๋‹ค๊ฐ€ ๋ˆˆ์— ๋…์„ ์˜ฌ๋ฆฌ๊ณ  ํ•œ์ฐธ ๋‚˜๋ฅผ ์š”๋ ‡๊ฒŒ ์˜์•„๋ณด๋”๋‹ˆ ๋‚˜์ค‘์—๋Š” ๋ˆˆ๋ฌผ๊นŒ์ง€ ์–ด๋ฆฌ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ƒ.
๊ทธ๋ฆฌ๊ณ  ๋ฐ”๊ตฌ๋‹ˆ๋ฅผ ๋‹ค์‹œ ์ง‘์–ด๋“ค๋”๋‹ˆ ์ด๋ฅผ ๊ผญ ์•…๋ฌผ๊ณ ๋Š” ์—Ž์–ด์งˆ ๋“ฏ ์ž๋น ์งˆ ๋“ฏ ๋…ผ๋‘‘์œผ๋กœ ํšกํ•˜๊ฒŒ ๋‹ฌ์•„๋‚˜๋Š” ๊ฒƒ์ด๋‹ค."""
kiwi = Kiwi()
sents = [sent.text.strip() for sent in kiwi.split_into_sents(text)]

3๏ธโƒฃ Speak politely with Styler

Instantiate an object of Styler, and style your sentences in a polite or formal manner with it:

from politely import Styler
from pprint import pprint
styler = Styler()
pprint(" ".join([styler(sent, 1) for sent in sents]))  # 1 = polite
('์ž”์†Œ๋ฆฌ๋ฅผ ๋‘๋ฃจ ๋Š˜์–ด๋†“๋‹ค๊ฐ€ ๋‚จ์ด ๋“ค์„๊นŒ ๋ด ์†์œผ๋กœ ์ž…์„ ํ‹€์–ด๋ง‰๊ณ ๋Š” ๊ทธ ์†์—์„œ ๊น”๊น”๋Œ€์š”. ๋ณ„๋กœ ์šฐ์Šค์šธ ๊ฒƒ๋„ ์—†๋Š”๋ฐ ๋‚ ์”จ๊ฐ€ ํ’€๋ฆฌ๋”๋‹ˆ ์ด ๋†ˆ์˜ '
 '๊ณ„์ง‘์• ๊ฐ€ ๋ฏธ์ณค๋‚˜ ํ•˜๊ณ  ์˜์‹ฌํ–ˆ์–ด์š”. ๊ฒŒ๋‹ค๊ฐ€ ์กฐ๊ธˆ ๋’ค์—๋Š” ์ œ ์ง‘๊ป˜๋ฅผ ํ•  ๊ธˆํ•  ๊ธˆ ๋Œ์•„๋ณด๋”๋‹ˆ ํ–‰์ฃผ์น˜๋งˆ์˜ ์†์œผ๋กœ ๊ผˆ๋˜ ๋ฐ”๋ฅธ ์†์„ ๋ฝ‘์•„์„œ ์ œ ํ„ฑ '
 '๋ฐ‘์œผ๋กœ ๋ถˆ์‘ฅ ๋‚ด๋ฏธ๋Š” ๊ฒŒ์—์š”. ์–ธ์ œ ๊ตฌ์› ๋Š”์ง€ ๋”์šด ๊น€์ด ํ™ฑ ๋ผ์น˜๋Š” ๊ตต์€ ๊ฐ์ž ์„ธ ๊ฐœ๊ฐ€ ์†์— ๋ฟŒ๋“ฏ์ด ์ฅ์˜€์–ด์š”. "๋Š ์ง‘์—๋Š” ์ด ๊ฑฐ ์—†์ฃ ? '
 '"ํ•˜๊ณ  ์ƒ์ƒ‰ ์žˆ๋Š” ํฐ ์†Œ๋ฆฌ๋ฅผ ํ•˜๊ณ ๋Š” ์ œ๊ฐ€ ์ค€ ๊ฒƒ์„ ๋‚จ์ด ์•Œ๋ฉด์€ ํฐ์ผ ๋‚  ํ…Œ๋‹ˆ ์—ฌ๊ธฐ์„œ ์–ผ๋ฅธ ๋จน์–ด ๋ฒ„๋ฆฌ๋ž˜์š”. ๊ทธ๋ฆฌ๊ณ  ๋˜ ํ•˜๋Š” ์†Œ๋ฆฌ๊ฐ€,"๋‹น์‹  '
 '๋ด„ ๊ฐ์ž๊ฐ€ ๋ง›์žˆ์–ด์š”. ""๋‚œ ๊ฐ์ž ์•ˆ ๋จน์–ด์š”. ๋‹น์‹ ์ด๋‚˜ ๋จน์–ด์š”. "์ €๋Š” ๊ณ ๊ฐœ๋„ ๋Œ๋ฆฌ์ง€ ์•Š๊ณ  ์ผํ•˜๋˜ ์†์œผ๋กœ ๊ทธ ๊ฐ์ž๋ฅผ ๋„๋กœ ์–ด๊นจ ๋„ˆ๋จธ๋กœ ์‘ฅ '
 '๋ฐ€์–ด ๋ฒ„๋ ธ์–ด์š”. ๊ทธ๋žฌ๋”๋‹ˆ ๊ทธ๋ž˜๋„ ๊ฐ€๋Š” ๊ธฐ์ƒ‰์ด ์—†๊ณ , ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์Œ”๊ทผ์Œ”๊ทผํ•˜๊ณ  ์‹ฌ์ƒํ•˜์ง€ ์•Š๊ฒŒ ์ˆจ์†Œ๋ฆฌ๊ฐ€ ์ ์  ๊ฑฐ์น ์–ด์ ธ์š”. ์ด๊ฑฐ๋Š” ๋˜ ๋ญ์•ผ '
 '์‹ถ์–ด์„œ ๊ทธ ๋•Œ์—์•ผ ๋น„๋กœ์†Œ ๋Œ์•„๋‹ค๋ณด๋‹ˆ ์ €๋Š” ์ฐธ์œผ๋กœ ๋†€๋ž์–ด์š”. ์ €ํฌ๊ฐ€ ์ด ๋™๋„ค์— ๋“ค์–ด์˜จ ๊ฒƒ์€ ๊ทผ ์‚ผ ๋…„์งธ ๋ผ ์˜ค์ง€๋งŒ ์—ฌํƒœ๊ป ๊ฐ€๋ฌด์žก์žกํ•œ ์ ์ˆ˜๋Š” '
 '์ด์˜ ์–ผ๊ตด์ด ์ด๋ ‡๊ฒŒ๊นŒ์ง€ ํ™๋‹น๋ฌด์ฒ˜๋Ÿผ ์ƒˆ๋นจ๊ฐœ์ง„ ๋ฒ•์ด ์—†์—ˆ์–ด์š”. ๊ฒŒ๋‹ค๊ฐ€ ๋ˆˆ์— ๋…์„ ์˜ฌ๋ฆฌ๊ณ  ํ•œ์ฐธ ์ €๋ฅผ ์š”๋ ‡๊ฒŒ ์˜์•„๋ณด๋”๋‹ˆ ๋‚˜์ค‘์—๋Š” ๋ˆˆ๋ฌผ๊นŒ์ง€ ์–ด๋ฆฌ๋Š” '
 '๊ฒŒ ์•„๋…€์š”. ๊ทธ๋ฆฌ๊ณ  ๋ฐ”๊ตฌ๋‹ˆ๋ฅผ ๋‹ค์‹œ ์ง‘์–ด ๋“ค๋”๋‹ˆ ์ด๋ฅผ ๊ผญ ์•…๋ฌผ๊ณ ๋Š” ์—Ž์–ด์งˆ ๋“ฏ ์ž๋น ์งˆ ๋“ฏ ๋…ผ๋‘‘์œผ๋กœ ํšกํ•˜๊ฒŒ ๋‹ฌ์•„๋‚˜๋Š” ๊ฒŒ์—์š”.')
pprint(" ".join([styler(sent, 2) for sent in sents]))  # 2 = formal
('์ž”์†Œ๋ฆฌ๋ฅผ ๋‘๋ฃจ ๋Š˜์–ด๋†“๋‹ค๊ฐ€ ๋‚จ์ด ๋“ค์„๊นŒ ๋ด ์†์œผ๋กœ ์ž…์„ ํ‹€์–ด๋ง‰๊ณ ๋Š” ๊ทธ ์†์—์„œ ๊น”๊น”๋Œ‘๋‹ˆ๋‹ค. ๋ณ„๋กœ ์šฐ์Šค์šธ ๊ฒƒ๋„ ์—†๋Š”๋ฐ ๋‚ ์”จ๊ฐ€ ํ’€๋ฆฌ๋”๋‹ˆ ์ด ๋†ˆ์˜ '
 '๊ณ„์ง‘์• ๊ฐ€ ๋ฏธ์ณค๋‚˜ ํ•˜๊ณ  ์˜์‹ฌํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฒŒ๋‹ค๊ฐ€ ์กฐ๊ธˆ ๋’ค์—๋Š” ์ œ ์ง‘๊ป˜๋ฅผ ํ•  ๊ธˆํ•  ๊ธˆ ๋Œ์•„๋ณด๋”๋‹ˆ ํ–‰์ฃผ์น˜๋งˆ์˜ ์†์œผ๋กœ ๊ผˆ๋˜ ๋ฐ”๋ฅธ ์†์„ ๋ฝ‘์•„์„œ ์ œ ํ„ฑ '
 '๋ฐ‘์œผ๋กœ ๋ถˆ์‘ฅ ๋‚ด๋ฏธ๋Š” ๊ฒ๋‹ˆ๋‹ค. ์–ธ์ œ ๊ตฌ์› ๋Š”์ง€ ๋”์šด ๊น€์ด ํ™ฑ ๋ผ์น˜๋Š” ๊ตต์€ ๊ฐ์ž ์„ธ ๊ฐœ๊ฐ€ ์†์— ๋ฟŒ๋“ฏ์ด ์ฅ์˜€์Šต๋‹ˆ๋‹ค. "๋Š ์ง‘์—๋Š” ์ด ๊ฑฐ '
 '์—†์Šต๋‹ˆ๊นŒ? "ํ•˜๊ณ  ์ƒ์ƒ‰ ์žˆ๋Š” ํฐ ์†Œ๋ฆฌ๋ฅผ ํ•˜๊ณ ๋Š” ์ œ๊ฐ€ ์ค€ ๊ฒƒ์„ ๋‚จ์ด ์•Œ๋ฉด์€ ํฐ์ผ ๋‚  ํ…Œ๋‹ˆ ์—ฌ๊ธฐ์„œ ์–ผ๋ฅธ ๋จน์–ด ๋ฒ„๋ฆฌ๋ž๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋˜ ํ•˜๋Š” '
 '์†Œ๋ฆฌ๊ฐ€,"๋‹น์‹  ๋ด„ ๊ฐ์ž๊ฐ€ ๋ง›์žˆ์Šต๋‹ˆ๋‹ค. ""๋‚œ ๊ฐ์ž ์•ˆ ๋จน์Šต๋‹ˆ๋‹ค. ๋‹น์‹ ์ด๋‚˜ ๋จน์‹ญ์‹œ์˜ค. "์ €๋Š” ๊ณ ๊ฐœ๋„ ๋Œ๋ฆฌ์ง€ ์•Š๊ณ  ์ผํ•˜๋˜ ์†์œผ๋กœ ๊ทธ ๊ฐ์ž๋ฅผ '
 '๋„๋กœ ์–ด๊นจ ๋„ˆ๋จธ๋กœ ์‘ฅ ๋ฐ€์–ด ๋ฒ„๋ ธ์Šต๋‹ˆ๋‹ค. ๊ทธ๋žฌ๋”๋‹ˆ ๊ทธ๋ž˜๋„ ๊ฐ€๋Š” ๊ธฐ์ƒ‰์ด ์—†๊ณ , ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์Œ”๊ทผ์Œ”๊ทผํ•˜๊ณ  ์‹ฌ์ƒํ•˜์ง€ ์•Š๊ฒŒ ์ˆจ์†Œ๋ฆฌ๊ฐ€ ์ ์  '
 '๊ฑฐ์น ์–ด์ง‘๋‹ˆ๋‹ค. ์ด๊ฑฐ๋Š” ๋˜ ๋ญ์•ผ ์‹ถ์–ด์„œ ๊ทธ ๋•Œ์—์•ผ ๋น„๋กœ์†Œ ๋Œ์•„๋‹ค๋ณด๋‹ˆ ์ €๋Š” ์ฐธ์œผ๋กœ ๋†€๋ž์Šต๋‹ˆ๋‹ค. ์ €ํฌ๊ฐ€ ์ด ๋™๋„ค์— ๋“ค์–ด์˜จ ๊ฒƒ์€ ๊ทผ ์‚ผ ๋…„์งธ ๋ผ '
 '์˜ค์ง€๋งŒ ์—ฌํƒœ๊ป ๊ฐ€๋ฌด์žก์žกํ•œ ์ ์ˆ˜๋Š” ์ด์˜ ์–ผ๊ตด์ด ์ด๋ ‡๊ฒŒ๊นŒ์ง€ ํ™๋‹น๋ฌด์ฒ˜๋Ÿผ ์ƒˆ๋นจ๊ฐœ์ง„ ๋ฒ•์ด ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฒŒ๋‹ค๊ฐ€ ๋ˆˆ์— ๋…์„ ์˜ฌ๋ฆฌ๊ณ  ํ•œ์ฐธ ์ €๋ฅผ ์š”๋ ‡๊ฒŒ '
 '์˜์•„๋ณด๋”๋‹ˆ ๋‚˜์ค‘์—๋Š” ๋ˆˆ๋ฌผ๊นŒ์ง€ ์–ด๋ฆฌ๋Š” ๊ฒŒ ์•„๋‹™๋””๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฐ”๊ตฌ๋‹ˆ๋ฅผ ๋‹ค์‹œ ์ง‘์–ด ๋“ค๋”๋‹ˆ ์ด๋ฅผ ๊ผญ ์•…๋ฌผ๊ณ ๋Š” ์—Ž์–ด์งˆ ๋“ฏ ์ž๋น ์งˆ ๋“ฏ ๋…ผ๋‘‘์œผ๋กœ '
 'ํšกํ•˜๊ฒŒ ๋‹ฌ์•„๋‚˜๋Š” ๊ฒ๋‹ˆ๋‹ค.')

4๏ธโƒฃ add_rules of your own

you can add your own rules with add_rules method:

styler.add_rules(
    {"์ด๐ŸทVCP๐Ÿ”—(?P<MASK>๋‹ค๐ŸทEF)": (
        {"๋‹ค๐ŸทEF"},
        {"์—์š”๐ŸทEF"},  # ์—์š”.
        {"์Šต๋‹ˆ๋‹ค๐ŸทEF"},
    )
    })
sent = "ํ•œ๊ธ€์€ ํ•œ๊ตญ์˜ ๊ธ€์ž์ด๋‹ค."
print(styler(sent, 1))
ํ•œ๊ธ€์€ ํ•œ๊ตญ์˜ ๊ธ€์ž์—์š”.

You can add multiple rules altogether too. Use politely.SELF to refer to the original word.

from politely import SELF
styler.add_rules(
    {
        r"(?P<MASK>(์•„๋น |์•„๋ฒ„์ง€|์•„๋ฒ„๋‹˜)๐ŸทNNG)": (
            {f"์•„๋น ๐ŸทNNG"},
            {f"์•„๋ฒ„์ง€๐ŸทNNG", f"์•„๋ฒ„๋‹˜๐ŸทNNG"},
            {f"์•„๋ฒ„์ง€๐ŸทNNG", f"์•„๋ฒ„๋‹˜๐ŸทNNG"}
        ),
        r"(์•„๋น |์•„๋ฒ„์ง€|์•„๋ฒ„๋‹˜)๐ŸทNNG๐Ÿ”—(?P<MASK>\S+?๐ŸทJKS)": (
            {SELF},  #  no change, replace with the original
            {f"๊ป˜์„œ๐ŸทJKS"},
            {f"๊ป˜์„œ๐ŸทJKS"}
        ),
        r"(?P<MASK>แ†ซ๋‹ค๐ŸทEF)": (
            {SELF},  # no change, replace with the original
            {"์‹œ๐ŸทEP๐Ÿ”—์–ด์š”๐ŸทEF"},
            {"์‹œ๐ŸทEP๐Ÿ”—์Šต๋‹ˆ๋‹ค๐ŸทEF"},
        )
    }
)
sent = "์•„๋น ๊ฐ€ ์ •์‹ค์— ๋“ค์–ด๊ฐ„๋‹ค."
print(styler(sent, 1))
from pprint import pprint
pprint(styler.logs['guess']['out'])  # you can look up the candidates from here
์•„๋ฒ„์ง€๊ป˜์„œ ์ •์‹ค์— ๋“ค์–ด๊ฐ€์…”์š”.
[(['์•„๋ฒ„์ง€๐ŸทNNG', '๊ป˜์„œ๐ŸทJKS', '์ •์‹ค๐ŸทNNG', '์—๐ŸทJKB', '๋“ค์–ด๊ฐ€๐ŸทVV', '์‹œ๐ŸทEP', '์–ด์š”๐ŸทEF', '.๐ŸทSF'],
  0.0125),
 (['์•„๋ฒ„๋‹˜๐ŸทNNG', '๊ป˜์„œ๐ŸทJKS', '์ •์‹ค๐ŸทNNG', '์—๐ŸทJKB', '๋“ค์–ด๊ฐ€๐ŸทVV', '์‹œ๐ŸทEP', '์–ด์š”๐ŸทEF', '.๐ŸทSF'],
  0.0125)]

Hosting the interactive demo

You can either host the interactive demo locally (you first have to sign up for papago API to get your secrets)

export NAVER_CLIENT_ID = ...
export NAVER_CLIENT_SECRET = ...
# host the demo via streamlit
streamlit run main_deploy.py
Or just visit the demo we are hosting for you
image

What politely can't ๐Ÿ™…

politely's Styler cannnot take contexts into account because its conjugation algorithm is fundamentally rule-based. The algorithm is nothing but a chain of glorified if-else's. As a consequence of this, Styler can't disambiguate context-dependent conjugations, like so:

# ๊ถŒ์œ  / ์ฒญ์œ ์˜ ์ฐจ์ด๋Š” ๋งฅ๋ฝ์— ์˜์กด
print(styler("์ €๋Š” ์“ฐ๋ ˆ๊ธฐ๋ฅผ ์ฃผ์›Œ์š”.", 2))
print(styler("์ž, ๊ฐ™์ด ์“ฐ๋ ˆ๊ธฐ๋ฅผ ์ฃผ์›Œ์š”.", 2))
์ €๋Š” ์“ฐ๋ ˆ๊ธฐ๋ฅผ ์ค์Šต๋‹ˆ๋‹ค.
์ž, ๊ฐ™์ด ์“ฐ๋ ˆ๊ธฐ๋ฅผ ์ค์Šต๋‹ˆ๋‹ค. (should be "์ž, ๊ฐ™์ด ์“ฐ๋ ˆ๊ธฐ๋ฅผ ์ฃผ์›์‹œ๋‹ค")
# ์ด๋ฅด + ์–ด -> ์ด๋ฅด๋Ÿฌ/์ผ๋Ÿฌ ๋˜ํ•œ ๋งฅ๋ฝ์— ์˜์กด
print(styler("ํ•˜์ง€ ๋ง๋ผ๊ณ  ์ผ๋ €๋‹ค.", 2))
print(styler("์ •์ƒ์— ์ด๋ฅด๋ €๋‹ค.", 2))
ํ•˜์ง€ ๋ง๋ผ๊ณ  ์ผ๋ €์Šต๋‹ˆ๋‹ค.
์ •์ƒ์— ์ผ๋ €์Šต๋‹ˆ๋‹ค. (should be "์ •์ƒ์— ์ด๋ฅด๋ €์Šต๋‹ˆ๋‹ค")

By whom? ๐Ÿ‘

  • funded by: Faculty of Oriental Studies at the University of Oxford
  • led & developed by: Jieun Kiaer (Associate Professor of Korean Language and Linguistics at the University of Oxford)
  • co-developed by: Research assistant Eu-Bin KIM (Msc. in Applied Linguistics at the University of Oxford, Bsc. in AI at the University of Manchester )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

politely-3.2.3.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

politely-3.2.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file politely-3.2.3.tar.gz.

File metadata

  • Download URL: politely-3.2.3.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for politely-3.2.3.tar.gz
Algorithm Hash digest
SHA256 db81e9540511fe4b951c740a473c3e0ade156a4df02787e3aaad508c401fc6ca
MD5 96ab191f9631450bc2a45815f633eeb1
BLAKE2b-256 87e3edf9061a642d43d8574169c55ae2ab03e1b294710cbf69ffcbdea3aeddd9

See more details on using hashes here.

File details

Details for the file politely-3.2.3-py3-none-any.whl.

File metadata

  • Download URL: politely-3.2.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for politely-3.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4294b89a6f59c8fa340e5f8439253f33430f2952cfc08a1c9a28095dca6f998a
MD5 65ebe2ddc09a6b7113dd37294daa2b79
BLAKE2b-256 d7fb735bb0923a0f31f9e07a369c7bcbce2c7de409d8ed3bbb2accdb1770abdf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page