Last active
June 10, 2020 11:22
-
-
Save alabrashJr/a874d6243c8e9f9659cbc8e8d216c7de to your computer and use it in GitHub Desktop.
This file contains 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) | |
text_s=[stemmer.stem(w) for w in text.split()] | |
print("text stemmed-> ",text_s) | |
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="araçım servise son getirmediğimde düzgün tamir edilmedi memnun değil" | |
predict(test_txt) | |
#text -> Araç servis son getirdigimde düzgü tamir edilmedi memnu değilim. | |
#['Kalite'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment