model documentation
#2
by
nazneen
- opened
- .gitattributes +0 -1
- README.md +27 -156
- model.safetensors +0 -3
.gitattributes
CHANGED
|
@@ -15,4 +15,3 @@
|
|
| 15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 17 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 17 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
README.md
CHANGED
|
@@ -1,168 +1,39 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- da
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
widget:
|
| 6 |
- text: Det er super godt
|
| 7 |
---
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
# Model Details
|
| 15 |
-
|
| 16 |
-
## Model Description
|
| 17 |
-
|
| 18 |
-
The BERT Tone model detects sentiment polarity (positive, neutral or negative) in Danish texts. It has been finetuned on the pretrained Danish BERT model by BotXO.
|
| 19 |
-
|
| 20 |
-
- **Developed by:** DaNLP
|
| 21 |
-
- **Shared by [Optional]:** Hugging Face
|
| 22 |
-
- **Model type:** Text Classification
|
| 23 |
-
- **Language(s) (NLP):** Danish (da)
|
| 24 |
-
- **License:** cc-by-sa-4.0
|
| 25 |
-
- **Related Models:** More information needed
|
| 26 |
-
- **Parent Model:** BERT
|
| 27 |
-
- **Resources for more information:**
|
| 28 |
-
- [GitHub Repo](https://github.com/certainlyio/nordic_bert)
|
| 29 |
-
- [Associated Documentation](https://danlp-alexandra.readthedocs.io/en/latest/docs/tasks/sentiment_analysis.html#bert-tone)
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
# Uses
|
| 33 |
-
|
| 34 |
-
## Direct Use
|
| 35 |
-
|
| 36 |
-
This model can be used for text classification
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
## Downstream Use [Optional]
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
More information needed.
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
## Out-of-Scope Use
|
| 46 |
-
|
| 47 |
-
The model should not be used to intentionally create hostile or alienating environments for people.
|
| 48 |
-
|
| 49 |
-
# Bias, Risks, and Limitations
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
## Recommendations
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
# Training Details
|
| 62 |
-
|
| 63 |
-
## Training Data
|
| 64 |
-
|
| 65 |
-
The data used for training come from the [Twitter Sentiment](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#twitsent) and [EuroParl sentiment 2](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#europarl-sentiment2) datasets.
|
| 66 |
-
|
| 67 |
-
## Training Procedure
|
| 68 |
-
|
| 69 |
-
### Preprocessing
|
| 70 |
-
|
| 71 |
It has been finetuned on the pretrained [Danish BERT](https://github.com/certainlyio/nordic_bert) model by BotXO.
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
## Testing Data, Factors & Metrics
|
| 80 |
-
|
| 81 |
-
### Testing Data
|
| 82 |
-
|
| 83 |
-
More information needed.
|
| 84 |
-
|
| 85 |
-
### Factors
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
### Metrics
|
| 90 |
-
|
| 91 |
-
F1
|
| 92 |
-
|
| 93 |
-
## Results
|
| 94 |
-
|
| 95 |
-
More information needed.
|
| 96 |
-
|
| 97 |
-
# Model Examination
|
| 98 |
-
|
| 99 |
-
More information needed.
|
| 100 |
-
|
| 101 |
-
# Environmental Impact
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 105 |
-
|
| 106 |
-
- **Hardware Type:** More information needed.
|
| 107 |
-
- **Hours used:** More information needed.
|
| 108 |
-
- **Cloud Provider:** More information needed.
|
| 109 |
-
- **Compute Region:** More information needed.
|
| 110 |
-
- **Carbon Emitted:** More information needed.
|
| 111 |
-
|
| 112 |
-
# Technical Specifications [optional]
|
| 113 |
-
|
| 114 |
-
## Model Architecture and Objective
|
| 115 |
-
|
| 116 |
-
More information needed.
|
| 117 |
-
|
| 118 |
-
## Compute Infrastructure
|
| 119 |
-
|
| 120 |
-
More information needed.
|
| 121 |
-
|
| 122 |
-
### Hardware
|
| 123 |
-
|
| 124 |
-
More information needed.
|
| 125 |
-
|
| 126 |
-
### Software
|
| 127 |
-
|
| 128 |
-
More information needed.
|
| 129 |
-
|
| 130 |
-
# Citation
|
| 131 |
-
|
| 132 |
-
**BibTeX:**
|
| 133 |
-
|
| 134 |
-
More information needed.
|
| 135 |
-
|
| 136 |
-
**APA:**
|
| 137 |
-
|
| 138 |
-
More information needed.
|
| 139 |
-
|
| 140 |
-
# Glossary [optional]
|
| 141 |
-
|
| 142 |
-
More information needed.
|
| 143 |
-
|
| 144 |
-
# More Information [optional]
|
| 145 |
-
|
| 146 |
-
More information needed.
|
| 147 |
-
|
| 148 |
-
# Model Card Authors [optional]
|
| 149 |
-
|
| 150 |
-
DaNLP in collaboration with Ezi Ozoani and the Hugging Face team
|
| 151 |
-
|
| 152 |
-
# Model Card Contact
|
| 153 |
-
|
| 154 |
-
More information needed.
|
| 155 |
-
|
| 156 |
-
# How to Get Started with the Model
|
| 157 |
-
|
| 158 |
-
Use the code below to get started with the model.
|
| 159 |
-
<details>
|
| 160 |
-
<summary> Click to expand </summary>
|
| 161 |
|
| 162 |
```python
|
| 163 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 164 |
-
|
| 165 |
-
model = BertForSequenceClassification.from_pretrained("
|
| 166 |
-
tokenizer = BertTokenizer.from_pretrained("
|
| 167 |
```
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- da
|
| 4 |
+
tags:
|
| 5 |
+
- bert
|
| 6 |
+
- pytorch
|
| 7 |
+
- sentiment
|
| 8 |
+
- polarity
|
| 9 |
+
license: cc-by-sa-4.0
|
| 10 |
+
datasets:
|
| 11 |
+
- Twitter Sentiment
|
| 12 |
+
- Europarl Sentiment
|
| 13 |
+
metrics:
|
| 14 |
+
- f1
|
| 15 |
widget:
|
| 16 |
- text: Det er super godt
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# Danish BERT Tone for sentiment polarity detection
|
| 20 |
+
|
| 21 |
+
The BERT Tone model detects sentiment polarity (positive, neutral or negative) in Danish texts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
It has been finetuned on the pretrained [Danish BERT](https://github.com/certainlyio/nordic_bert) model by BotXO.
|
| 23 |
+
|
| 24 |
+
See the [DaNLP documentation](https://danlp-alexandra.readthedocs.io/en/latest/docs/tasks/sentiment_analysis.html#bert-tone) for more details.
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
Here is how to use the model:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
```python
|
| 30 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 31 |
+
|
| 32 |
+
model = BertForSequenceClassification.from_pretrained("DaNLP/da-bert-tone-sentiment-polarity")
|
| 33 |
+
tokenizer = BertTokenizer.from_pretrained("DaNLP/da-bert-tone-sentiment-polarity")
|
| 34 |
```
|
| 35 |
+
|
| 36 |
+
## Training data
|
| 37 |
+
|
| 38 |
+
The data used for training come from the [Twitter Sentiment](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#twitsent) and [EuroParl sentiment 2](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#europarl-sentiment2) datasets.
|
| 39 |
+
|
model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:53d1d7b83548e0c8b9adbb8be2dea6dcfd39f3ed97cb1e34e1998cdc3e9b396a
|
| 3 |
-
size 442506328
|
|
|
|
|
|
|
|
|
|
|
|