elshehawy commited on
Commit
87a2db1
β€’
1 Parent(s): 2644978

update prev_tok_id=-2 in find_orgs_in_data function in evaluate_data.py file

Browse files
Files changed (1) hide show
  1. evaluate_data.py +2 -2
evaluate_data.py CHANGED
@@ -89,7 +89,7 @@ def get_metrics_trf(data):
89
 
90
  def find_orgs_in_data(tokens, labels):
91
  orgs = []
92
- prev_tok_id = 0
93
  for i, (token, label) in enumerate(zip(tokens, labels)):
94
  if label == 'B-ORG':
95
  org = []
@@ -126,4 +126,4 @@ def store_sample_data(data):
126
 
127
  return test_data
128
  # with open('./data/sample_data.json', 'w') as f:
129
- # json.dump(test_data, f)
 
89
 
90
  def find_orgs_in_data(tokens, labels):
91
  orgs = []
92
+ prev_tok_id = -2
93
  for i, (token, label) in enumerate(zip(tokens, labels)):
94
  if label == 'B-ORG':
95
  org = []
 
126
 
127
  return test_data
128
  # with open('./data/sample_data.json', 'w') as f:
129
+ # json.dump(test_data, f)