Datasets:

Modalities:
Text
Formats:
text
Libraries:
Datasets
dmahata commited on
Commit
c5950cf
·
1 Parent(s): 953b217

Update inspec_ke_tagged.py

Browse files
Files changed (1) hide show
  1. inspec_ke_tagged.py +2 -1
inspec_ke_tagged.py CHANGED
@@ -97,7 +97,7 @@ class InspecKETagged(datasets.GeneratorBasedBuilder):
97
  tokens = []
98
  ke_tags = []
99
  for line in f:
100
- if line.startswith("-DOCSTART-") or line == "" or line == "\n":
101
  if tokens:
102
  yield guid, {
103
  "id": str(guid),
@@ -110,6 +110,7 @@ class InspecKETagged(datasets.GeneratorBasedBuilder):
110
  else:
111
  # the tokens are space separated
112
  splits = line.split()
 
113
  tokens.append(splits[0])
114
  ke_tags.append(splits[1].rstrip())
115
  # last example
 
97
  tokens = []
98
  ke_tags = []
99
  for line in f:
100
+ if line == "" or line == "\n":
101
  if tokens:
102
  yield guid, {
103
  "id": str(guid),
 
110
  else:
111
  # the tokens are space separated
112
  splits = line.split()
113
+ print(splits)
114
  tokens.append(splits[0])
115
  ke_tags.append(splits[1].rstrip())
116
  # last example