Datasets:

Languages:
Hindi
Multilinguality:
monolingual
Size Categories:
100K<n<1M
Language Creators:
expert-generated
Annotations Creators:
expert-generated
Source Datasets:
original
ArXiv:
Tags:
License:
murthyrudra commited on
Commit
3671c49
1 Parent(s): e9b4d6d

add json files

Browse files
Files changed (1) hide show
  1. HiNER-collapsed.py +7 -46
HiNER-collapsed.py CHANGED
@@ -44,12 +44,12 @@ class HiNERCollapsedConfig(datasets.GeneratorBasedBuilder):
44
  datasets.features.ClassLabel(
45
  names=[
46
  "O",
47
- "B-PERSON",
48
- "I-PERSON",
49
- "B-LOCATION",
50
- "I-LOCATION",
51
- "B-ORGANIZATION",
52
- "I-ORGANIZATION"
53
  ]
54
  )
55
  ),
@@ -87,44 +87,5 @@ class HiNERCollapsedConfig(datasets.GeneratorBasedBuilder):
87
  yield id_, {
88
  "id": str(id_),
89
  "tokens": object['tokens'],
90
- #"pos_tags": object['pos_tags'],
91
  "ner_tags": object['ner_tags'],
92
- }
93
- # def _generate_examples(self, filepath):
94
- # logger.info("⏳ Generating examples from = %s", filepath)
95
- # with open(filepath, encoding="utf-8") as f:
96
- # guid = 0
97
- # tokens = []
98
- # # pos_tags = []
99
- # # chunk_tags = []
100
- # ner_tags = []
101
- # for line in f:
102
- # if line.startswith("-DOCSTART-") or line == "" or line == "\n":
103
- # if tokens:
104
- # yield guid, {
105
- # "id": str(guid),
106
- # "tokens": tokens,
107
- # # "pos_tags": pos_tags,
108
- # # "chunk_tags": chunk_tags,
109
- # "ner_tags": ner_tags,
110
- # }
111
- # guid += 1
112
- # tokens = []
113
- # # pos_tags = []
114
- # # chunk_tags = []
115
- # ner_tags = []
116
- # else:
117
- # # conll2003 tokens are space separated
118
- # splits = line.split("\t")
119
- # tokens.append(splits[0].strip())
120
- # # pos_tags.append(splits[1])
121
- # # chunk_tags.append(splits[2])
122
- # ner_tags.append(splits[1].rstrip())
123
- # # last example
124
- # yield guid, {
125
- # "id": str(guid),
126
- # "tokens": tokens,
127
- # # "pos_tags": pos_tags,
128
- # # "chunk_tags": chunk_tags,
129
- # "ner_tags": ner_tags,
130
- # }
44
  datasets.features.ClassLabel(
45
  names=[
46
  "O",
47
+ "B-PER",
48
+ "I-PER",
49
+ "B-LOC",
50
+ "I-LOC",
51
+ "B-ORG",
52
+ "I-ORG"
53
  ]
54
  )
55
  ),
87
  yield id_, {
88
  "id": str(id_),
89
  "tokens": object['tokens'],
 
90
  "ner_tags": object['ner_tags'],
91
+ }