Views
No views yet
embeddings.safetensors → embedding matrix ([vocab_size, 600])vocab.txt → vocabulary (one token per line, aligned with rows)1from huggingface_hub import hf_hub_download
2from safetensors.numpy import load_file
3
4path = hf_hub_download(repo_id="nilc-nlp/wang2vec-cbow-600d",
5 filename="embeddings.safetensors")
6
7data = load_file(path)
8vectors = data["embeddings"]
9
10vocab_path = hf_hub_download(repo_id="nilc-nlp/wang2vec-cbow-600d",
11 filename="vocab.txt")
12with open(vocab_path) as f:
13 vocab = [w.strip() for w in f]
14
15print(vectors.shape)1from safetensors.torch import load_file
2tensors = load_file("embeddings.safetensors")
3vectors = tensors["embeddings"] # torch.Tensor| Corpus | Tokens | Types | Genre | Description |
|---|---|---|---|---|
| LX-Corpus [Rodrigues et al. 2016] | 714,286,638 | 2,605,393 | Mixed genres | Large collection of texts from 19 sources, mostly European Portuguese |
| Wikipedia | 219,293,003 | 1,758,191 | Encyclopedic | Wikipedia dump (2016-10-20) |
| GoogleNews | 160,396,456 | 664,320 | Informative | News crawled from Google News |
| SubIMDB-PT | 129,975,149 | 500,302 | Spoken | Movie subtitles from IMDb |
| G1 | 105,341,070 | 392,635 | Informative | News from G1 portal (2014–2015) |
| PLN-Br [Bruckschen et al. 2008] | 31,196,395 | 259,762 | Informative | Corpus of PLN-BR project (1994–2005) |
| Domínio Público | 23,750,521 | 381,697 | Prose | 138,268 literary works |
| Lacio-Web [Aluísio et al. 2003] | 8,962,718 | 196,077 | Mixed | Literary, informative, scientific, law, didactic texts |
| Literatura Brasileira | 1,299,008 | 66,706 | Prose | Classical Brazilian fiction e-books |
| Mundo Estranho | 1,047,108 | 55,000 | Informative | Texts from Mundo Estranho magazine |
| CHC | 941,032 | 36,522 | Informative | Texts from Ciência Hoje das Crianças |
| FAPESP | 499,008 | 31,746 | Science communication | Texts from Pesquisa FAPESP magazine |
| Textbooks | 96,209 | 11,597 | Didactic | Elementary school textbooks |
| Folhinha | 73,575 | 9,207 | Informative | Children’s news from Folhinha (Folha de São Paulo) |
| NILC subcorpus | 32,868 | 4,064 | Informative | Children’s texts (3rd–4th grade) |
| Para Seu Filho Ler | 21,224 | 3,942 | Informative | Children’s news from Zero Hora |
| SARESP | 13,308 | 3,293 | Didactic | School evaluation texts |
| Total | 1,395,926,282 | 3,827,725 | — | — |
1@inproceedings{hartmann-etal-2017-portuguese,
2 title = {{P}ortuguese Word Embeddings: Evaluating on Word Analogies and Natural Language Tasks},
3 author = {Hartmann, Nathan and Fonseca, Erick and Shulby, Christopher and Treviso, Marcos and Silva, J{'e}ssica and Alu{'i}sio, Sandra},
4 year = 2017,
5 month = oct,
6 booktitle = {Proceedings of the 11th {B}razilian Symposium in Information and Human Language Technology},
7 publisher = {Sociedade Brasileira de Computa{\c{c}}{\~a}o},
8 address = {Uberl{\^a}ndia, Brazil},
9 pages = {122--131},
10 url = {https://aclanthology.org/W17-6615/},
11 editor = {Paetzold, Gustavo Henrique and Pinheiro, Vl{'a}dia}
12}