Kriyans commited on
Commit
d474363
1 Parent(s): 5280ff2

Update indian_names.py

Browse files
Files changed (1) hide show
  1. indian_names.py +8 -9
indian_names.py CHANGED
@@ -108,15 +108,14 @@ class indian_names(datasets.GeneratorBasedBuilder):
108
  for row in f:
109
  row = row.rstrip()
110
  if row:
111
- # Check if the delimiter ("\t") is present in the row
112
- if "\t" in row:
113
- token, label = row.split("\t")
114
- current_tokens.append(token)
115
- current_labels.append(label)
116
- else:
117
- # Handle cases where the delimiter is missing
118
- # You can choose to skip these rows or handle them differently
119
- logger.warning(f"Delimiter missing in row: {row}")
120
  else:
121
  # New sentence
122
  if not current_tokens:
 
108
  for row in f:
109
  row = row.rstrip()
110
  if row:
111
+ if "\t" in row:
112
+ token, label = row.split("\t")
113
+ current_tokens.append(token)
114
+ current_labels.append(label)
115
+ else:
116
+ # Handle cases where the delimiter is missing
117
+ # You can choose to skip these rows or handle them differently
118
+ logger.warning(f"Delimiter missing in row: {row}")
 
119
  else:
120
  # New sentence
121
  if not current_tokens: