๋ณธ ๊ณผ์ ์์๋ string ๋ค๋ฃจ๋ ๋ฐฉ๋ฒ์ ํ์ตํฉ๋๋ค. ๋ค๋ฅธ ์๋ฃ๊ตฌ์กฐ๋ฅผ ํ์์์ ์ฌ์ฉํ์๋ฉด ๋ฉ๋๋ค. ๋ณธ ๊ณผ์ ์์ ํ์ด์ผ ํ ๋ฌธ์ ๋ ์๋ 2๊ฐ์ง๊ฐ ์์ต๋๋ค.
- ์๋๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ์์ github repository๋ฅผ ๋ณต์ฌํจ https://classroom.github.com/a/ZMt5NpxJ
- ์๋ ์ฝ๋๋ฅผ ์ฌ์ฉํ์ฌ ์์ ์ฝ๋ github repository๋ฅผ ์์ ์ ์ปดํจํฐ๋ก ํด๋ก ํจ
git clone <๋ ํฌ์งํ ๋ฆฌ URL>
- ํด๋น ํด๋๋ก ์ด๋ํ์ฌ ์์ ์ ์ฝ๋๋ฅผ ์์ ํจ
- normalize
์ธํ์ผ๋ก ๋ฐ๋ ์คํธ๋ง์์ ์ ๊ทํ๋ ์คํธ๋ง์ ๋ฐํํจ
์๋์ ์๊ฑด๋ค์ ์ถฉ์กฑ์์ผ์ผํจ
* ๋ชจ๋ ๋จ์ด๋ค์ ์๋ฌธ์๋ก ๋์ด์ผํจ
* ๋์ด์ฐ๊ธฐ๋ ํ์นธ์ผ๋ก ๋์ด์ผํจ
* ์๋ค ํ์์๋ ๋์ด์ฐ๊ธฐ๋ ์ ๊ฑฐํด์ผํจ
Parameters:
input_string (string): ์์ด๋ก ๋ ๋๋ฌธ์, ์๋ฌธ์, ๋์ด์ฐ๊ธฐ, ๋ฌธ์ฅ๋ถํธ, ์ซ์๋ก ์ด๋ฃจ์ด์ง string
ex - "This is an example.", " EXTRA SPACE "
Returns:
normalized_string (string): ์ ์๊ฑด์ ์ถฉ์กฑ์ํจ ์ ๊ทํ๋ string
ex - 'this is an example.'
Examples:
>>> import text_processing as tp
>>> input_string1 = "This is an example."
>>> tp.normalize(input_string1)
'this is an example.'
>>> input_string2 = " EXTRA SPACE "
>>> tp.normalize(input_string2)
'extra space'
- no_vowels
์ธํ์ผ๋ก ๋ฐ๋ ์คํธ๋ง์์ ๋ชจ๋ ๋ชจ์ (a, e, i, o, u)๋ฅผ ์ ๊ฑฐ์ํจ ์คํธ๋ง์ ๋ฐํํจ
Parameters:
input_string (string): ์์ด๋ก ๋ ๋๋ฌธ์, ์๋ฌธ์, ๋์ด์ฐ๊ธฐ, ๋ฌธ์ฅ๋ถํธ๋ก ์ด๋ฃจ์ด์ง string
ex - "This is an example."
Returns:
no_vowel_string (string): ๋ชจ๋ ๋ชจ์ (a, e, i, o, u)๋ฅผ ์ ๊ฑฐ์ํจ ์คํธ๋ง
ex - "Ths s n xmpl."
Examples:
>>> import text_processing as tp
>>> input_string1 = "This is an example."
>>> tp.normalize(input_string1)
"Ths s n xmpl."
>>> input_string2 = "We love Python!"
>>> tp.normalize(input_string2)
''W lv Pythn!'