【发布时间】:2022-08-21 13:25:39
【问题描述】:
我已应用此代码使用 python 从 Resume 中提取数据,但我的代码不起作用。我的目标是解析简历或从简历中提取数据,然后应用算法来预测标签。我的目标是在python中“根据技能及其简历内容对候选人简历进行排名”。
有人可以帮我解决这个问题吗?
pip install python-docx
pip install docx
pip install pyresparser
from pyresparser import ResumeParser
import os
from docx import Document
# file format should be in .txt, .pdf, .docx
filed= input()
# below line is used to read the file from this path **D:/CV/Updated_CV.docx**
try:
doc= Document()
with open(filed,\'r\') as file:
doc.add_paragraph(file.read())
doc.save(\"text.docx\")
data= ResumeParser(\'text.docx\').get_extracted_data()
print(data[\'Skills\'])
except:
data= ResumeParser(filed).get_extracted_data()
print(data[\'Skills\'])
我认为我定义路径的方式不正确D:/CV/Updated_CV.docx
-
你的路径看起来不错。你能去掉你的程序,让它只有
with open行而不是任何文档处理吗?只是print(\'Success\')或该块中的其他内容。我怀疑您在阅读期间发生了异常。如果做不到这一点,请仔细检查您是否有权访问 d: 驱动器(即,它没有被拔出或网络共享。 -
你能解决吗?
标签: python-3.x spyder