Commit ·
5e289ea
1
Parent(s): 08bc110
Update MultiLegalNeg.py
Browse files2 unmodified lines345678923 unmodified lines3334353637383940411 unmodified line4344454246474849505152495051535455562 unmodified linesimport datasetsimport pandas as pdfrom huggingface_hub.file_download import hf_hub_urlfrom collections import OrderedDict
try: import lzma as xz23 unmodified lines "_sherlock", "_sfu", "_bioscope"]
_BUILDS = ['de', 'fr', 'it', 'swiss', 'en_bioscope', 'en_sherlock', 'en_sfu', 'en_all', 'all']
class MultiLegalNegConfig(datasets.BuilderConfig): 1 unmodified line super( MultiLegalNegConfig, self).__init__(**kwargs) self.name = name self.language = name.split("_")[0] self.subset = name.split("_")[1] if len(name.split("_"))==3 else "" self.subset = name.split("_")[1] if len(name.split("_"))==2 else ""
class MultiLegalNeg(datasets.GeneratorBasedBuilder):
BUILDER_CONFIG_CLASS = MultiLegalNegConfig BUILDER_CONFIGS = [ MultiLegalNegConfig(f"{language}{subset}") if language == 'en' else MultiLegalNegConfig(f"{language}") for language in _LANGUAGES + ['all'] for subset in _SUBSETS + ['_all'] MultiLegalNegConfig(f"{build}") for build in _BUILDS ]
def _info(self):MultiLegalNeg.py+6-4