system HF staff commited on
Commit
0092bce
0 Parent(s):

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.0

Files changed (4) hide show
  1. .gitattributes +27 -0
  2. dataset_infos.json +1 -0
  3. dummy/0.0.0/dummy_data.zip +3 -0
  4. quora.py +65 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "The Quora dataset is composed of question pairs, and the task is to determine if the questions are paraphrases of each other (have the same meaning).", "citation": "", "homepage": "https://www.kaggle.com/c/quora-question-pairs", "license": "", "features": {"questions": {"feature": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "is_duplicate": {"dtype": "bool", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "quora", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "datasets_version_to_prepare": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 58155622, "num_examples": 404290, "dataset_name": "quora"}}, "download_checksums": {"http://qim.fs.quoracdn.net/quora_duplicate_questions.tsv": {"num_bytes": 58176133, "checksum": "b3350dbb1d98db1f5abca85d736ba514bf4da253fae53939303d79fe921ec7c8"}}, "download_size": 58176133, "dataset_size": 58155622, "size_in_bytes": 116331755}}
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d1bb66a5b3f14e31d1c04a3f37cbb0c69aac32aa9b906053d71e55b56aa8779
3
+ size 326
quora.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Lint as: python3
17
+ """Quora question pairs data"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import csv
22
+
23
+ import datasets
24
+
25
+
26
+ _DESCRIPTION = "The Quora dataset is composed of question pairs, and the task is to determine if the questions are paraphrases of each other (have the same meaning)."
27
+
28
+ _URL = "http://qim.fs.quoracdn.net/quora_duplicate_questions.tsv"
29
+
30
+
31
+ class Quora(datasets.GeneratorBasedBuilder):
32
+ """Quora Question Pairs dataset"""
33
+
34
+ def _info(self):
35
+ return datasets.DatasetInfo(
36
+ description=_DESCRIPTION,
37
+ features=datasets.Features(
38
+ {
39
+ "questions": datasets.features.Sequence(
40
+ {
41
+ "id": datasets.Value("int32"),
42
+ "text": datasets.Value("string"),
43
+ }
44
+ ),
45
+ "is_duplicate": datasets.Value("bool"),
46
+ }
47
+ ),
48
+ homepage="https://www.quora.com/q/quoradata/First-Quora-Dataset-Release-Question-Pairs",
49
+ )
50
+
51
+ def _split_generators(self, dl_manager):
52
+ data_file = dl_manager.download_and_extract({"data_file": _URL})
53
+ return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs=data_file)]
54
+
55
+ def _generate_examples(self, data_file):
56
+ with open(data_file, encoding="utf-8") as f:
57
+ data = csv.DictReader(f, delimiter="\t")
58
+ for idx, row in enumerate(data):
59
+ yield idx, {
60
+ "questions": [
61
+ {"id": row["qid1"], "text": row["question1"]},
62
+ {"id": row["qid2"], "text": row["question2"]},
63
+ ],
64
+ "is_duplicate": row["is_duplicate"] == "1",
65
+ }