- Download Japanese pretrained model from https://qiita.com/Hironsan/items/513b9f93752ecee9e670
- unzip
- move
model.vec
to.vector_cache/
which is created and used bytorchtext
Last active
November 7, 2017 02:03
-
-
Save tuxedocat/20583f6076a39c7903977bd71788fab5 to your computer and use it in GitHub Desktop.
日本語のFastTextモデルを Torchtextで使いたかった.
This file contains 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
from torchtext.vocab import Vectors | |
class JaFastText(Vectors): | |
def __init__(self, name=None, **kwargs): | |
super(JaFastText, self).__init__(name, url=None, **kwargs) | |
fasttext = JaFastText(name='model.vec') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment