ajitrajasekharan commited on
Commit
51326b2
1 Parent(s): 82392e2

Update BatchInference.py

Browse files
Files changed (1) hide show
  1. BatchInference.py +3 -3
BatchInference.py CHANGED
@@ -530,9 +530,9 @@ class BatchInference:
530
  #if (index in string.punctuation or len(index) == 1 or index.startswith('.') or index.startswith('[') or index.startswith("#")):
531
  if (index in string.punctuation or len(index) == 1 or index.startswith('.') or index.startswith('[')):
532
  continue
533
- #if (index.startswith("#")): #subwords suggest model is trying to predict a multi word term that generally tends to be noisy. So penalize. Count and skip
534
- # k += 1
535
- # continue
536
  #print(index,round(float(sorted_d[index]),4))
537
  if (sent_index % 2 != 0):
538
  #CS predictions
 
530
  #if (index in string.punctuation or len(index) == 1 or index.startswith('.') or index.startswith('[') or index.startswith("#")):
531
  if (index in string.punctuation or len(index) == 1 or index.startswith('.') or index.startswith('[')):
532
  continue
533
+ if (index.startswith("#")): #subwords suggest model is trying to predict a multi word term that generally tends to be noisy. So penalize. Count and skip
534
+ k += 1
535
+ continue
536
  #print(index,round(float(sorted_d[index]),4))
537
  if (sent_index % 2 != 0):
538
  #CS predictions