[Python] KoNLPy mecab / mecab-ko-dic ์„ค์น˜ํ•˜๊ธฐ

2020. 8. 12. 16:52ใ†๐Ÿ†‡ Error&๊ธฐํƒ€

KoNLPy๋Š” ํ˜•ํƒœ์†Œ ๋ถ„์„ ํŒŒ์ด์ฌ ํŒจํ‚ค์ง€๋กœ, kkma๋‚˜ Komoran, Twitter, mecab ๋“ฑ ๋‹ค์–‘ํ•œ tag ํŒจํ‚ค์ง€๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ์ค‘์—์„œ๋„ mecab์„ ์“ด ์ด์œ ๋Š”, ๋ฌธ์žฅ์—์„œ '์˜์•ฝํ’ˆ๋ช…'์„ ์ถ”์ถœํ•˜๊ธฐ ์œ„ํ•ด์„œ ์‚ฌ์šฉ์ž ์‚ฌ์ „์„ ์จ์•ผํ•˜๊ธฐ ๋•Œ๋ฌธ์ด์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ”จMecab-ko / Mecab-ko-dic ์„ค์น˜

mecab์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด KoNLPy ์„ค์น˜์™€ ๋ณ„๋„๋กœ mecab-ko์™€ mecab-ko-dic์„ ๋‘˜ ๋‹ค ์„ค์น˜ํ•ด์ค˜์•ผํ•ฉ๋‹ˆ๋‹ค.

๋จผ์ € ๊ฐ๊ฐ ์ตœ์‹  tar.gz ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•ด์ฃผ์„ธ์š”.

ํ˜„์žฌ ์ตœ์‹  ํŒŒ์ผ์ธ mecab-0.996-ko-0.9.2.tar.gz, mecab-ko-dic-2.1.1-20180720.tar.gz ๋กœ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ‘‰mecab-ko ๋‹ค์šด๋กœ๋“œ: https://bitbucket.org/eunjeon/mecab-ko/downloads/

๐Ÿ‘‰mecab-ko-dic ๋‹ค์šด๋กœ๋“œ: https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/

 

์ €๋Š” Download ํด๋”์—์„œ home์œผ๋กœ tarํŒŒ์ผ์„ ์˜ฎ๊ฒจ๋†“๊ณ  ์••์ถ•์„ ํ•ด์ œํ–ˆ์Šต๋‹ˆ๋‹ค. (*๋งฅ ํ™˜๊ฒฝ์—์„œ ์ง„ํ–‰)


โœ… mecab-ko 

tar zxfv mecab-ko-XX.tar.gz
cd mecab-ko-XX
./configure 
make
make check
su
sudo make install

 

โœ… mecab-ko-dic

tar zxfv mecab-ko-dic-XX.tar.gz
cd mecab-ko-dic-XX
./autogen.sh
./configure 
make
su
sudo make install


ํ˜น์€ brew๋กœ ๊ฐ„๋‹จํ•˜๊ฒŒ ์„ค์น˜ํ• ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

brew install mecab-ko

brew install mecab-ko-dic