language_parser.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:cvscan 作者: skcript 项目源码 文件源码
def fetch_name(resume_text):
  tokenized_sentences = nltk.sent_tokenize(resume_text)
  for sentence in tokenized_sentences:
    for chunk in nltk.ne_chunk(nltk.pos_tag(nltk.word_tokenize(sentence), tagset='universal')):
      if hasattr(chunk, 'label'):# and chunk.label() == 'PERSON':
        chunk = chunk[0]
      (name, tag) = chunk
      if tag == 'NOUN':
        return name

  return "Applicant name couldn't be processed"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号