BERT model fine-tuned on chilean STEM lessons
Project description
BERT-STEM
BERT model fine-tuned on Science Technology Engineering and Mathematics (STEM) lessons.
Install:
To install from pip:
pip install bertstem
Quickstart
To use it:
from BERT_STEM.Encode import *
import pandas as pd
import transformers
# Download spanish BERTSTEM:
model = transformers.BertModel.from_pretrained("pablouribe/bertstem")
# Download spanish tokenizer:
tokenizer = transformers.BertTokenizerFast.from_pretrained("dccuchile/bert-base-spanish-wwm-uncased",
do_lower_case=True,
add_special_tokens = False)
# Example dataframe with text in spanish
data = {'col_1': [3, 2, 1],
'col_2': ['hola como estan', 'alumnos queridos', 'vamos a hablar de matematicas']}
df = pd.DataFrame.from_dict(data)
# Encode sentences using spanish BERT:
sentence_encoder(df, model, tokenizer, column = 'col_2', encoding = 'sum')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bertstem-0.0.10.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for bertstem-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7df9f2ba7c500a23a23bbc4954e1bba54ad2fa863f0304b2f9c1fc7ee8e202c |
|
MD5 | e1fec0c4424a68a3e6cf8c86ac802f39 |
|
BLAKE2b-256 | 22393e90ce724dedaf3dbdd4eeb1e038950b0a82a7456e101f7da558b14cfc88 |