diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dcbd53e17d30b1b9108618c4c1168b77bf69f5d4..0000000000000000000000000000000000000000 --- a/.gitattributes +++ /dev/null @@ -1,30 +0,0 @@ -*.7z filter=lfs diff=lfs merge=lfs -text -*.arrow filter=lfs diff=lfs merge=lfs -text -*.bin 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 -*.model filter=lfs diff=lfs merge=lfs -text -*.msgpack 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 -*.pt filter=lfs diff=lfs merge=lfs -text -*.pth filter=lfs diff=lfs merge=lfs -text -*.rar filter=lfs diff=lfs merge=lfs -text -saved_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 -*.xz filter=lfs diff=lfs merge=lfs -text -*.zip filter=lfs diff=lfs merge=lfs -text -*.zstandard filter=lfs diff=lfs merge=lfs -text -*tfevents* filter=lfs diff=lfs merge=lfs -text -*json* filter=lfs diff=lfs merge=lfs -text -*wav* filter=lfs diff=lfs merge=lfs -text -*mp3* filter=lfs diff=lfs merge=lfs -text diff --git a/NPSC.py b/NPSC.py deleted file mode 100644 index 3d1bc5e27050b5d89ef2973f557b377e69d07664..0000000000000000000000000000000000000000 --- a/NPSC.py +++ /dev/null @@ -1,96 +0,0 @@ -"""NPSC dataset.""" -import gzip -import json -import datasets - -logger = datasets.logging.get_logger(__name__) -_DESCRIPTION = """\\nNorwegian Colossal Corpus v2. Short sequences of maximum 100k characters.""" -_CITATION = """ -TO BE DONE -""" -_URL = "https://www.nb.no/sprakbanken/ressurskatalog/oai-nb-no-sbr-58/" -_DATA_URL = "https://huggingface.co/datasets/NbAiLab/NPSC/resolve/main/data/{split_suffix}-shard-{index:04d}-of-{n_shards:04d}.json.gz" -_N_SHARDS_PER_SPLIT = { - "train": 1, "dev": 1, "test": 1 -} - - -class NPSCConfig(datasets.BuilderConfig): - """BuilderConfig for NbNn.""" - - def __init__(self, *args, **kwargs): - """BuilderConfig for NbNn. - Args: - **kwargs: keyword arguments forwarded to super. - """ - super().__init__( - *args, - name="NPSC", - **kwargs, - ) - - -class NPSC(datasets.GeneratorBasedBuilder): - BUILDER_CONFIGS = [NPSCConfig()] - BUILDER_CONFIG_CLASS = NPSCConfig - - def _info(self): - return datasets.DatasetInfo( - description=_DESCRIPTION, - features=datasets.Features( - { - "sentence_order": datasets.Value("int32"), - "speaker_id" : datasets.Value("int32"), - "speaker_name": datasets.Value("string"), - "sentence_text": datasets.Value("string"), - "sentence_language_code": datasets.Value("string"), - "text": datasets.Value("string"), - "start_time": datasets.Value("int32"), - "end_time": datasets.Value("int32"), - "normsentence_text": datasets.Value("string"), - "transsentence_text": datasets.Value("string"), - "translated": datasets.Value("int32"), - "audio": datasets.features.Audio(sampling_rate=48000), - - } - ), - supervised_keys=None, - homepage=_URL, - citation=_CITATION, - ) - - def _split_generators(self, dl_manager): - data_urls = {} - for split in ["train", "dev", "test"]: - data_urls[split] = [ - _DATA_URL.format( - language=self.config.name, - split_suffix=split, - index=index, - n_shards=_N_SHARDS_PER_SPLIT[split], - ) - for index in range(1, _N_SHARDS_PER_SPLIT[split] + 1) - ] - train_downloaded_files = dl_manager.download(data_urls["train"]) - dev_downloaded_files = dl_manager.download(data_urls["dev"]) - test_downloaded_files = dl_manager.download(data_urls["test"]) - - return [ - datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": train_downloaded_files}), - datasets.SplitGenerator( - name=datasets.Split.VALIDATION, gen_kwargs={"filepaths": validation_downloaded_files} - ), - - ] - - def _generate_examples(self, filepaths): - """This function returns the examples in the raw (text) form by iterating on all the files.""" - id_ = 0 - for filepath in filepaths: - logger.info("generating examples from = %s", filepath) - with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8") as f: - for line in f: - if line: - example = json.loads(line) - yield id_, example - id_ += 1 diff --git a/NbAiLab--NPSC_test/audiofolder-test.parquet b/NbAiLab--NPSC_test/audiofolder-test.parquet new file mode 100644 index 0000000000000000000000000000000000000000..290f672e2fbe6df19061c47b30d3a9621ca22d77 --- /dev/null +++ b/NbAiLab--NPSC_test/audiofolder-test.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d726af78a28b04c82c8f5a83eac6b6f5e4523a0f98b6c703be5119ae4b75b895 +size 20738879 diff --git a/NbAiLab--NPSC_test/audiofolder-train.parquet b/NbAiLab--NPSC_test/audiofolder-train.parquet new file mode 100644 index 0000000000000000000000000000000000000000..81bb4348f5168a18c97d5b21579431a4af1f0514 --- /dev/null +++ b/NbAiLab--NPSC_test/audiofolder-train.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dcff4f53ba780c973f8dc17d06381b512aa22966fae0f7757b969e8adb0e152 +size 19410690 diff --git a/NbAiLab--NPSC_test/audiofolder-validation.parquet b/NbAiLab--NPSC_test/audiofolder-validation.parquet new file mode 100644 index 0000000000000000000000000000000000000000..54c04e8c94e659e64da2a62d40b2c98d9b383c7e --- /dev/null +++ b/NbAiLab--NPSC_test/audiofolder-validation.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09e7394ffb2285842bd74cd8274f8469e412847a71b3bd4194f572c5603694da +size 18781805 diff --git a/README.md b/README.md deleted file mode 100644 index 00e1fdcc8f4ff20ca929728c578918a54b7f6caf..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -annotations_creators: -- no-annotation -language_creators: -- found -language: -- nb -- 'no' -- nn -license: -- cc0-1.0 -multilinguality: -- monolingual -size_categories: -- 2G