日本語の分散表現の計算方法まとめ

単語単位の分散表現

  • Word2vec
    • 自然言語処理における分散表現の一つのオリジナル
    • 基本原理くらいは知っていてもいいかもしれない
    • gensimがよく使われる
  • Fasttext で文書分類問題までやったった
    • fastと名前がついているだけあってfacebookが公開しているモデルは高速に動作する
    • 分散表現とクラス分類に対応していたり、利便性が高い
    • 特にこのモデルで利用されている分かち書きの特徴から未知語に強いとされている
  • 日本語Wikipediaで学習済みのBERTが公開されているので使い方メモ
    • Google の検索エンジンにも採用されている、らしい
    • 自然言語処理の研究を大きく変えたモデル
    • 関連する技術であるTransformerは自然言語処理だけでなく、画像処理の界隈にも流用された
    • huggingfaceで日本語版のBERTも色々と公開されている
  • 日本語に対応したT5
    • この日本語版のモデルの作者が公開しているサンプルがわかりやすい
    • また同じ作者がSBERTのモデルも公開している

文単位の分散表現

  • tf-idf
    • 最初の選択肢
    • 単語の出現頻度を計算してスコアを割り当てる
    • gensimがよく使われる
  • BM25
    • 単語の出現頻度を計算してスコアを出す
    • QAモデルの最初の大雑把な検索によく使われる印象
  • doc2vec
    • word2vecの文書版
    • gensimがよく使われる
  • Universal Sentence Encoder
    • 結構重宝する
    • そこそこ性能もよく使い勝手がいい
  • SBERT
    • GPUがないとしんどいかも
    • 性能自体は上のUSEよりも体感ではいい

How to use NeuralClassifier, a library that provides a crazy number of models for document classification problems

[! [](https://1.bp.blogspot.com/-YlMb8v77MN4/XurdQSzS1yI/AAAAAAAAg6Y/oSZrJ0c9yxYbzQnNNTynRvZnEp-xGE7NwCK4BGAsYHg/s320/AFE90C8A-A49C- 4475-9F05-50E2D56D5B63.jpeg)](https://1.bp.blogspot.com/-YlMb8v77MN4/XurdQSzS1yI/AAAAAAAAg6Y/oSZrJ0c9yxYbzQnNNTynRvZnEp-xGE7NwCK4 BGAsYHg/s1920/AFE90C8A-A49C-4475-9F05-50E2D56D5B63.jpeg)

NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit is a python library for multi-label document classification problems published by Tencent.

For more information, see

[NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit](https://github.com/Tencent/NeuralNLP- NeuralClassifier) NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios.

for more details.

NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios.

[Read More]

I even did a document classification problem with Fasttext

Summary of what I’ve done with Fasttext to the document classification problem.

  • Facebook research has published a document classification library using Fasttext.
  • Fasttext is easy to install in a python environment.
  • Run time is fast.

Preliminaries

I decided to tackle the task of document classification, and initially thought.

NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit

NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit. However, it was not very accurate.

[Read More]