Created
June 12, 2020 07:42
-
-
Save alabrashJr/b5cb0c078f1523c27fed90f10f5a64b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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