ophelielacroix commited on
Commit
8c8ad3e
1 Parent(s): 5993b1e

First version of the da-bert-tone-subjective-objective model and tokenizer.

Browse files
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - da
4
+ tags:
5
+ - bert
6
+ - pytorch
7
+ - subjectivity
8
+ - objectivity
9
+ license: CC-BY_4.0
10
+ datasets:
11
+ - Twitter Sentiment
12
+ - Europarl Sentiment
13
+ widget:
14
+ - text: "Jeg tror alligvel, det bliver godt"
15
+ metrics:
16
+ - f1
17
+ ---
18
+
19
+ # Danish BERT Tone for the detection of subjectivity/objectivity
20
+
21
+ The BERT Tone model detects whether a text (in Danish) is subjective or objective.
22
+ The model is based on the finetuning of 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-subjective-objective")
33
+ tokenizer = BertTokenizer.from_pretrained("DaNLP/da-bert-tone-subjective-objective")
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
+
added_tokens.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": ".",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "directionality": "bidi",
8
+ "finetuning_task": "emo",
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "objective",
15
+ "1": "subjective"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "objective": 0,
21
+ "subjective": 1
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "max_position_embeddings": 512,
25
+ "model_type": "bert",
26
+ "num_attention_heads": 12,
27
+ "num_hidden_layers": 12,
28
+ "output_past": true,
29
+ "pad_token_id": 0,
30
+ "pooler_fc_size": 768,
31
+ "pooler_num_attention_heads": 12,
32
+ "pooler_num_fc_layers": 3,
33
+ "pooler_size_per_head": 128,
34
+ "pooler_type": "first_token_transform",
35
+ "position_embedding_type": "absolute",
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.9.2",
38
+ "type_vocab_size": 2,
39
+ "use_cache": true,
40
+ "vocab_size": 32000
41
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d10822267e3de12b0433d316feca47edc195cfcca1421630df0092328c470f7
3
+ size 442556845
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f059fd99e79c23dc313c60a5164379d48ac4fdd908c52a7c9308a20695e13ab4
3
+ size 442746216
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": true, "init_inputs": []}
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a40ac11547ca1fbb9d985ba012e7fa8b1ec8b7e1c05303e289b40ab18b7c6c35
3
+ size 1257
vocab.txt ADDED
The diff for this file is too large to render. See raw diff