我针对不同格式的简历的“我将尝试这种方法,但是懒得做得漂亮”.我愿意以不同的简历格式进行测试.
欢迎其他建议/意见!
import string
class Resume():
def __init__(self,filename):
self.filepath = filename
self.load()
self.parse()
def load(self):
with open(self.filepath,'rb') as f:
self.content = f.read().splitlines()
def checkLine(self,word,value, content, line):
if word in content.lower():
value = self.addValue(value,line)
return value
def addValue(self,value,line):
value[line] = value.get(line,0) + 1
return value
def dict_List(self,dict_, content):
new = [(key,value) for key,value in dict_.items() if dict_[key] == max(dict_.values())]
return [(x[0],content[x[0]]) for x in sorted(new)]
def get_name(self):
names = []
for each in self.name:
if each[0]