Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gujarati news classification #493

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mteb/tasks/Classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .fas.PersianFoodSentimentClassification import *
from .fil.FilipinoHateSpeechClassification import *
from .fra.MovieReviewSentimentClassification import *
from .guj.GujaratiNewsClassification import *
from .hin.HindiDiscourseClassification import *
from .hrv.CroatianSentimentClassification import *
from .ind.IndonesianIdClickbaitClassification import *
Expand Down
36 changes: 36 additions & 0 deletions mteb/tasks/Classification/guj/GujaratiNewsClassification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from __future__ import annotations

from mteb.abstasks import AbsTaskClassification
from mteb.abstasks.TaskMetadata import TaskMetadata


class GujaratiNewsClassification(AbsTaskClassification):
metadata = TaskMetadata(
name="GujaratiNewsClassification",
description="A Gujarati dataset for 3-class classification of Gujarati news articles",
reference="https://github.com/goru001/nlp-for-gujarati",
dataset={
"path": "mlexplorer008/gujarati_news_classification",
"revision": "1a5f2fa2914bfeff4fcdc6fff4194fa8ec8fa19e",
},
type="Classification",
category="s2s",
date=("2014-01-01", "2018-01-01"),
eval_splits=["test"],
eval_langs=["guj-Gujr"],
main_score="accuracy",
form=["written"],
domains=["News"],
task_subtypes=["Topic classification"],
license="MIT",
socioeconomic_status="mixed",
annotations_creators="derived",
dialect=[],
text_creation="found",
bibtex_citation=None,
n_samples={"train": 5269, "test": 1318},
avg_character_length={"train": 61.95, "test": 61.91},
)

def dataset_transform(self):
self.dataset = self.dataset.rename_column("headline", "text")
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dataset_revision": "1a5f2fa2914bfeff4fcdc6fff4194fa8ec8fa19e",
"mteb_dataset_name": "GujaratiNewsClassification",
"mteb_version": "1.7.5",
"test": {
"accuracy": 0.746661608497724,
"accuracy_stderr": 0.02690309965897991,
"evaluation_time": 51.96,
"f1": 0.7159097333700342,
"f1_stderr": 0.03088120006373275,
"main_score": 0.746661608497724
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dataset_revision": "1a5f2fa2914bfeff4fcdc6fff4194fa8ec8fa19e",
"mteb_dataset_name": "GujaratiNewsClassification",
"mteb_version": "1.7.5",
"test": {
"accuracy": 0.7687405159332322,
"accuracy_stderr": 0.023005273029738673,
"evaluation_time": 34.18,
"f1": 0.7421112851603834,
"f1_stderr": 0.02646365364154126,
"main_score": 0.7687405159332322
}
}