【问题标题】:How to parse the resume data?如何解析简历数据?
【发布时间】: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


【解决方案1】:

只需将所有 CV 放在包含 .ipynb 文件的同一文件夹中即可。然后只需输入带有 .pdf 扩展名的 pdf 名称。 (例如:“Updated_CV.docx”)然后按 Enter。希望这会奏效。

【讨论】:

    猜你喜欢
    • 2011-10-18
    • 2020-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-15
    • 2021-03-30
    相关资源
    最近更新 更多