본문 바로가기

강의/Text-Analytics

05-03: Text Representation 2 - Distributed Representation Part3-2 (Fasttext)

<목차>

01. Word-level:NNLM

02. Word-level:Word2Vec

03. Word-level:GloVe

04. Word-level:Fasttext

05.Sentence/Paragraph/Document-level

06.More Things to Embed?

 

<Limitations of NNML, Word2vec, and Glove>

* Ignores the morphology or words by assigning a distinct vector to each word

* Difficult to apply to morphologically rich languages with large vocabularies and many rare words (Turkish or Finnish)

* 형태소 변화가 많은 단어에 대해서는 적용하기 어렵다는 것이 한계이다.

 

<Goal>

* learn representations for character n-grams

* Represent words as the sum of n-gram vectors

* 지금까지는 단어 레벨에서 token을 취해왔다면 character 단위로 n-gram을 취하자는 것이 fasttext의 goal이다. 굉장히 간단하다고 말할 수 있다.

<Revist Negative Sampling in Word2Vec>

* 두 임베딩 사이의 dot product를 이용해서 score를 계산하는 거라면, 그렇다면 w라는 단어가 있을 때 그 w 단어에 해당하는 n-gram을 먼저 define한 다음에 단어 사이에 대해서 계산을 할 때 n-gram에 대한 vector representation을 모두 더해서 내적을 해도 되지 않을까? -> 이것이 Subword model이다. apple만 임베딩했다면 a, ap, app, appl, apple를 모두 임베딩해서 더한 것이 fasttext라고 할 수 있다.