本帖最后由 skywind3000 于 2017-6-4 20:51 编辑
光靠正则搞不定,你需要 Lemma List,就是一个每个单词有哪些变形的对应表格,比如:
- be/4109826 -> is,was,are,were,'s,been,being,'re,'m,am,m
- have/1315648 -> had,has,'ve,having,'s,'d,of,d,ve
- it/1213224 -> its,they
- he/1196022 -> his,him,they
- i/1133697 -> my,me,we,is
- they/841960 -> their,them,'em
- you/804279 -> your,ya,ye
- not/767330 -> n't
- she/653505 -> her
- do/535646 -> did,does,done,doing,du,d'
- we/503360 -> our,us
- will/334612 -> 'll,wo,ll
- say/317317 -> said,says,saying
- would/278414 -> 'd
- can/263138 -> ca,cans,can,could
- go/227247 -> going,went,gone,goes,goin'
- get/212569 -> got,getting,gets,gotten
- make/209818 -> made,making,makes
- up/206976 -> ups,upping,upped
- see/184969 -> seen,saw,seeing,sees
- other/181277 -> others
- time/181080 -> times,timed,timing
- know/177717 -> knew,known,knows,knowing
- take/172773 -> took,taken,taking,takes
- year/161649 -> years
复制代码
然后写点小脚本就搞定了,点击下载:
lemma.en.txt
|