import huggingface_konlpy
import tokenizers
tokenizers.__version__
- NLP ๊ด๋ จ ๋ค์ํ ํจํค์ง๋ฅผ ์ ๊ณตํ๊ณ ์์ผ๋ฉฐ, ํนํ ์ธ์ด ๋ชจ๋ธ (language models) ์ ํ์ตํ๊ธฐ ์ํ์ฌ ์ธ ๊ฐ์ง ํจํค์ง๊ฐ ์ ์ฉ
package | note |
---|---|
transformers | Transformer ๊ธฐ๋ฐ (masked) language models ์๊ณ ๋ฆฌ์ฆ, ๊ธฐํ์ต๋ ๋ชจ๋ธ์ ์ ๊ณต |
tokenizers | transformers ์์ ์ฌ์ฉํ ์ ์๋ ํ ํฌ๋์ด์ ๋ค์ ํ์ต/์ฌ์ฉํ ์ ์๋ ๊ธฐ๋ฅ ์ ๊ณต. transformers ์ ๋ถ๋ฆฌ๋ ํจํค์ง๋ก ์ ๊ณต |
nlp | ๋ฐ์ดํฐ์ ๋ฐ ํ๊ฐ ์ฒ๋ (evaluation metrics) ์ ์ ๊ณต |
from sklearn.datasets import make_classification
X, y = make_classification(
n_samples=50000, n_features=200, n_informative=5,
n_redundant=0, n_clusters_per_class=10, weights=[0.80],
flip_y=0.05, class_sep=3.5, random_state=42
)
# standard normalization: (x - mean) / std
ํ์ฌ ๋ฒ์ (0.0.491) ์์๋ ์ฝ๋๊ฐ ์ ๋ฆฌ๋์ง ์์์ init ํจ์์ argument ์ด๋ฆ์ด ๋ฐ๋ ์ ์์ต๋๋ค.
์ด ํํ ๋ฆฌ์ผ์ github.com/lovit/textmining-dataset ์ ๋ฐ์ดํฐ์ ์ ์ด์ฉํ ์์์ ๋๋ค.
import soynlp
from soynlp.utils import DoublespaceLineCorpus
from soynlp.noun import LRNounExtractor_v2
from lovit_textmining_dataset.navernews_10days import get_news_paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace matplotlib.pyplot.imshow(img) | |
import numpy as np | |
from bokeh.plotting import figure, show, output_notebook | |
output_notebook() | |
N = 500 | |
x = np.linspace(0, 10, N) |
As configured in my dotfiles.
start new:
tmux
start new with session name: