AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How could I display the definition of a word for a given part of speech?
 
 

Hi,

Say I have something like this:
a: ( _~verb)
      user entered: _0 n
      $user_verb = ^pos( NOUN _0 )
      ^define( $user_verb )

However, the ^define() command gives me all possible definitions of $user_verb. How could I limit it to just the definition of the verb?

I guess one way to do this is to simply parse the output of ^define() and remove all other definitions. But I was hoping that there is a neater way to doing this.

Thanks,
Pavel

 

 
  [ # 1 ]

Why you would catch a verb, label it n, request pos(NOUN _0), i don’t know. I presume you just made a faulty illustration. But you can do ^define($user_verb VERB) to get just the verb and ^define($user_verb NOUN) to get just the noun.
Current code doesn’t work for doing that for adjective and adverb, but I fixed it so next release will.

 

 
  [ # 2 ]

ops, you are right. That second line there was a typo. Thanks again for the help.

 

 
  login or register to react