The English language has compound verbs which adding direct (ing) to them is not correct such as adding ing to
"turn on" -> RGL -> ParadigmsEng -> verbalN -> "turn onning"
obviously what has been done above is not correct, so I tried to emerge a new oper into verbalN where if the verb is part of two words then the first one follows verbalN rules where the other one just stays the same. I wrote the following code, but it didn't work.
oper
compVerbalN : Str -> Str -> verbalN
= \x,y -> (verbalN (x.s) ++ y.s));
I know maybe the above oper is no close to correct, but I'm still having some trouble understanding the idea of how GF operations work together.
Fixing your code
Your code doesn't work for a few reasons:
verbalN
is an oper. So it should be likecompVerbalN : Str -> Str -> N
, or rathercompVerbalN : V -> Str -> N
.s
field ofx
andy
, but according to the type signature, they are strings, not records with a named field.verbalN
a string as an argument, but actually it expects aV
.Let's suppose for the sake of practice, that you want to have this type signature,
Str -> Str -> N
. Then you need to do something like this:Testing in the GF shell:
This produces the right result, but poking at GF categories' internals like this is risky. The RGL API is fixed, but implementation details of the RGL can always change, like what parameters some table has and what the field names are called. So if it's possible to construct something with only the RGL API, you should do it.
How to do it using the RGL
To construct a particle verb, you need to use the ParadigmsEng constructor
partV
, which has the following type signature:If your verb is constructed properly, then
verbalN
should produce the correct noun. Here's an example:Testing in GF shell (after
i -retain Test.gf
):Update your RGL
While answering this question, I noticed that
verbalN
didn't originally include the particle, so I added it in a commit just some minutes ago. So in order to see that output, you need to update your RGL.If it's not possible to update your RGL (e.g. you work on a school computer that you can't install stuff on), then you will need to use a construction like
compVerbalN
from the beginning of this answer.