Skip to content

Commit

Permalink
Renamed WANLP22 Propaganda dataset and assets
Browse files Browse the repository at this point in the history
  • Loading branch information
fdalvi committed Sep 10, 2023
1 parent aa0436b commit 1d86af8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import random
import re

from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.models import PetalsModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22T3PropagandaDataset,
"dataset": WANLP22PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import regex as re

from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.models import LegacyOpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


def config():
return {
"dataset": WANLP22T3PropagandaDataset,
"dataset": WANLP22PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import random
import re

from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.models import OpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22T3PropagandaDataset,
"dataset": WANLP22PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import random
import re

from llmebench.datasets import WANLP22T3PropagandaDataset
from llmebench.datasets import WANLP22PropagandaDataset
from llmebench.models import OpenAIModel
from llmebench.tasks import MultilabelPropagandaTask


random.seed(1333)


def config():
return {
"dataset": WANLP22T3PropagandaDataset,
"dataset": WANLP22PropagandaDataset,
"dataset_args": {
"techniques_path": "data/factuality_disinformation_harmful_content/propaganda/classes.txt"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from llmebench.datasets.dataset_base import DatasetBase


class WANLP22T3PropagandaDataset(DatasetBase):
class WANLP22PropagandaDataset(DatasetBase):
def __init__(self, techniques_path=None, **kwargs):
# Get the path to the file listing the target techniques
self.techniques_path = Path(techniques_path) if techniques_path else None
super(WANLP22T3PropagandaDataset, self).__init__(**kwargs)
super(WANLP22PropagandaDataset, self).__init__(**kwargs)

def metadata():
return {
Expand Down
2 changes: 1 addition & 1 deletion llmebench/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from .TyDiQA import TyDiQADataset
from .UnifiedFCFactuality import UnifiedFCFactualityDataset
from .UnifiedFCStance import UnifiedFCStanceDataset
from .WANLP22T3Propaganda import WANLP22T3PropagandaDataset
from .WANLP22Propaganda import WANLP22PropagandaDataset
from .WikiNewsDiacritization import WikiNewsDiacritizationDataset
from .WikiNewsLemmatization import WikiNewsLemmatizationDataset
from .WikiNewsPOS import WikiNewsPOSDataset
Expand Down

0 comments on commit 1d86af8

Please sign in to comment.