Lihuchen commited on
Commit
abe8eed
1 Parent(s): a407e7f

Update acrobert.py

Browse files
Files changed (1) hide show
  1. acrobert.py +1 -1
acrobert.py CHANGED
@@ -82,7 +82,7 @@ def acrobert(sentence, model, device):
82
  results = dict()
83
  for acronym in rulebased_pairs.keys():
84
  if rulebased_pairs[acronym][0] != '':
85
- results.append((acronym, rulebased_pairs[acronym][0]))
86
  else:
87
  pred, scores = predict(5, model, acronym, sentence, batch_size=10, acronym_kb=kb, device=device)
88
  output = list(zip(pred, scores))
 
82
  results = dict()
83
  for acronym in rulebased_pairs.keys():
84
  if rulebased_pairs[acronym][0] != '':
85
+ results[acronym] = rulebased_pairs[acronym][0]
86
  else:
87
  pred, scores = predict(5, model, acronym, sentence, batch_size=10, acronym_kb=kb, device=device)
88
  output = list(zip(pred, scores))