ajitrajasekharan commited on
Commit
35aea60
·
1 Parent(s): c63015b

Update aggregate_server_json.py

Browse files
Files changed (1) hide show
  1. aggregate_server_json.py +4 -1
aggregate_server_json.py CHANGED
@@ -80,7 +80,10 @@ class AggregateNER:
80
  server_index = 0 if (s1_entity in servers_arr[0]["precedence"]) else 1
81
  if (s1_entity != "O"):
82
  print("Both servers agree on prediction for term:",results[0]["ner"][pos_index]["term"],":",s1_entity)
83
- return server_index,span_count1,-1
 
 
 
84
  else:
85
  print("Servers do not agree on prediction for term:",results[0]["ner"][pos_index]["term"],":",s1_entity,s2_entity)
86
  if (s2_entity == "O"):
 
80
  server_index = 0 if (s1_entity in servers_arr[0]["precedence"]) else 1
81
  if (s1_entity != "O"):
82
  print("Both servers agree on prediction for term:",results[0]["ner"][pos_index]["term"],":",s1_entity)
83
+ #return server_index,span_count1,-1
84
+ #This is an override for single server response being ensembles to pick two predictions.
85
+ picked_server_index,cross_prediction_count = self.pick_single_server_if_possible(results,term_index,servers_arr)
86
+ return picked_server_index,span_count1,cross_prediction_count
87
  else:
88
  print("Servers do not agree on prediction for term:",results[0]["ner"][pos_index]["term"],":",s1_entity,s2_entity)
89
  if (s2_entity == "O"):