Downloads · 30 days
16
0% of all-time downloads
RecordedFuture/Swedish-Sentiment-Fear-Targets
Swedish-Sentiment-Fear-Targets is a token classification model from RecordedFuture. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
Recorded Future together with AI Sweden releases two language models for target/role assignment in Swedish. The two models are based on the KB/bert-base-swedish-cased, the models as has been fine tuned to solve a Name…
Downloads · 30 days
16
0% of all-time downloads
All-time downloads
4.5K
Public
Repo size
2 GB
Likes
0
Public
Click a slice to open those files.
.h5497 MB · 33%
From the Hugging Face model README
Recorded Future together with AI Sweden releases two language models for target/role assignment in Swedish. The two models are based on the KB/bert-base-swedish-cased, the models as has been fine tuned to solve a Named Entety Recognition(NER) token classification task.
This is a downstream model to be used in conjunction with the Swedish violence sentiment classifier or Swedish violence sentiment classifier. The models are trained to tag parts of sentences that has recieved a positive classification from the upstream sentiment classifier. The model will tag parts of sentences that contains the targets that the upstream model has activated on.
The NER sentiment target models do work as standalone models but their recommended application is downstreamfrom a sentence classification model.
The models are only trained on Swedish data and only supports inference of Swedish input texts. The models inference metrics for all non-Swedish inputs are not defined, these inputs are considered as out of domain data.
The current models are supported at Transformers version >= 4.3.3 and Torch version 1.8.0, compatibility with older versions are not verified.
The model can be imported from the transformers library by running
from transformers import BertForSequenceClassification, BertTokenizerFast
tokenizer = BertTokenizerFast.from_pretrained("RecordedFuture/Swedish-Sentiment-Fear-Targets")
classifier_fear_targets= BertForTokenClassification.from_pretrained("RecordedFuture/Swedish-Sentiment-Fear-Targets")
When the model and tokenizer are initialized the model can be used for inference.
During training the Fear target model had the following verification metrics when using "any overlap" as the evaluation metric.
| F-score | Precision | Recall | |:-------------------------:|:-------:|:---------:|:------:| | 0.8361 | 0.7903 | 0.8876 |
The model be can imported from the transformers library by running
from transformers import BertForSequenceClassification, BertTokenizerFast
tokenizer = BertTokenizerFast.from_pretrained("RecordedFuture/Swedish-Sentiment-Violence-Targets")
classifier_violence_targets = BertForTokenClassification.from_pretrained("RecordedFuture/Swedish-Sentiment-Violence-Targets")
When the model and tokenizer are initialized the model can be used for inference.
During training the Violence target model had the following verification metrics when using "any overlap" as the evaluation metric.
| F-score | Precision | Recall | |:-------------------------:|:-------:|:---------:|:------:| | 0.7831| 0.9155| 0.8442 |