import jieba
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from docx import Document
# 分词
def segment_resume(resume_text):
seg_list = jieba.cut(resume_text)
segmented_text = ' '.join(seg_list)
return segmented_text
# 生成词云
def generate_word_cloud(segmented_text):
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(segmented_text)
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.show()
# 绘制图表
def draw_chart(data):
categories = data.keys()
values = data.values()
plt.bar(categories, values)
plt.xlabel('Category')
plt.ylabel('Value')
plt.title('Resume Data')
plt.show()
# 创建Word文档