【发布时间】:2017-11-05 15:09:59
【问题描述】:
我正在尝试从非结构化字符串中提取名称(印度)。
我的代码来了:
text = "Balaji Chandrasekaran Bangalore | Senior Business Analyst/ Lead Business Analyst An accomplished Senior Business Analyst with a track record of handling complex projects in given period of time, exceeding above the expectation. Successful at developing product road maps and leading cross-functional software teams from prototype to release. Professional Competencies Systems Development Life Cycle (SDLC) Agile methodologies Business process improvement Requirements gathering & Analysis Project Management UML Specification UI & UX (Wireframe Designing) Functional Specification Test Scenario Creation SharePoint Admin Work History Senior Business Analyst (Aug 2012 Current) YouBox Technology pvt ltd, Chennai Translating business goals, feature concepts and customer needs into prioritized product requirements and use cases. Expertized in designing innovative wireframes combining user experience analysis and technology models. Extensive Experience in implementing soft wares for Shipping/Logistics firms to handle CRM, Finance, Logistics, Operations, Intermodal, and documentation. Strong interpersonal skills, highly adept at diplomatically facilitating discussions and negotiations with stakeholders. Education Bachelor of Engineering: Electronics & Communication, 2011 CES Tech Hosur Accomplishment Successful onsite implementation at various locations around the globe for Europe Shipping Company. - (Pre Study, General Design, and Functional Specification) Organized Business Analyst Forum and conducted various activities to develop skill sets of Business Analysts."
if text != "":
grammar = """PERSON: {<NNP>}"""
chunkParser = nltk.RegexpParser(grammar)
tagged = nltk.pos_tag(nltk.word_tokenize(text))
tree = chunkParser.parse(tagged)
for subtree in tree.subtrees():
if subtree.label() == "PERSON":
pronouns.append(' '.join([c[0] for c in subtree]))
print(pronouns)
['Balaji', 'Chandrasekaran', 'Bangalore', '|','Senior', 'Business', 'Analys', '/', 'Lead', 'Business', 'Analyst', 'Senior', 'Business', “分析师”、“成功”、“发展”、“生活”、“周期”、“SDLC”、 “敏捷”、“业务”、“需求”、“分析”、“项目”、 “管理”、“UML”、“规范”、“UI”、“UX”、“线框”、 “设计”、“功能”、“规范”、“测试”、“场景”、 “创作”、“SharePoint”、“管理员”、“工作”、“历史”、“高级”、 “商业”、“分析师”、“8 月”、“当前”、“技术”、“钦奈”、 “翻译”、“CRM”、“财务”、“物流”、“运营”、 “多式联运”、“教育”、“学士”、“工程”、“电子”、 '沟通','成就','成功','地中海', “船舶”、“公司”、“MSC”、“格鲁吉亚”、“MSC”、“柬埔寨”、“MSC”、“MSC”、 'South', 'Successful', 'Stake', 'MSC', 'Geneva', 'Switzerland', 'Pre', '研究','一般','设计','功能','规范','O', “商业”、“分析师”、“论坛”、“商业”]
但实际上我只需要 Balaji Chandrasekaran ,我什至尝试使用 Standford ner lib.Which 未能选择 Balaji Chandrasekaran
任何人都可以帮助从 un 结构字符串中提取名称,或者建议我任何好的教程来做到这一点。
提前谢谢你。
【问题讨论】:
-
您可能需要找到一个将非拉丁名称音译成英文的库。我不确定是否存在类似的东西。
-
@emporerblk 你是说 corpus.names 之类的东西吗?但是对于印度名字
-
没错。 Python 的名字数据库有一段时间没有更新了(proof),斯坦福词典是基于西方名字的。要让 nltk 做你想做的事,你需要提供印度名字的例子。
-
@emporerblk 非常感谢。是否有针对印度人名训练或创建名称库的教程。
标签: python nlp nltk stanford-nlp