cryptexcode commited on
Commit
fb75482
1 Parent(s): 410012e

Update multiconer_v2.py

Browse files
Files changed (1) hide show
  1. multiconer_v2.py +1 -1
multiconer_v2.py CHANGED
@@ -287,7 +287,7 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
287
  logger.info("⏳ Generating examples from = %s", filepath)
288
 
289
 
290
- content = open(filepath, 'r').read().strip()
291
  lines = content.split('\n')
292
 
293
  items = [(4, {'id': '5fcb44ad-c1ef-4925-be27-008a76667b3b', 'tokens': ['রাস্তায়', 'রঙিন', 'লাইট', 'এবং', 'বাদশাহী', 'মসজিদ', 'এর', 'দৃশ্য', 'রয়েছে', 'এবং', 'এটি', 'রোশনাই', 'গেট', 'এর', 'নিকটে', 'রয়েছে'], 'ner_tags': ['O', 'O', 'O', 'O', 'B-Facility', 'I-Facility', 'O', 'O', 'O', 'O', 'O', 'B-OtherPROD', 'I-OtherPROD', 'O', 'O', 'O']}),
 
287
  logger.info("⏳ Generating examples from = %s", filepath)
288
 
289
 
290
+ content = open(filepath, 'r', encoding="utf-8").read().strip()
291
  lines = content.split('\n')
292
 
293
  items = [(4, {'id': '5fcb44ad-c1ef-4925-be27-008a76667b3b', 'tokens': ['রাস্তায়', 'রঙিন', 'লাইট', 'এবং', 'বাদশাহী', 'মসজিদ', 'এর', 'দৃশ্য', 'রয়েছে', 'এবং', 'এটি', 'রোশনাই', 'গেট', 'এর', 'নিকটে', 'রয়েছে'], 'ner_tags': ['O', 'O', 'O', 'O', 'B-Facility', 'I-Facility', 'O', 'O', 'O', 'O', 'O', 'B-OtherPROD', 'I-OtherPROD', 'O', 'O', 'O']}),