我想刪除停用詞。這裏是我的代碼以下python代碼中的錯誤
import nltk
from nltk.corpus import stopwords
import string
u="The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family (Rosaceae). It is one of the most widely cultivated tree fruits, and the most widely known of the many members of genus Malus that are used by humans."
v="An orange is a fruit of the orangle tree. it is the most cultivated tree fruits"
u=u.lower()
v=v.lower()
u_list=nltk.word_tokenize(u)
v_list=nltk.word_tokenize(v)
for word in u_list:
if word in stopwords.words('english'):
u_list.remove(word)
for word in v_list:
if word in stopwords.words('english'):
v_list.remove(word)
print u_list
print "\n\n\n\n"
print v_list
但只有一些停止詞被刪除。請幫我這個
當您定義'u' – avasal
仍然無法使用時,會出現一個引號'''''''''''''沒有被移除 –