구축 방법 — Embedding · v1.0 · 2026-10-27
■ 방법
- 탭 5개: Word Vectors / Nearest Neighbors / Vector Arithmetic / Sentiment from Vectors / Embeddings in LLMs. 예전 단독 페이지(embed.aileelab.com)의 체험을 탭마다 나눠 실었고, 탭마다 개요·체험·요약·참고문헌을 둠
- 한국어: word2vec skip-gram으로 직접 학습. 64차원 · 창 5 · 음성 표본 10 · 최소 빈도 5 · 15회 반복 · 시드 1 · gensim 4.4.0 · CPU · 실행 20261025T023636Z
- 형태소: Kiwi(kiwipiepy 0.24.1)로 명사·동사·형용사·부사·어근만 남김. 동사·형용사는 '다'를 붙인 기본형
- 영어: GloVe 50차원 사전 학습 벡터 · 상위 2만 단어(알파벳 단어만)
- 벡터는 길이 1로 맞춘 뒤 8비트 정수로 저장, base64 글자 파일(한국어 512KB, 영어 1.3MB)
- 기분 측정기: 단어 벡터 평균 → 로지스틱 회귀(scikit-learn 1.9.1, C 1). 브라우저에서는 형태소 분석기 대신 가장 긴 열쇠 맞추기(명사·부사는 그대로, 동사·형용사는 어간)
- 지도: 보이는 단어로 PCA 2축(거듭제곱법). 이웃·유추: 코사인 유사도
- LLM 없음
■ 데이터
- 네이버 영화평 NSMC v1.0 · 학습 15만 / 시험 5만 · 긍정·부정 라벨 · CC0 1.0 · github.com/e9t/nsmc
- GloVe 6B 50d(Wikipedia 2014 + Gigaword 5) · gensim-data glove-wiki-gigaword-50 · PDDL 1.0
- 구글 유추 시험(questions-words.txt, gensim 4.4.0 동봉) · Apache 2.0
- 성격: 공개 데이터. 사용자가 쓴 영화평·단어는 브라우저 안에서만 계산, 저장 없음
■ 검증
- NSMC 시험 5만 개 감정 정확도: 벡터 평균 + 로지스틱 회귀 80.4% / 같은 모델 + 브라우저 맞춤 토큰 78.7% / 단어 6,000개 세기 + 로지스틱 회귀 82.4% / 무작위 벡터 평균 62.0% / 늘 많은 쪽 50.3%
- 시험 글 중 아는 단어가 하나라도 있는 비율 97.4%(Kiwi), 맞춤 토큰으로 못 찾은 글 806개
- 영어 유추 12,403문항(네 단어 모두 상위 2만 안): GloVe 51.8% / 무작위 벡터 0.0%
- 한국어 유추 예(정답 확인용 아님): 남자:배우=여자:여배우, 공포:무섭다=코미디:웃기다, 최고:재밌다=최악:재미없다, 영화:감독=드라마:작가
- 학습(15만)과 시험(5만) 분리함. 영어 벡터는 사전 학습본이라 유추 시험과 별개
■ 범위
- 한국어 단어 6,000개(영화평에 5번 이상), 영어 단어 2만 개. 영화평 밖의 글에서 기분 점수는 설계 범위 밖
■ 출처
- Mikolov et al. (2013). Distributed representations of words and phrases and their compositionality. NeurIPS.
- Pennington, Socher & Manning (2014). GloVe: Global vectors for word representation. EMNLP.
- Maas et al. (2011). Learning word vectors for sentiment analysis. ACL.
- 데이터: NSMC v1.0 · CC0 1.0 · https://github.com/e9t/nsmc
- 데이터: GloVe 6B · PDDL 1.0 · https://nlp.stanford.edu/projects/glove/
- 도구: Kiwi(kiwipiepy) · LGPL 3.0 · https://github.com/bab2min/kiwipiepy (학습 때만 사용)
How it's built — Embedding · v1.0 · 2026-10-27
■ Method
- 5 tabs: Word Vectors / Nearest Neighbors / Vector Arithmetic / Sentiment from Vectors / Embeddings in LLMs. The hands-on parts of the former stand-alone page (embed.aileelab.com) are split across tabs; each tab has an overview, hands-on part, summary and references
- Korean: word2vec skip-gram trained from scratch. 64 dimensions · window 5 · 10 negative samples · min count 5 · 15 epochs · seed 1 · gensim 4.4.0 · CPU · run 20261025T023636Z
- Morphology: Kiwi (kiwipiepy 0.24.1), keeping nouns, verbs, adjectives, adverbs and roots. Verbs and adjectives in dictionary form ending in 다
- English: pre-trained GloVe, 50 dimensions · top 20,000 words (alphabetic only)
- Vectors normalized to length 1 and stored as 8-bit integers in base64 text files (Korean 512 KB, English 1.3 MB)
- Mood meter: average word vector → logistic regression (scikit-learn 1.9.1, C 1). In the browser, longest-key matching replaces the morphological analyzer (nouns and adverbs as is, verb and adjective stems)
- Map: PCA to 2 axes over the shown words (power iteration). Neighbors and analogies: cosine similarity
- No LLM
■ Data
- Naver Sentiment Movie Corpus NSMC v1.0 · 150,000 train / 50,000 test · positive/negative labels · CC0 1.0 · github.com/e9t/nsmc
- GloVe 6B 50d (Wikipedia 2014 + Gigaword 5) · gensim-data glove-wiki-gigaword-50 · PDDL 1.0
- Google analogy test (questions-words.txt, shipped with gensim 4.4.0) · Apache 2.0
- Nature: public data. Reviews and words typed by visitors are computed in the browser only, not saved
■ Validation
- Sentiment accuracy on 50,000 NSMC test reviews: average vector + logistic regression 80.4% / same model with the browser matcher 78.7% / counting 6,000 words + logistic regression 82.4% / average of random vectors 62.0% / always the larger class 50.3%
- Test reviews with at least one known word: 97.4% (Kiwi); reviews the browser matcher found nothing in: 806
- English analogies, 12,403 questions (all four words in the top 20,000): GloVe 51.8% / random vectors 0.0%
- Korean analogy examples (not a graded test): 남자:배우=여자:여배우, 공포:무섭다=코미디:웃기다, 최고:재밌다=최악:재미없다, 영화:감독=드라마:작가
- Training (150,000) and test (50,000) are separate. English vectors are pre-trained and independent of the analogy test
■ Scope
- 6,000 Korean words (5+ occurrences in the reviews), 20,000 English words. Mood scores for text other than movie reviews are outside the design range
■ Sources
- Mikolov et al. (2013). Distributed representations of words and phrases and their compositionality. NeurIPS.
- Pennington, Socher & Manning (2014). GloVe: Global vectors for word representation. EMNLP.
- Maas et al. (2011). Learning word vectors for sentiment analysis. ACL.
- Data: NSMC v1.0 · CC0 1.0 · https://github.com/e9t/nsmc
- Data: GloVe 6B · PDDL 1.0 · https://nlp.stanford.edu/projects/glove/
- Tool: Kiwi (kiwipiepy) · LGPL 3.0 · https://github.com/bab2min/kiwipiepy (training only)
■ History
- 2026-10-27 · v1.0 · Released