Convert dataset to Parquet

#1
by SaylorTwift HF Staff - opened
README.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: tweet
5
+ dtype: string
6
+ splits:
7
+ - name: test
8
+ num_bytes: 5421247
9
+ num_examples: 100000
10
+ download_size: 4146299
11
+ dataset_size: 5421247
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: test
16
+ path: data/test-*
17
+ ---
TwitterAAE.py DELETED
@@ -1,50 +0,0 @@
1
- import datasets
2
- import os
3
- import json
4
-
5
-
6
- _CITATION = """
7
-
8
- """
9
-
10
- _DESCRIPTION = """
11
-
12
- """
13
-
14
- class Builder(datasets.GeneratorBasedBuilder):
15
- VERSION = datasets.Version("1.0.0")
16
-
17
- BUILDER_CONFIGS = [
18
- datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description=_DESCRIPTION)
19
- for name in ["aa", "white"]
20
- ]
21
-
22
- def _info(self):
23
- features = datasets.Features(
24
- {
25
- "tweet": datasets.Value("string"),
26
- }
27
- )
28
- return datasets.DatasetInfo(
29
- description=_DESCRIPTION,
30
- features=features,
31
- homepage="",
32
- license="",
33
- citation=_CITATION,
34
- )
35
-
36
- def _split_generators(self, dl_manager):
37
- test_json = dl_manager.download(os.path.join(self.config.name, "test.jsonl"))
38
-
39
- return [
40
- datasets.SplitGenerator(
41
- name=datasets.Split.TEST,
42
- gen_kwargs={"path": test_json},
43
- ),
44
- ]
45
-
46
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
47
- def _generate_examples(self, path):
48
- with open(path, encoding="utf-8") as f:
49
- for key, row in enumerate(f):
50
- yield key, json.loads(row)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa/test.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7713c3888fde59be11404662bf4af11354011d558c190e08ef16d8df38351540
3
+ size 4146299
white/test.jsonl DELETED
The diff for this file is too large to render. See raw diff