tubelex-fasttext / README.md
adno's picture
Update README.md
a541106 verified
|
raw
history blame
1.89 kB
---
license: bsd-3-clause
language:
- zh
- en
- id
- ja
- es
---
# TUBELEX FastText Word Embeddings
FastText Word Embeddings trained on the TUBELEX YouTube subtitle corpora. We use the 300-dimensional [fastText](https://github.com/facebookresearch/fastText) CBOW model with position weights, 10 negative samples, 10 epochs, character 5-grams (other paramters: default) ([Grave et al., 2018](https://aclanthology.org/L18-1550)).
We provide both '\*.bin' files (for fastText) and '\*.vec' files that follow the common Word2vec format, and can be used for instance with the `gensim` package.
# What is TUBELEX?
TUBELEX is a YouTube subtitle corpus currently available for Chinese, English, Indonesian, Japanese, and Spanish.
- [preprint](http://arxiv.org/abs/1908.09283), BibTeX entry:
```
@article{nohejl_etal_2024_film,
title={Beyond {{Film Subtitles}}: {{Is YouTube}} the {{Best Approximation}} of {{Spoken Vocabulary}}?},
author={Nohejl, Adam and Hudi, Frederikus and Kardinata, Eunike Andriani and Ozaki, Shintaro and Riera Machin, Maria Angelica and Sun, Hongyu and Vasselli, Justin and Watanabe, Taro},
year={2024}, eprint={2410.03240}, archiveprefix={arXiv}, primaryclass={cs.CL},
url={https://arxiv.org/abs/2410.03240v1}, journal={ArXiv preprint}, volume={arXiv:2410.03240v1 [cs]}
}
```
- [KenLM n-gram models](https://huggingface.co/naist-nlp/tubelex-kenlm)
- [word frequencies and code](https://github.com/naist-nlp/tubelex)
# Usage
To download and use the fastText models in Python, first install dependencies:
```
pip install huggingface_hub
pip install fasttext
```
You can then use e.g. the English (`en`) model in the following way:
```
import fasttext
from huggingface_hub import hf_hub_download
model_file = hf_hub_download(repo_id='naist-nlp/tubelex-kenlm', filename='tubelex-en.bin')
model = fasttext.load_model(model_file)
print(model['koala'])
```