shivam commited on
Commit
93228b4
1 Parent(s): 4b8415b

Data uploaded

Browse files
Files changed (20) hide show
  1. assamese.json +0 -0
  2. bengali.json +0 -0
  3. bodo.json +0 -0
  4. gujarati.json +0 -0
  5. hindi.json +0 -0
  6. iwn_wordlists.py +126 -0
  7. kannada.json +0 -0
  8. kashmiri.json +0 -0
  9. konkani.json +0 -0
  10. malayalam.json +0 -0
  11. manipuri.json +0 -0
  12. marathi.json +0 -0
  13. meitei.json +0 -0
  14. nepali.json +0 -0
  15. oriya.json +0 -0
  16. punjabi.json +0 -0
  17. sanskrit.json +0 -0
  18. tamil.json +0 -0
  19. telugu.json +0 -0
  20. urdu.json +0 -0
assamese.json ADDED
The diff for this file is too large to render. See raw diff
 
bengali.json ADDED
The diff for this file is too large to render. See raw diff
 
bodo.json ADDED
The diff for this file is too large to render. See raw diff
 
gujarati.json ADDED
The diff for this file is too large to render. See raw diff
 
hindi.json ADDED
The diff for this file is too large to render. See raw diff
 
iwn_wordlists.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """IWN-WordLists"""
2
+
3
+
4
+ import csv
5
+ import json
6
+ import os
7
+
8
+ import datasets
9
+
10
+
11
+ _CITATION = """\
12
+ @inproceedings{bhattacharyya2010indowordnet,
13
+ title={IndoWordNet},
14
+ author={Bhattacharyya, Pushpak},
15
+ booktitle={Proceedings of the Seventh International Conference on Language Resources and Evaluation (LREC'10)},
16
+ year={2010}
17
+ }
18
+ """
19
+
20
+ _DESCRIPTION = """\
21
+ We provide the unique word list form the IndoWordnet (IWN) knowledge base.
22
+ """
23
+
24
+ _HOMEPAGE = "https://www.cfilt.iitb.ac.in/indowordnet/"
25
+
26
+ # TODO: Add the licence for the dataset here if you can find it
27
+ _LICENSE = ""
28
+
29
+ _URLS = {
30
+ "assamese": "./assamese.json",
31
+ "bengali": "./bengali.json",
32
+ "bodo": "./bodo.json",
33
+ "gujarati": "./gujarati.json",
34
+ "hindi": "./hindi.json",
35
+ "kannada": "./kannada.json",
36
+ "kashmiri": "./kashmiri.json",
37
+ "konkani": "./konkani.json",
38
+ "malayalam": "./malayalam.json",
39
+ "manipuri": "./manipuri.json",
40
+ "marathi": "./marathi.json",
41
+ "meitei": "./meitei.json",
42
+ "nepali": "./nepali.json",
43
+ "oriya": "./oriya.json",
44
+ "punjabi": "./punjabi.json",
45
+ "sanskrit": "./sanskrit.json",
46
+ "tamil": "./tamil.json",
47
+ "telugu": "./telugu.json",
48
+ "urdu": "./urdu.json"
49
+ }
50
+
51
+ class IWNWordListsConfig(datasets.BuilderConfig):
52
+ """BuilderConfig for IWNWordLists."""
53
+
54
+ def __init__(self, name, **kwargs):
55
+ """
56
+ Args:
57
+ name: `string`, name of dataset config
58
+ **kwargs: keyword arguments forwarded to super.
59
+ """
60
+ super(IWNWordListsConfig, self).__init__(name=name, **kwargs)
61
+
62
+ class IWNWordLists(datasets.GeneratorBasedBuilder):
63
+ """TODO: Short description of my dataset."""
64
+
65
+ VERSION = datasets.Version("1.1.0")
66
+
67
+ BUILDER_CONFIGS = [
68
+ datasets.BuilderConfig(name="assamese", version=VERSION, description="Assamese Word List"),
69
+ datasets.BuilderConfig(name="bengali", version=VERSION, description="Bengali Word List"),
70
+ datasets.BuilderConfig(name="bodo", version=VERSION, description="Bodo Word List"),
71
+ datasets.BuilderConfig(name="gujarati", version=VERSION, description="Gujarati Word List"),
72
+ datasets.BuilderConfig(name="hindi", version=VERSION, description="Hindi Word List"),
73
+ datasets.BuilderConfig(name="kannada", version=VERSION, description="Kannada Word List"),
74
+ datasets.BuilderConfig(name="kashmiri", version=VERSION, description="Kashmiri Word List"),
75
+ datasets.BuilderConfig(name="konkani", version=VERSION, description="Konkani Word List"),
76
+ datasets.BuilderConfig(name="malayalam", version=VERSION, description="Malyalam Word List"),
77
+ datasets.BuilderConfig(name="manipuri", version=VERSION, description="Manipuri Word List"),
78
+ datasets.BuilderConfig(name="marathi", version=VERSION, description="Marathi Word List"),
79
+ datasets.BuilderConfig(name="meitei", version=VERSION, description="Meitei Word List"),
80
+ datasets.BuilderConfig(name="nepali", version=VERSION, description="Nepali Word List"),
81
+ datasets.BuilderConfig(name="oriya", version=VERSION, description="Oriya Word List"),
82
+ datasets.BuilderConfig(name="punjabi", version=VERSION, description="Punjabi Word List"),
83
+ datasets.BuilderConfig(name="sanskrit", version=VERSION, description="Sanskrit Word List"),
84
+ datasets.BuilderConfig(name="tamil", version=VERSION, description="Tamil Word List"),
85
+ datasets.BuilderConfig(name="telugu", version=VERSION, description="Telugu Word List"),
86
+ datasets.BuilderConfig(name="urdu", version=VERSION, description="Urdu Word List"),
87
+
88
+
89
+ ]
90
+
91
+ # DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
92
+
93
+ def _info(self):
94
+ features = datasets.Features(
95
+ {
96
+ "word": datasets.Value("string")
97
+ }
98
+ )
99
+ return datasets.DatasetInfo(
100
+ description=_DESCRIPTION,
101
+ features=features,
102
+ homepage=_HOMEPAGE,
103
+ license=_LICENSE,
104
+ citation=_CITATION,
105
+ )
106
+
107
+ def _split_generators(self, dl_manager):
108
+ urls = _URLS[self.config.name]
109
+ data_dir = dl_manager.download_and_extract(urls)
110
+ return [
111
+ datasets.SplitGenerator(
112
+ name=datasets.Split.TRAIN,
113
+ gen_kwargs={
114
+ "filepath": data_dir,
115
+ "split": "train",
116
+ },
117
+ )
118
+ ]
119
+
120
+ def _generate_examples(self, filepath, split):
121
+ with open(filepath, encoding="utf-8") as f:
122
+ data = json.loads(f)
123
+ for key, row in enumerate(data["data"]):
124
+ yield key, {
125
+ "word": row["word"]
126
+ }
kannada.json ADDED
The diff for this file is too large to render. See raw diff
 
kashmiri.json ADDED
The diff for this file is too large to render. See raw diff
 
konkani.json ADDED
The diff for this file is too large to render. See raw diff
 
malayalam.json ADDED
The diff for this file is too large to render. See raw diff
 
manipuri.json ADDED
The diff for this file is too large to render. See raw diff
 
marathi.json ADDED
The diff for this file is too large to render. See raw diff
 
meitei.json ADDED
The diff for this file is too large to render. See raw diff
 
nepali.json ADDED
The diff for this file is too large to render. See raw diff
 
oriya.json ADDED
The diff for this file is too large to render. See raw diff
 
punjabi.json ADDED
The diff for this file is too large to render. See raw diff
 
sanskrit.json ADDED
The diff for this file is too large to render. See raw diff
 
tamil.json ADDED
The diff for this file is too large to render. See raw diff
 
telugu.json ADDED
The diff for this file is too large to render. See raw diff
 
urdu.json ADDED
The diff for this file is too large to render. See raw diff