Published November 17, 2022 | Version 1.0
Dataset Open

Catalan CBOW Word Embeddings in Floret

  • 1. Barcelona Supercomputing Center

Description

Embeddings with the Catalan Textual Corpus

The embeddings have been trained with a Catalan textual corpus of  more than 34GB of data using floret with the following  hyperparameters:

    mode: str = "floret",
    model: str = "cbow",
    dim: int = 300,
    mincount: int = 10,
    minn: int = 5,
    maxn: int = 6,
    neg: int = 10,
    hashcount: int = 2,
    bucket: int = 50000,
    thread: int = 128,

The Catalan Textual Corpus used to train this embeddings, is the extended version of  the initial available corpora described in Armengol-Estapé et al. (2021). This new version includes:

 
Corpus Size in GB
CaCrawlat 13.00
Wikipedia 1.10
DOGC 0.78
Catalan Open Subtitles 0.02
Catalan Oscar 4.00
CaWaC 3.60
Cat. General Crawling 2.50
Cat. Goverment Crawling 0.24
ACN 0.42
Padicat 0.63
RacoCatalà 8.10
NacióDigital 0.42
VilaWeb 0.06

From the new corpora, VilaWeb and NacióDigital come from digital newspapers, Padicat is composed of crawlings of the Biblioteca de Catalunya, and CaCrawlat comes from the Biblioteca Nacional de España (BNE).

The processing took place on an HPC node equipped with an AMD EPYC 7742 (@ 2.250GHz) processor with 128 threads.

How to use

First initialize the spacy vectors from the floret table (.floret file):

spacy init vectors ca floret_embeddings_ca.floret floret_embeddings_ca --mode floret
import spacy

# Load the floret vectors
floret_embeddings = spacy.load("floret_embeddings_ca")

# Get the embeddings of some words
castanyes = floret_embeddings.vocab["castanyes"]
flors = floret_embeddings.vocab["flors"]
primavera = floret_embeddings.vocab["primavera"]
tardor = floret_embeddings.vocab["tardor"]

# Get some similarities
print(flors.similarity(tardor))
print(flors.similarity(primavera))
# flors should be more similar to primavera than tardor.

print(castanyes.similarity(primavera))
print(castanyes.similarity(tardor))
# castanyes should be more similar to tardor than primavera.

Intended Uses and Limitations

At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this card will be updated.

Authors

The Text Mining Unit from Barcelona Supercomputing Center.

Contact Information

For further information, send an email to aina@bsc.es.

Funding

This work was funded by the Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya  within the framework of Projecte AINA.

Copyright

Copyright (c) 2022 Text Mining Unit  - Barcelona Supercomputing Center.

Files

Files (7.9 GB)

Name Size Download all
md5:fcd34181a9d1561e19765912fe2b329a
3.9 GB Download
md5:f4e03bbc97e403a577c523f35cc7172d
114.3 MB Download
md5:a8888dbe0a5ee2111abf2e1f372b4742
3.9 GB Download