RegExp and classfier used in part-of-speech(POS) tagging
来源:互联网 发布:淘宝上的银泰是正品吗 编辑:程序博客网 时间:2024/06/11 20:42
1. regular expression in pos
judge the characteristic of a certain word by suffix pattern matching
2. classfier in pos
judge the characteristic of a certain word by suffix classfier
judge the characteristic of a certain word by suffix pattern matching
点击(此处)折叠或打开
- >>> import nltk
- >>> from nltk.corpus import brown
- >>> brown_tagged_sents= brown.tagged_sents(categories='news')
- >>> brown_sents= brown.sents(categories='news')
- >>> patterns= [
- ...(r'.*ing$','VBG'),
- ...(r'.*ed$','VBD'),
- ...(r'.*es$','VBZ'),
- ...(r'.*ould$','MD'),
- ...(r'.*\'s$', 'NN$'),
- ... (r'.*s$', 'NNS'),
- ... (r'^-?[0-9]+(.[0-9]+)?$', 'CD'),
- ... (r'.*', 'NN')
- ... ]
- >>> regexp_tagger = nltk.RegexpTagger(patterns)
- >>> regexp_tagger.tag(brown_sents[3])[:10]
- [(u'``', 'NN'), (u'Only', 'NN'), (u'a', 'NN'), (u'relative', 'NN'), (u'handful', 'NN'), (u'of', 'NN'), (u'such', 'NN'), (u'reports', 'NNS'), (u'was', 'NNS'), (u'received', 'VBD
2. classfier in pos
judge the characteristic of a certain word by suffix classfier
0 0
- RegExp and classfier used in part-of-speech(POS) tagging
- 转载 POS tagging :part-of-speech tagging
- HMM Part-of-Speech Tagging
- Detecting Part of Speech--POS
- Alphabetical list of part-of-speech tags used in the Penn Treebank Project:
- POS Tagging
- POS Tags used in opennlp pos tagger
- Part-of-Speech 标记 含义
- Week7-2POS tagging
- 词性标注POS tagging
- Understanding of vSwitch and VLAN tagging
- 词性标注(POS tagging)
- Week7-5Statistical POS tagging
- NLP POS Tagging与NER
- Features for OpenNLP POS Tagging
- 笔记-2009-An Error-Driven Word-Character Hybrid Model for Joint CWS and POS Tagging
- 笔记-2004-2007-A Hybrid Approach to Word Segmentation and POS Tagging
- Route Redistribution and TAGGing
- install android studio in ubuntu linux
- note of code in python
- The error in python :ImportError: No module named xxx
- how to use BaiduMap in android studio under ubuntu
- example for document classify use nltk and python
- RegExp and classfier used in part-of-speech(POS) tagging
- 初学者如何查阅自然语言处理(NLP)领域学术资料
- linux command solution for problems
- find the install path of some software in linux (ubuntu)
- manage .deb package in linux (ubuntu) dpkg
- some package command in linux (ubuntu) zip/ tar/ tar.gz/ tar.bz2
- Python 字典(Dictionary) setdefault()方法
- the shutdown command in linux for shutdown in time or reboot
- python 列表/元组/字典