xu-song commited on
Commit
970bf82
1 Parent(s): 3404618
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ data/*.txt filter=lfs diff=lfs merge=lfs -text
cc100-samples.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import datasets
3
+
4
+ _DESCRIPTION = """\
5
+ This corpus is subset of cc100, contains the first 10,000 lines of each file.
6
+ """
7
+ _VERSION = "1.0.0"
8
+
9
+ # Please note: due to the size of the data, only few examples are provided.
10
+ # However, you can pass the lang parameter in config to fetch data of any language in the corpus
11
+ _LANGUAGES = [
12
+ "am", "ar", "as", "az", "be", "bg", "bn", "bn_rom", "br", "bs", "ca", "cs", "cy", "da", "de",
13
+ "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fr", "fy", "ga", "gd", "gl", "gn", "gu",
14
+ "ha", "he", "hi", "hi_rom", "hr", "ht", "hu", "hy", "id", "ig", "is", "it", "ja", "jv", "ka",
15
+ "kk", "km", "kn", "ko", "ku", "ky", "la", "lg", "li", "ln", "lo", "lt", "lv", "mg", "mk", "ml",
16
+ "mn", "mr", "ms", "my", "my_zaw", "ne", "nl", "no", "ns", "om", "or", "pa", "pl", "ps", "pt",
17
+ "qu", "rm", "ro", "ru", "sa", "si", "sc", "sd", "sk", "sl", "so", "sq", "sr", "ss", "su", "sv",
18
+ "sw", "ta", "ta_rom", "te", "te_rom", "th", "tl", "tn", "tr", "ug", "uk", "ur", "ur_rom", "uz",
19
+ "vi", "wo", "xh", "yi", "yo", "zh-Hans", "zh-Hant", "zu",
20
+ ]
21
+
22
+
23
+ class Cc100Config(datasets.BuilderConfig):
24
+ def __init__(self, *args, lang=None, **kwargs):
25
+ super().__init__(
26
+ *args,
27
+ name=f"{lang}",
28
+ **kwargs,
29
+ )
30
+ self.lang = lang
31
+
32
+
33
+ class Cc100(datasets.GeneratorBasedBuilder):
34
+ BUILDER_CONFIGS = [
35
+ Cc100Config(
36
+ lang=lang,
37
+ description=f"Language: {lang}",
38
+ version=datasets.Version(_VERSION),
39
+ )
40
+ for lang in _LANGUAGES
41
+ ]
42
+ BUILDER_CONFIG_CLASS = Cc100Config
43
+
44
+ def _info(self):
45
+ return datasets.DatasetInfo(
46
+ description=_DESCRIPTION,
47
+ features=datasets.Features(
48
+ {
49
+ "id": datasets.Value("string"),
50
+ "text": datasets.Value("string"),
51
+ },
52
+ ),
53
+ supervised_keys=None,
54
+ )
55
+
56
+ def _split_generators(self, dl_manager):
57
+ return [
58
+ datasets.SplitGenerator(
59
+ name=datasets.Split.TRAIN,
60
+ gen_kwargs={"datapath": f"data/{self.config.lang}.txt"},
61
+ )
62
+ ]
63
+
64
+ def _generate_examples(self, datapath):
65
+ with open(datapath, encoding="utf-8") as f:
66
+ for sentence_counter, row in enumerate(f):
67
+ result = (
68
+ sentence_counter,
69
+ {
70
+ "id": str(sentence_counter),
71
+ "text": row,
72
+ },
73
+ )
74
+ yield result
data/am.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c93ab0d7aff34636d3fe14e0bbaf78c4156f0f1b74bea27afa628daecfb04870
3
+ size 2831464
data/ar.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73d4b05fec34c2b44d79918d0e8544c8e166739423ec84b1a5df33d9bd926941
3
+ size 2823283
data/as.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a3d9fd4a3b17dcc0ef521d8242fc8ab20c12534fcc76e17232a1695cddcf128
3
+ size 1522795
data/az.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6b0d1d6f1b2a1d2989899690a320155c73e67d8b603293424e1634772b094f4
3
+ size 2053943
data/be.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6458360d52f05ffcef8a9add775d0c0357f83bd7bbc3fbd3e87aa98c4884a6e2
3
+ size 2112371
data/bg.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edeeff4b52be8f49a3c5f334dc8c91bfac9e9977dff3f855002ad38ec9c0825f
3
+ size 2727868
data/bn.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d30c5b8c08462b3d90ff5924936fa74e1a1680487a7556e7f38b27126af5345f
3
+ size 1534612
data/bn_rom.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff1eafb3bfc86a32def9fdfc5e66675189459f69035908b493aa60149a887e85
3
+ size 278586
data/br.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dae45641d2b8accdd62b6ed9cb02b0e032fd0f42f36efd59c6ee5f413ff9e932
3
+ size 799491
data/bs.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f08516e8bed43148d06557c3e5a1ac34246d35b9f77fe472fd90328f9c648faa
3
+ size 916255
data/ca.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e56312af9dad765328f554e26ee1ee4c39431770ac7722c19857c4aa9d13d650
3
+ size 1581229
data/cs.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a020d2b24d6f7087cbb0ba29803f892b285df41a6142c887c283a00b2afcaf6d
3
+ size 1613092
data/cy.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:198fe6688454596038cc9be45960d6465d3d2ecabfd9857a48442674776581ac
3
+ size 1188091
data/da.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:539d9e4be442ad779a864a3e3cb44c824d6a482e4b6bfd843cc5b9a187a0ae38
3
+ size 1289268
data/de.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f38c89740f73a14c8ea28ff7d8bcca78fc8af1c63404e4ee5927154713b0217
3
+ size 1824876
data/el.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd6de7ccc0abfb9f4361cc00f058988b1f1e5567b3238b9abee128ab74577d9e
3
+ size 2809273
data/en.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e8475f6a998db3321a9e67a712dfeeaf94360ebf1df31039da1526fc2a8b21e
3
+ size 1134813
data/eo.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:812c67ab530b296559f023192ba1becbd3d2da4ca0a85a337f2e33afcc0325d7
3
+ size 1212731
data/es.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0462da9675b2a8662ef2acc4008ea82088229b93bc99f97bcde1f81994ce98d
3
+ size 1674455
data/et.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd1fd34906e38078001320cda96ea5c137aaacce436870d0f791c7162cd6b5ad
3
+ size 1774691
data/eu.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e3090c997e27182904195510925c7cbcd8492c26709337bcb953120a04e77c4
3
+ size 994515
data/fa.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:499feaefdb345006ead8e0cecbf1b0d10deb3890fccdb86d0adcb387a80e3c07
3
+ size 2064052
data/ff.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3568b084ae0fbb8c706a61547b09d32c588668b35a2ff4a3d3bac03e19c5df63
3
+ size 1248955
data/fi.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f229e74c117d36657c6f5ff7d357a6625b3619d92f6ec74428f4a1d8d453668
3
+ size 1648309
data/fr.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c01e655d509144d9ab9e5fbe150f135b3ebfe8ea2cd99b57d1c0cefa0eda0d17
3
+ size 1550504
data/fy.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddb2243c5a675e88933c2cf756355b38d2814fbff7f2d087774ded0851e7a127
3
+ size 945532
data/ga.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7103422a19b5b81ca3240ebc6a468a43a0f8d9d34da2edfedd135137d4e7838
3
+ size 1334965
data/gd.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a100615926a581471241e6eeea5acc7311569065a7e294e169f706f43964da1
3
+ size 1272018
data/gl.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c638c0e3db82f864d6d1e2adf0626900ae5b0d42c10db6a2c1fbad44bf14e0f
3
+ size 1839982
data/gn.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31651e89467731931a6af23e49f264e23c5c8a3880ffe743e1d68459ad8409e8
3
+ size 1054390
data/gu.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60da71aa700f9ff8437c047b6aaf0658231ea08c1d454e8e98d65e89450248f3
3
+ size 2209186
data/ha.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d9492a831f457fd52eb130adbe598b1126494a07a195144e1cfba607a2c9403
3
+ size 819267
data/he.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2808482085b59744f3de456e1a6f68aafa948165849ebc45cc5bc9b8829790bc
3
+ size 1647289
data/hi.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:998e654e928a845cfca72730bd36078072aa050bbb63ddfa3e1667dbd20c6402
3
+ size 2102665
data/hi_rom.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a31495e082a9ff238f9b80062c36369ff1b6dfc81f8ddedf8c2173661c25fea7
3
+ size 616250
data/hr.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b794169c97b34dc4027b02f861d16a8f2b7100bd5b1f24a52feea407e119f40
3
+ size 1518678
data/ht.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cfa84be8094f19fca0a02035a81ec0d94cdc7ed9313d4c5b4701b977482f455
3
+ size 1170959
data/hu.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:279926a95d4ff8bc14d6fd0b411e5370a8f037c1ec4bfd1e84c6550794501da0
3
+ size 1684126
data/hy.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8266748291a7e1ff99941a44b47393bb644cb9e092afb3623cf47bc94879f7b
3
+ size 2663020
data/id.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b148307e5f4744ce3ffc9eda93cb1bf285eb0d6761a997767e1c201c837ddb4e
3
+ size 1367917
data/ig.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc876fd05167178af95157dca0646002ee5775622be6c34a0976d36977c18e19
3
+ size 892560
data/is.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:051636cf187e907d488085dab15ce1bc70c8f5b9f5130543f2559092fddaf4b6
3
+ size 1347913
data/it.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:734c3a9c412e8b6702857ffe13bb6bd56be6eaea6252f815bc020637b5f0d4ef
3
+ size 1891346
data/ja.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec724f4a24268e2e8ae3ffa65fb44918ab7916148bcc4462aaa0b910da64ca1f
3
+ size 1784770
data/jv.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2097de9f286f5e2a3effc4405c13d2bd49debec8514a1ce74ac89d50cfe19ee7
3
+ size 894241
data/ka.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:350d3a46491df88888129fc93c75bdcda6b004b47db0ef37846ab85b95b24dc8
3
+ size 3388843
data/kk.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:091922a955690e054d249a23e97965701bfefacdff8715a49201deabea5c8272
3
+ size 2060325
data/km.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dd580b4f109566beaac8973822f2fac4e2254aa31b6bc70458ce29cd7a2509e
3
+ size 2305243