Datasets:
Tasks:
Text Classification
Sub-tasks:
sentiment-classification
Languages:
Slovenian
Size:
100K - 1M
License:
Commit ·
ea9dc6f
1
Parent(s): a5b444f
Update parquet files
Browse filesFiles changed (7)
- .gitattributesDeleted-51
- README.mdDeleted-100
- dataset_infos.jsonDeleted-1
- document_level/sentinews-train.parquetAdded+3
- paragraph_level/sentinews-train.parquetAdded+3
- sentence_level/sentinews-train.parquetAdded+3
- sentinews.pyDeleted-93
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.lz4 filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text# Audio files - uncompressed*.pcm filter=lfs diff=lfs merge=lfs -text*.sam filter=lfs diff=lfs merge=lfs -text*.raw filter=lfs diff=lfs merge=lfs -text# Audio files - compressed*.aac filter=lfs diff=lfs merge=lfs -text*.flac filter=lfs diff=lfs merge=lfs -text*.mp3 filter=lfs diff=lfs merge=lfs -text*.ogg filter=lfs diff=lfs merge=lfs -text*.wav filter=lfs diff=lfs merge=lfs -text# Image files - uncompressed*.bmp filter=lfs diff=lfs merge=lfs -text*.gif filter=lfs diff=lfs merge=lfs -text*.png filter=lfs diff=lfs merge=lfs -text*.tiff filter=lfs diff=lfs merge=lfs -text# Image files - compressed*.jpg filter=lfs diff=lfs merge=lfs -text*.jpeg filter=lfs diff=lfs merge=lfs -text*.webp filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100---annotations_creators:- crowdsourcedlanguage:- sllanguage_creators:- foundlicense:- cc-by-sa-4.0multilinguality:- monolingualpretty_name: SentiNewssize_categories: []source_datasets:- originaltags:- slovenian sentiment- news articlestask_categories:- text-classificationtask_ids:- sentiment-classification---
# Dataset Card for SentiNews
## Dataset Description
- **Homepage:** https://github.com/19Joey85/Sentiment-annotated-news-corpus-and-sentiment-lexicon-in-Slovene - **Paper:** Bučar, J., Žnidaršič, M. & Povh, J. Annotated news corpora and a lexicon for sentiment analysis in Slovene. Lang Resources & Evaluation 52, 895–919 (2018). https://doi.org/10.1007/s10579-018-9413-3
### Dataset Summary
SentiNews is a Slovenian sentiment classification dataset, consisting of news articles manually annotated with their sentiment by between two and six annotators.It is annotated at three granularities: - document-level (config `document_level`, 10 427 documents), - paragraph-level (config `paragraph_level`, 89 999 paragraphs), and - sentence-level (config `sentence_level`, 168 899 sentences).
### Supported Tasks and Leaderboards
Sentiment classification, three classes (negative, neutral, positive).
### Languages
Slovenian.
## Dataset Structure
### Data Instances
A sample instance from the sentence-level config:```{ 'nid': 2, 'content': 'Vilo Prešeren je na dražbi ministrstva za obrambo kupilo nepremičninsko podjetje Condor Real s sedežem v Lescah.', 'sentiment': 'neutral', 'pid': 1, 'sid': 1}```
### Data Fields
The data fields are similar among all three configs, with the only difference being the IDs.
- `nid`: a uint16 containing a unique ID of the news article (document). - `content`: a string containing the body of the news article - `sentiment`: the sentiment of the instance- `pid`: a uint8 containing the consecutive number of the paragraph inside the current news article, **not unique** (present in the configs `paragraph_level` and `sentence_level`)- `sid`: a uint8 containing the consecutive number of the sentence inside the current paragraph, **not unique** (present in the config `sentence_level`)
## Additional Information
### Dataset Curators
Jože Bučar, Martin Žnidaršič, Janez Povh.
### Licensing Information
CC BY-SA 4.0
### Citation Information
```@article{buvcar2018annotated, title={Annotated news corpora and a lexicon for sentiment analysis in Slovene}, author={Bu{\v{c}}ar, Jo{\v{z}}e and {\v{Z}}nidar{\v{s}}i{\v{c}}, Martin and Povh, Janez}, journal={Language Resources and Evaluation}, volume={52}, number={3}, pages={895--919}, year={2018}, publisher={Springer}}```
### Contributions
Thanks to [@matejklemen](https://github.com/matejklemen) for adding this dataset.1{"document_level": {"description": "SentiNews is a Slovenian sentiment classification dataset, consisting of news articles manually annotated with their \nsentiment by between 2 and 6 annotators. The news articles contain political, business, economic and financial content \nfrom the Slovenian news portals 24ur, Dnevnik, Finance, Rtvslo, and \u017durnal24. The texts were annotated using the \nfive-level Lickert scale (1 \u2013 very negative, 2 \u2013 negative, 3 \u2013 neutral, 4 \u2013 positive, and 5 \u2013 very positive) on three \nlevels of granularity, i.e. on the document, paragraph, and sentence level. The final sentiment is determined using \nthe following criterion: negative (if average of scores \u2264 2.4); neutral (if average of scores is between 2.4 and 3.6); \npositive (average of annotated scores \u2265 3.6).\n", "citation": "@article{buvcar2018annotated, \n title={Annotated news corpora and a lexicon for sentiment analysis in Slovene}, \n author={Bu{\u000b{c}}ar, Jo{\u000b{z}}e and {\u000b{Z}}nidar{\u000b{s}}i{\u000b{c}}, Martin and Povh, Janez}, \n journal={Language Resources and Evaluation}, \n volume={52}, \n number={3}, \n pages={895--919}, \n year={2018}, \n publisher={Springer}\n}\n", "homepage": "https://github.com/19Joey85/Sentiment-annotated-news-corpus-and-sentiment-lexicon-in-Slovene/", "license": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", "features": {"nid": {"dtype": "uint16", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "content", "output": "sentiment"}, "task_templates": null, "builder_name": "sentinews", "config_name": "document_level", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 21726849, "num_examples": 10427, "dataset_name": "sentinews"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_document-level.txt": {"num_bytes": 23755522, "checksum": "060fe71d719d79e3bcba335abfc146485fa2f3568b5cc1245bd694834d77190c"}}, "download_size": 23755522, "post_processing_size": null, "dataset_size": 21726849, "size_in_bytes": 45482371}, "paragraph_level": {"description": "SentiNews is a Slovenian sentiment classification dataset, consisting of news articles manually annotated with their \nsentiment by between 2 and 6 annotators. The news articles contain political, business, economic and financial content \nfrom the Slovenian news portals 24ur, Dnevnik, Finance, Rtvslo, and \u017durnal24. The texts were annotated using the \nfive-level Lickert scale (1 \u2013 very negative, 2 \u2013 negative, 3 \u2013 neutral, 4 \u2013 positive, and 5 \u2013 very positive) on three \nlevels of granularity, i.e. on the document, paragraph, and sentence level. The final sentiment is determined using \nthe following criterion: negative (if average of scores \u2264 2.4); neutral (if average of scores is between 2.4 and 3.6); \npositive (average of annotated scores \u2265 3.6).\n", "citation": "@article{buvcar2018annotated, \n title={Annotated news corpora and a lexicon for sentiment analysis in Slovene}, \n author={Bu{\u000b{c}}ar, Jo{\u000b{z}}e and {\u000b{Z}}nidar{\u000b{s}}i{\u000b{c}}, Martin and Povh, Janez}, \n journal={Language Resources and Evaluation}, \n volume={52}, \n number={3}, \n pages={895--919}, \n year={2018}, \n publisher={Springer}\n}\n", "homepage": "https://github.com/19Joey85/Sentiment-annotated-news-corpus-and-sentiment-lexicon-in-Slovene/", "license": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", "features": {"nid": {"dtype": "uint16", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"dtype": "string", "id": null, "_type": "Value"}, "pid": {"dtype": "uint8", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "content", "output": "sentiment"}, "task_templates": null, "builder_name": "sentinews", "config_name": "paragraph_level", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 23107429, "num_examples": 89999, "dataset_name": "sentinews"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_paragraph-level.txt": {"num_bytes": 24342387, "checksum": "c45535325db5a6ef5073d7a594c68e5a5c60983d2e1b277f0dbf76f9975a9f18"}}, "download_size": 24342387, "post_processing_size": null, "dataset_size": 23107429, "size_in_bytes": 47449816}, "sentence_level": {"description": "SentiNews is a Slovenian sentiment classification dataset, consisting of news articles manually annotated with their \nsentiment by between 2 and 6 annotators. The news articles contain political, business, economic and financial content \nfrom the Slovenian news portals 24ur, Dnevnik, Finance, Rtvslo, and \u017durnal24. The texts were annotated using the \nfive-level Lickert scale (1 \u2013 very negative, 2 \u2013 negative, 3 \u2013 neutral, 4 \u2013 positive, and 5 \u2013 very positive) on three \nlevels of granularity, i.e. on the document, paragraph, and sentence level. The final sentiment is determined using \nthe following criterion: negative (if average of scores \u2264 2.4); neutral (if average of scores is between 2.4 and 3.6); \npositive (average of annotated scores \u2265 3.6).\n", "citation": "@article{buvcar2018annotated, \n title={Annotated news corpora and a lexicon for sentiment analysis in Slovene}, \n author={Bu{\u000b{c}}ar, Jo{\u000b{z}}e and {\u000b{Z}}nidar{\u000b{s}}i{\u000b{c}}, Martin and Povh, Janez}, \n journal={Language Resources and Evaluation}, \n volume={52}, \n number={3}, \n pages={895--919}, \n year={2018}, \n publisher={Springer}\n}\n", "homepage": "https://github.com/19Joey85/Sentiment-annotated-news-corpus-and-sentiment-lexicon-in-Slovene/", "license": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", "features": {"nid": {"dtype": "uint16", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"dtype": "string", "id": null, "_type": "Value"}, "pid": {"dtype": "uint8", "id": null, "_type": "Value"}, "sid": {"dtype": "uint8", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "content", "output": "sentiment"}, "task_templates": null, "builder_name": "sentinews", "config_name": "sentence_level", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 24641935, "num_examples": 168899, "dataset_name": "sentinews"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_sentence-level.txt": {"num_bytes": 27220223, "checksum": "4382e064543b7fc6d61cc76bc2f16f8f37c80065dbc4f87b888919d1f45bb9c1"}}, "download_size": 27220223, "post_processing_size": null, "dataset_size": 24641935, "size_in_bytes": 51862158}}123version https://git-lfs.github.com/spec/v1oid sha256:79dedea50d8615e809e54e48acbe75077bf2a4435f1fdb97212fe6dbbcd29133size 13384656123version https://git-lfs.github.com/spec/v1oid sha256:db5c7e104f9446a4d93b0ac00b3d039ea49c634738ce2afa3835cddb580e1d7fsize 13921028123version https://git-lfs.github.com/spec/v1oid sha256:0a300d363cdc2482acbcdc63784cbec6658c0e1d9c91e25452a1ff935f36c173size 14487061123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293"""SentiNews: Manually sentiment annotated Slovenian news corpus."""
import csv
import datasets
_CITATION = """\@article{buvcar2018annotated, title={Annotated news corpora and a lexicon for sentiment analysis in Slovene}, author={Bu{\v{c}}ar, Jo{\v{z}}e and {\v{Z}}nidar{\v{s}}i{\v{c}}, Martin and Povh, Janez}, journal={Language Resources and Evaluation}, volume={52}, number={3}, pages={895--919}, year={2018}, publisher={Springer}}"""
_DESCRIPTION = """\SentiNews is a Slovenian sentiment classification dataset, consisting of news articles manually annotated with their sentiment by between 2 and 6 annotators. The news articles contain political, business, economic and financial content from the Slovenian news portals 24ur, Dnevnik, Finance, Rtvslo, and Žurnal24. The texts were annotated using the five-level Lickert scale (1 – very negative, 2 – negative, 3 – neutral, 4 – positive, and 5 – very positive) on three levels of granularity, i.e. on the document, paragraph, and sentence level. The final sentiment is determined using the following criterion: negative (if average of scores ≤ 2.4); neutral (if average of scores is between 2.4 and 3.6); positive (average of annotated scores ≥ 3.6)."""
_HOMEPAGE = "https://github.com/19Joey85/Sentiment-annotated-news-corpus-and-sentiment-lexicon-in-Slovene/"
_LICENSE = "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
_URLS = { "document_level": "https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_document-level.txt", "paragraph_level": "https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_paragraph-level.txt", "sentence_level": "https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1110/SentiNews_sentence-level.txt"}
class Sentinews(datasets.GeneratorBasedBuilder): """SentiNews: Manually sentiment annotated Slovenian news corpus. Version 1.0."""
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [ datasets.BuilderConfig(name="document_level", version=VERSION, description="Dataset annotated at document level."), datasets.BuilderConfig(name="paragraph_level", version=VERSION, description="Dataset annotated at paragraph level."), datasets.BuilderConfig(name="sentence_level", version=VERSION, description="Dataset annotated at sentence level."), ]
def _info(self): _config_features = { "nid": datasets.Value("uint16"), "content": datasets.Value("string"), "sentiment": datasets.Value("string") }
if self.config.name == "paragraph_level": _config_features["pid"] = datasets.Value("uint8") elif self.config.name == "sentence_level": _config_features["pid"] = datasets.Value("uint8") _config_features["sid"] = datasets.Value("uint8")
features = datasets.Features(_config_features) return datasets.DatasetInfo( description=_DESCRIPTION, features=features, supervised_keys=("content", "sentiment"), homepage=_HOMEPAGE, license=_LICENSE, citation=_CITATION, )
def _split_generators(self, dl_manager): urls = _URLS[self.config.name] data_file = dl_manager.download_and_extract(urls) return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"data_file": data_file})]
def _generate_examples(self, data_file): _keys_to_return = ["nid", "content", "sentiment"]
if self.config.name == "paragraph_level": _keys_to_return.append("pid") elif self.config.name == "sentence_level": _keys_to_return.append("pid") _keys_to_return.append("sid")
with open(data_file, encoding="utf-8") as f: data = csv.DictReader(f, delimiter="\t") for idx, row in enumerate(data): yield idx, {_k: row[_k] for _k in _keys_to_return}.gitattributesDeleted-51
README.mdDeleted-100
dataset_infos.jsonDeleted-1
document_level/sentinews-train.parquetAdded+3
paragraph_level/sentinews-train.parquetAdded+3
sentence_level/sentinews-train.parquetAdded+3
sentinews.pyDeleted-93