Skip to content

Instantly share code, notes, and snippets.

@alabrashJr
Created June 12, 2020 07:42
Show Gist options
  • Save alabrashJr/b5cb0c078f1523c27fed90f10f5a64b7 to your computer and use it in GitHub Desktop.
Save alabrashJr/b5cb0c078f1523c27fed90f10f5a64b7 to your computer and use it in GitHub Desktop.
def predict(text):
print("text -> ",text)
X=vectorizer.transform([text_s])
X_pred=lp_classifier.predict(X).toarray()
return [data.columns[i] for i,x in enumerate(X_pred[0]) if x==1]
text="كان العمال في الورشة لطفاء وكان عملهن جيد جداً"
predict(test_txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment