Checking whether a particular word is a noun or verb

ⅰ亾dé卋堺 提交于 2019-12-12 03:54:41

问题


I tried to cheak with Microsoft Word (using vba code) for pump ((oil pump) whether it is a noun or verb according to Microsoft word it is verb ( actually pump is a noun) I need to check it for a list of words (mostly technical) Is it possible to compare to any database?

Something else?


回答1:


I think the only answer here is "It can't be done".

Even with context, you'd need human interpretation to determine the word type in some cases.

Time flies like an arrow.

It can mean that time passes very quickly. In that case,

Time (noun) flies (verb) like an arrow (prepositional phrase).

Or it can mean that a group of insects have a preference for pointy things

Time flies (compound noun) like (verb) an arrow (noun as an object).

Or it can be a suggestion to measure the speed of insects in the same way an arrow does.

Time (verb) flies (noun) like an arrow (prepositional phrase).

The Merriam Webster Learner's Dictionary has seven possible word types for "like": verb, noun, preposition, adjective, noun (yes, again, but with another meaning), adverb, conjunction. Each of these has several sub-categories for slightly different use cases. And they don't even mention the teenager use ("And I'm like REALLY, and he's like YES...")

The reason that dictionary entries (not the MS Word spelling dictionary, but references that explain the use and meaning) are so complex is that language is complex.

It is impossible to write some VBA, throw in some RegEx and determine the word class without fault.




回答2:


I'd create a context sensitive "local dictionary" for your project. If you make "oil pump" a single entry - and search for that first, you can eliminate false readings.



来源:https://stackoverflow.com/questions/35186880/checking-whether-a-particular-word-is-a-noun-or-verb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!