ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

์—๋Ÿฌ ๋‚ด์šฉ

LookupError                               Traceback (most recent call last)
<ipython-input-4-f1856fa1b7bd> in <module>()
      4 
      5 # word tokenization
----> 6 text['headline_text'] = text.apply(lambda row: nltk.word_tokenize(row['headline_text']), axis=1)

 

ํ•ด๊ฒฐ๋ฒ•

  • nltk ํŒจํ‚ค์ง€ ๋‹ค์šด๋กœ๋“œ ์˜ค๋ฅ˜
  • ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ž‘์„ฑํ•˜๋ฉด ํ•ด๊ฒฐ๋œ๋‹ค!
  • import nltk
    nltk.download()

 

๊ฟ€ํŒ

nltk.download("popular")
  • nltk์—์„œ ์ธ๊ธฐ์žˆ๊ณ  ์›ฌ๋งŒํผ ํ•„์š”ํ•œ ๊ฒƒ๋“ค์„ ์•Œ์•„์„œ ๋‹ค์šด๋กœ๋“œ ํ•ด์คŒ
๋Œ“๊ธ€