def SenLen(sen1):
sen1 = 'a b c.'
import re,string
punc = '~`!#$%^&*()_+-=|\';":/.,?><~·!@#¥%……&*()——+-=“:’;、。,?》《{}'
sen2 = (re.sub(r"[%s]+" % punc, "", sen1))
import nltk
Words = nltk.word_tokenize(sen2)
print(len(Words))
text = '''“ The teacher said that that that that that boy used in the composition is the right teachers”'''
SenLen(text)
###### 输出的结果是3,而不是实参里的17