parquet-converter commited on
Commit
199bc63
1 Parent(s): 7322776

Update parquet files

Browse files
.gitattributes CHANGED
@@ -14,3 +14,9 @@
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
+ plain_text/ar-train-00000-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
18
+ plain_text/ar-train-00004-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
19
+ plain_text/ar-train-00001-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
20
+ plain_text/ar-train-00005-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
21
+ plain_text/ar-train-00003-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
22
+ plain_text/ar-train-00002-of-00006.parquet filter=lfs diff=lfs merge=lfs -text
ar.py DELETED
@@ -1,102 +0,0 @@
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
- """The Arabic United nation Corpus dataset."""
18
-
19
- from __future__ import absolute_import, division, print_function
20
-
21
- import glob
22
- import os
23
- import re
24
-
25
- import datasets
26
-
27
-
28
- _DESCRIPTION = """\
29
- The corpus is a part of the MultiUN corpus.\
30
- It is a collection of translated documents from the United Nations.\
31
- The corpus is download from the following website : \
32
- [open parallel corpus](http://opus.datasetsl.eu/) \
33
- """
34
-
35
- _CITATION = """\
36
- @inproceedings{eisele2010multiun,
37
- title={MultiUN: A Multilingual Corpus from United Nation Documents.},
38
- author={Eisele, Andreas and Chen, Yu},
39
- booktitle={LREC},
40
- year={2010}
41
- }
42
-
43
- """
44
-
45
- URL = "https://object.pouta.csc.fi/OPUS-MultiUN/v1/mono/ar.txt.gz"
46
-
47
-
48
- class AracorpusConfig(datasets.BuilderConfig):
49
- """BuilderConfig for BookCorpus."""
50
-
51
- def __init__(self, **kwargs):
52
- """BuilderConfig for BookCorpus.
53
- Args:
54
- **kwargs: keyword arguments forwarded to super.
55
- """
56
- super(AracorpusConfig, self).__init__(
57
- version=datasets.Version("1.0.0", "New split API (https://tensorflow.org/datasets/splits)"), **kwargs
58
- )
59
-
60
-
61
- class Aracorpus(datasets.GeneratorBasedBuilder):
62
- """BookCorpus dataset."""
63
-
64
- BUILDER_CONFIGS = [AracorpusConfig(name="plain_text", description="Plain text",)]
65
-
66
- def _info(self):
67
- return datasets.DatasetInfo(
68
- description=_DESCRIPTION,
69
- features=datasets.Features({"text": datasets.Value("string"),}),
70
- supervised_keys=None,
71
- homepage="http://opus.datasetsl.eu/",
72
- citation=_CITATION,
73
- )
74
-
75
- def _vocab_text_gen(self, archive):
76
- for _, ex in self._generate_examples(archive):
77
- yield ex["text"]
78
-
79
- def _split_generators(self, dl_manager):
80
- arch_path = dl_manager.download_and_extract(URL)
81
-
82
- return [
83
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"directory": arch_path}),
84
- ]
85
-
86
- def _generate_examples(self, directory):
87
- index=directory.rfind("datasets")
88
- index=index+8
89
- url=directory[:index]
90
- direct_name=directory[index+1:]
91
- directory=url
92
-
93
- files = [
94
- os.path.join(directory, direct_name),
95
- ]
96
-
97
- _id = 0
98
- for txt_file in files:
99
- with open(txt_file, mode="r") as f:
100
- for line in f:
101
- yield _id, {"text": line.strip()}
102
- _id += 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ar.py.lock DELETED
File without changes
plain_text/ar-train-00000-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f0a3e2ab229d00680f06a48e4f266160bff57758bf1df0785a8a386b5503e31
3
+ size 218973771
plain_text/ar-train-00001-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef5804290a3db87c2226eaa446c5ea0e46f92493e91e2f7ef6e36279619a01e9
3
+ size 219267024
plain_text/ar-train-00002-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c982990b52fb6abeb5adbb6047f9d12d053a914dd43b5363ca449c8069af935
3
+ size 218936322
plain_text/ar-train-00003-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:729aea30c14165b38cf1d939be4fafe738cfb9af4530618d0d33ba2a9be5d708
3
+ size 218751611
plain_text/ar-train-00004-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d4eb15ab5cb450f454b360a0c1c4840888a21405d22c59c12a14bc63474250f
3
+ size 217742527
plain_text/ar-train-00005-of-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1354b867f7891df212189936c0735555ebd1a6a8b41daa9f5ac1d3ad07fb11c9
3
+ size 83951874