Update score_fincat.py
Browse files22 unmodified lines232425262728293031323322 unmodified linescontext_text = extract_context_words(x)features = bert_embedding_extract(context_text, word)if(features[0]=='None'):highlight.append((txt, ' '))return highlightprediction = lr_clf.predict(features.reshape(1, 768))prediction_probability = '{:.4f}'.format(round(lr_clf.predict_proba(features.reshape(1, 768))[:,1][0], 4))highlight.append((word, ' In-claim' if prediction==1 else 'Out-of-Claim'))else:highlight.append((word, ' '))return highlight22 unmodified lines23242526272829303132333422 unmodified linescontext_text = extract_context_words(x)features = bert_embedding_extract(context_text, word)if(features[0]=='None'):continueprediction = lr_clf.predict(features.reshape(1, 768))prediction_probability = '{:.4f}'.format(round(lr_clf.predict_proba(features.reshape(1, 768))[:,1][0], 4))highlight.append((word, ' In-claim' if prediction==1 else 'Out-of-Claim'))else:continueif(len(highlight)<1):highlight.append((txt,'None'))return highlight
score_fincat.py+4-3