rain1024 commited on
Commit
d5e9978
1 Parent(s): 36cfb52

fix git lfs

Browse files
Files changed (2) hide show
  1. .gitattributes +1 -2
  2. UTS_Text.py +47 -3
.gitattributes CHANGED
@@ -52,7 +52,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
52
  *.jpg filter=lfs diff=lfs merge=lfs -text
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
55
- data/** filter=lfs diff=lfs merge=lfs -text
56
  *.txt filter=lfs diff=lfs merge=lfs -text
57
- *.py filter=lfs diff=lfs merge=lfs -text
58
  *.gitignore filter=lfs diff=lfs merge=lfs -text
 
 
52
  *.jpg filter=lfs diff=lfs merge=lfs -text
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
 
55
  *.txt filter=lfs diff=lfs merge=lfs -text
 
56
  *.gitignore filter=lfs diff=lfs merge=lfs -text
57
+ data/** filter=lfs diff=lfs merge=lfs -text
UTS_Text.py CHANGED
@@ -1,3 +1,47 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e730206dc2c3e1ca3d485e083a047953a2908a666950ba5ba8d8f1d3ced301b9
3
- size 2375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import re
3
+ from itertools import chain
4
+
5
+ import datasets
6
+
7
+ _DESCRIPTION = """\
8
+ UTSText
9
+ """
10
+
11
+ _CITATION = """\
12
+ """
13
+
14
+ _BASE_URL = "https://huggingface.co/datasets/undertheseanlp/UTS_Text_v1/resolve/main/data/"
15
+ TRAIN_FILE = "UTS_Text_v1.txt"
16
+
17
+ class UTSText(datasets.GeneratorBasedBuilder):
18
+ def _info(self):
19
+ return datasets.DatasetInfo(
20
+ description=_DESCRIPTION,
21
+ features=datasets.Features(
22
+ {
23
+ "text": datasets.Value("string"),
24
+ }
25
+ ),
26
+ supervised_keys=None,
27
+ homepage=None,
28
+ citation=_CITATION
29
+ )
30
+
31
+ def _split_generators(self, dl_manager):
32
+ """Returns SplitGenerators."""
33
+ DATA_PATH = os.path.join(_BASE_URL, self.config.name)
34
+ train_file = dl_manager.download(os.path.join(DATA_PATH, "train.txt"))
35
+ # dev_file = dl_manager.download(os.path.join(DATA_PATH, "dev.txt"))
36
+ # test_file = dl_manager.download(os.path.join(DATA_PATH, "test.txt"))
37
+ data_files = {
38
+ "train": train_file,
39
+ # "dev": dev_file,
40
+ # "test": test_file,
41
+ }
42
+ splits = [
43
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_files["train"]}),
44
+ # datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_files["dev"]}),
45
+ # datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_files["test"]}),
46
+ ]
47
+ return splits