[I6] Verb Extension

Hi all,

I want to use a verb in two different contexts: “screw X into Y” and “screw off Z”. Intuitively I tried -

Verb ‘screw’ * noun ‘into’ noun -> Verb_Anschrauben
* ‘off’ noun -> Verb_Abschrauben;

Result: “Two different verb definitions refer to “screw””. Yeah, because that’s what I intended. What am I doing wrong, and how can I reach my goal?


Sorry to interrupt, but it looks like I might have fixed it -

Extend ‘screw’ first * noun “into” noun -> Verb_Anschrauben;
Extend ‘screw’ first * ‘off’ noun -> Verb_Abschrauben;

Need to do some tests but at least it compiles. Thanks for watching. :wink:

Indeed, if you want to add grammar lines to a verb which has already been defined by the library, you need to use Extend rather than Verb.

In some cases you may want to get rid of the definition which the library has for the verb. You can then use Extend replace.

Good luck with your project!

Are you using the standard library? If so, you need to know the grammar of the existing verbs in the library before you start changing them. In the case of ‘screw’, there are 5 definitions:

Verb 'screw'
  * noun -> Turn
  * noun 'on' -> SwitchOn
  * noun 'off' -> SwitchOff
  * 'on' noun -> SwitchOn
  * 'off' noun -> SwitchOff;

As you can see, the library has some pretty daft definitions and the last of those is the same as one of the definitions that you were trying to add. That’s why you got the original error. As you have already discovered, use Extend to add, modify or replace the existing definitions. In your case:

Extend only 'screw' first
  * noun 'in' / 'into' noun -> Screw
  * 'off' noun -> Unscrew;

will do the trick. However, you will want to replace those other wacky definitions as well, as ‘screw’ and ‘unscrew’ are unlikely to be synonymous with ‘switch on’ and ‘switch off’ in the majority of cases. In this case, use replace, as @fredrik suggested. Also note the use of only if you only want to change the definition of ‘screw’ and not its synonyms ‘rotate’, ‘twist’, ‘turn’ and ‘unscrew’.


Incidentally, you can always use showverb screw when debug is on to check that your definitions are how you intended.