File size: 1,328 Bytes
ba3be43
 
 
 
 
 
 
 
 
 
 
 
dc441d6
 
 
ba3be43
 
 
 
 
 
 
dc441d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cfef1bb
dc441d6
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
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.

- TODO: paper link
- [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'])
```