monsoon-nlp / es-seq2seq-gender-decoder

huggingface.co
Total runs: 22
24-hour runs: 0
7-day runs: 8
30-day runs: 8
Model's Last Updated: May 20 2021
text-generation

Introduction of es-seq2seq-gender-decoder

Model Details of es-seq2seq-gender-decoder

es-seq2seq-gender (decoder)

This is a seq2seq model (decoder half) to "flip" gender in Spanish sentences. The model can augment your existing Spanish data, or generate counterfactuals to test a model's decisions (would changing the gender of the subject or speaker change output?).

Intended Examples:

  • el profesor viejo => la profesora vieja (article, noun, adjective all flip)
  • una actriz => un actor (irregular noun)
  • el lingüista => la lingüista (irregular noun)
  • la biblioteca => la biblioteca (no person, no flip)

People's names are unchanged in this version, but you can use packages such as https://pypi.org/project/gender-guesser/

Sample code

https://colab.research.google.com/drive/1Ta_YkXx93FyxqEu_zJ-W23PjPumMNHe5

import torch
from transformers import AutoTokenizer, EncoderDecoderModel

model = EncoderDecoderModel.from_encoder_decoder_pretrained("monsoon-nlp/es-seq2seq-gender-encoder", "monsoon-nlp/es-seq2seq-gender-decoder")
tokenizer = AutoTokenizer.from_pretrained('monsoon-nlp/es-seq2seq-gender-decoder') # all are same as BETO uncased original

input_ids = torch.tensor(tokenizer.encode("la profesora vieja")).unsqueeze(0)
generated = model.generate(input_ids, decoder_start_token_id=model.config.decoder.pad_token_id)
tokenizer.decode(generated.tolist()[0])
> '[PAD] el profesor viejo profesor viejo profesor...'
Training

I originally developed a gender flip Python script with BETO , the Spanish-language BERT from Universidad de Chile, and spaCy to parse dependencies in sentences.

More about this project: https://medium.com/ai-in-plain-english/gender-bias-in-spanish-bert-1f4d76780617

The seq2seq model is trained on gender-flipped text from that script run on the muchocine dataset , and the first 6,853 lines from the OSCAR corpus (Spanish ded-duped).

The encoder and decoder started with weights and vocabulary from BETO (uncased).

Non-binary gender

This model is useful to generate male and female text samples, but falls short of capturing gender diversity in the world and in the Spanish language. Some communities prefer the plural -@s to represent -os and -as, or -e and -es for gender-neutral or mixed-gender plural, or use fewer gendered professional nouns (la juez and not jueza). This is not yet embraced by the Royal Spanish Academy and is not represented in the corpora and tokenizers used to build this project.

This seq2seq project and script could, in the future, help generate more text samples and prepare NLP models to understand us all better.

Sources

Runs of monsoon-nlp es-seq2seq-gender-decoder on huggingface.co

22
Total runs
0
24-hour runs
2
3-day runs
8
7-day runs
8
30-day runs

More Information About es-seq2seq-gender-decoder huggingface.co Model

es-seq2seq-gender-decoder huggingface.co

es-seq2seq-gender-decoder huggingface.co is an AI model on huggingface.co that provides es-seq2seq-gender-decoder's model effect (), which can be used instantly with this monsoon-nlp es-seq2seq-gender-decoder model. huggingface.co supports a free trial of the es-seq2seq-gender-decoder model, and also provides paid use of the es-seq2seq-gender-decoder. Support call es-seq2seq-gender-decoder model through api, including Node.js, Python, http.

es-seq2seq-gender-decoder huggingface.co Url

https://huggingface.co/monsoon-nlp/es-seq2seq-gender-decoder

monsoon-nlp es-seq2seq-gender-decoder online free

es-seq2seq-gender-decoder huggingface.co is an online trial and call api platform, which integrates es-seq2seq-gender-decoder's modeling effects, including api services, and provides a free online trial of es-seq2seq-gender-decoder, you can try es-seq2seq-gender-decoder online for free by clicking the link below.

monsoon-nlp es-seq2seq-gender-decoder online free url in huggingface.co:

https://huggingface.co/monsoon-nlp/es-seq2seq-gender-decoder

es-seq2seq-gender-decoder install

es-seq2seq-gender-decoder is an open source model from GitHub that offers a free installation service, and any user can find es-seq2seq-gender-decoder on GitHub to install. At the same time, huggingface.co provides the effect of es-seq2seq-gender-decoder install, users can directly use es-seq2seq-gender-decoder installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

es-seq2seq-gender-decoder install url in huggingface.co:

https://huggingface.co/monsoon-nlp/es-seq2seq-gender-decoder

Url of es-seq2seq-gender-decoder

es-seq2seq-gender-decoder huggingface.co Url

Provider of es-seq2seq-gender-decoder huggingface.co

monsoon-nlp
ORGANIZATIONS

Other API from monsoon-nlp

huggingface.co

Total runs: 40
Run Growth: 26
Growth Rate: 65.00%
Updated:September 03 2023
huggingface.co

Total runs: 21
Run Growth: 6
Growth Rate: 28.57%
Updated:February 03 2025
huggingface.co

Total runs: 16
Run Growth: 9
Growth Rate: 56.25%
Updated:February 25 2025
huggingface.co

Total runs: 7
Run Growth: -8
Growth Rate: -114.29%
Updated:May 23 2021