一、数据介绍本文统计的对象为1980年以来英语试卷所包含的词汇,并对其进行了分析和总结。二、实现过程1、加载基础词汇bw = open('data/basic_words.txt')basicwords = []for eachLine in bw:basicwords.append(sw.simplify_word(re.split("[^A-Za-z]", eachLine)[0].lower()))#print re.split("[^A-Za-z]", eachLine)[0]print(len(list(set(basicwords))))basicwords = list(set(basicwords))2、加载超纲词汇3、词汇分析def simplify_word(a): #如果已经可以判断是名词,动词,形容词,副词,连词 if enumerate.is_noun(a) or enumerate.is_verb(a) or enumerate.is_adjective(a) or enumerate.is_adverb(a) or enumerate.is_connective(a): return a try:#测试是否为动词,如果是则返回 enumerate.is_verb(enumerate.verb.present(a)) return enumerate.verb.present(a) except:#否则继续检查 pass #测试是否是名词 if enumerate.is_noun(enume
………………………………