Sponsored by
Crazyrouter
-The enterprise-grade, cost-effective AI API gateway that provides one API key to access 300+ AI models through OpenAI-compatible endpoints, with
RePublic (
re
putation analyzer for
public
service organizations) is a Dutch BERT model based on BERTje (De Vries, 2019). The model was designed to predict the sentiment in Dutch-language news article text about public agencies. RePublic was developed by
CLiPS
in collaboration with Prof. Dr.
Jan Boon
.
How to use
The model can be loaded and used to make predictions as follows:
from transformers import pipeline
model_path = 'clips/republic'
pipe = pipeline(task="text-classification",
model=model_path, tokenizer=model_path)
text = … # load your text here
output = pipe(text)
prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negative”
Training data and procedure
RePublic was domain-adapted on 91 661 Flemish news articles from three popular Flemish news providers between 2000 and 2020 (“Het Laatste Nieuws”, “Het Nieuwsblad” and “De Morgen”). These articles mention at least one out of a pre-defined list of 24 public service organizations, which contains, a.o., De Lijn (public transport organization), VDAB (Flemish job placement service), and Agentschap Zorg en Gezondheid (healthcare service). The domain adaptation was achieved by performing BERT’s language modeling tasks (masked language modeling & next sentence prediction).
The model was then fine-tuned on a sentiment classification task (“positive”, “negative”, “neutral”). The supervised data consisted of 4404 annotated sentences mentioning Flemish public agencies of which 1257 sentences were positive, 1485 sentences were negative and 1662 sentences were neutral. Fine-tuning was performed for 4 epochs using a batch size of 8 and a learning rate of 5e-5. In order to evaluate the model, a 10-fold cross validation experiment was conducted. The results of this experiment can be found below.
Class
Precision (%)
Recall (%)
F1-score (%)
Positive
87.3
88.6
88.0
Negative
86.4
86.5
86.5
Neutral
85.3
84.2
84.7
Macro-averaged
86.3
86.4
86.4
Runs of clips republic on huggingface.co
42
Total runs
4
24-hour runs
12
3-day runs
16
7-day runs
5
30-day runs
More Information About republic huggingface.co Model
republic huggingface.co
republic huggingface.co is an AI model on huggingface.co that provides republic's model effect (), which can be used instantly with this clips republic model. huggingface.co supports a free trial of the republic model, and also provides paid use of the republic. Support call republic model through api, including Node.js, Python, http.
republic huggingface.co is an online trial and call api platform, which integrates republic's modeling effects, including api services, and provides a free online trial of republic, you can try republic online for free by clicking the link below.
republic is an open source model from GitHub that offers a free installation service, and any user can find republic on GitHub to install. At the same time, huggingface.co provides the effect of republic install, users can directly use republic installed effect in huggingface.co for debugging and trial. It also supports api for free installation.