# -*- coding=utf-8 -*- ''' from file_read import result from file_read import chuli from fruit import word_cloud_English from fruit import word_cloud_Chinese from fruit import word_cloud_English_and_Chinese from fruit import Chineseword from fruit import Englishword from fruit import English_and_Chinese ''' if __name__=='__main__': print("是否已将文本导入指定文件夹") a=input() while True: if a == '是': from file_read import result result()#如果确认已将文件移入指定文件夹,调用file_read中的result()函数,输出文件夹中的文件名称 print('你想选择哪一个文件进行分词:') b=int(input()) #对选择的文件进行判断,是纯中文还是纯英文 from file_read import getf name=getf(b-1) print(name) from file_read import chuli dd=chuli(b-1) print(dd) if dd=='y': from fruit import word_cloud_English from fruit import Englishword word_cloud_English(name) Englishword(name) elif dd=='z': from fruit import word_cloud_Chinese from fruit import Chineseword word_cloud_Chinese(name) Chineseword(name) else: from fruit import word_cloud_English_and_Chinese from fruit import English_and_Chinese word_cloud_English_and_Chinese(name) English_and_Chinese(name) else: print("请将文本导入指定文件夹") print('是否退出:') answer=input() if answer=='是': break