phrase-extraction.py 文件源码

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

项目:PyRATA 作者: nicolashernandez 项目源码 文件源码
def brown_data():
  """return the text_length first tokens of the brown corpus tagged in pyrata format"""
  tokens = brown.words()
  tokens = tokens[:text_length]

  pos_tags = nltk.pos_tag(tokens)

  return [{'raw':w, 'pos':p} for (w, p) in pos_tags]


# """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# TEST 
# """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


# """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号