我有两个文字示例。我使用textblob来提取名词短语。我想解析一些信息,如职称,公司名称,开始日期和结束日期。
哪个名词短语是职称,哪些是公司名称等?
TXT1 = WORKING EXPERIENCE ABC Company UK ( Jan2014-may2015 ) software analyst at Global Corporates - Working together with other departments to further follow up with clients’ accounts.
TEXT2 WORKING EXPERIENCE software analyst at Global Corporates, from ( Jan2014-may2015 ) in ABC Company UK
def noun():
resumeString=txt1()
blob = TextBlob(resumeString)
print (blob.noun_phrases)
output1=['working experience abc', 'uk', 'jan2014-may2015', 'software analyst', 'global corporates', 'working', 'clients � accounts']
output2= ['working experience', 'software analyst', 'global corporates', 'jan2014-may2015' 'abc', 'uk']
预期产出:
job title: software analyst
company name : ABC Company UK
start date: jan2014
end date: may2015