0

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?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
yair
  • 29
  • 1
  • 6
  • no, it's both. "he pumped some iron at the gym". "the oil pump needs maintenance". you can check against any list you want, but without appropriate context, you'll never be sure if the comparison is accurate, or useful. – Marc B Feb 03 '16 at 20:20
  • There are a lot of words that are both nouns *and* verbs. Even pump is more than just those two. "He is super pumped for the concert next week." (adjective). – Draco18s no longer trusts SE Feb 03 '16 at 20:22
  • Very true, so the accuracy would be lacking in some cases. However, you can go into File > Options > Proofing > Custom Dictionaries to add something else if you don't like the default. – justkrys Feb 03 '16 at 20:32
  • Thank you do you know how to Look for word (with code) together with the context (look for oil pump) and to identify if pump is a noun? – yair Feb 03 '16 at 20:35

2 Answers2

2

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.

teylyn
  • 34,374
  • 4
  • 53
  • 73
  • I thought of an idea to find with Microsoft Word for each word the synonyms Then a statistical test How much of this are nouns make sense? – yair Feb 03 '16 at 21:58
  • No, does not make sense. Language is not statistics. Statistically, "like" is most often used as a preposition. But it can be a noun. Or a verb. Statistics does not help. – teylyn Feb 03 '16 at 22:02
  • 2
    I realize that English is not your first language, but can you please try to use some punctuation? You are trying to determine a word type with programming. But your readers are struggling to even determine where your sentences start and end. – teylyn Feb 03 '16 at 22:05
  • Thank you for your comments. I am trying to perform automatic classification from text to taxonomy, So I am looking for approach to identify noun / modifier – yair Feb 03 '16 at 22:20
0

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.

trevor
  • 257
  • 3
  • 9