Warning : Ignoring lock fields in resolving an oper function

33 views
Skip to first unread message

David Bamutura

unread,
Oct 19, 2020, 4:24:50 PM10/19/20
to Grammatical Framework
Hello:

I am getting warnings about lock_fields (of course I did not add them explicitly). But the GF book says if you use the notation lin C t, you do not need to add lock fields. The question is, why then the error. An example of such instances are:

Happened in linearization of father_N2

      Warning: ignoring lock fields in resolving mkN2 (mkN "tata" ZERO_BAA) (lin Prep (mkPrep [ ] [ ] True))

               for

                 N Prep

               using

                 N Prep


Regards,

David

Inari Listenmaa

unread,
Oct 20, 2020, 9:58:42 AM10/20/20
to gf-...@googlegroups.com
Hi David,

Can the warning come from the N instead?

Commonly, when you have mk* functions in Paradigms that produce lincats, they wrap their result in lin C. See the example in my blog post: https://inariksit.github.io/gf/2018/05/25/subtyping-gf.html#lock-fields


oper
 mkNoun : Str -> Noun = {- details don't matter -} ;

 mkN  : Str -> N = \s -> lin N (mkNoun s) ;

 mkN2 : Str -> Prep -> N2 =
  \s,prep -> lin N2 (mkNoun s ** { c2 = prep }) ;

 mkN3 : Str -> Prep -> N3 =
  \s,p,r -> lin N3 (mkNoun s ** { c2 = p ; c3 = r }) ;
Cheers,
Inari

DISCLAIMER
This email and its attachments are, unless the context clearly indicates otherwise, the property of Mbarara University of Science and Technology. It is confidential, private and intended for the addressee only. If you are not an intended recipient you must not use, disclose, distribute, copy, print or rely on this email. Mbarara University of Science and Technology accepts no liability to anyone whatsoever for any of the contents of the email or any of its attachments.


--

---
You received this message because you are subscribed to the Google Groups "Grammatical Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gf-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gf-dev/62595db1-26d4-4de4-8893-b99db8367819n%40googlegroups.com.

David Bamutura

unread,
Oct 21, 2020, 5:19:03 PM10/21/20
to Grammatical Framework
Dear Inari,

I have tried to follow your guidelines but the warning persists. The problem ensues from my ParadigmsCgg.gf definition of oper prepN2. In that definition I use lin N2 as advised but the warning persists.
I would like to still thank you for that blog post that makes things a bit more clear. You can check out the code at https://github.com/bamutra/gf-rgl/tree/master/src/rukiga


Regards,
David

Inari Listenmaa

unread,
Oct 22, 2020, 8:09:59 AM10/22/20
to gf-...@googlegroups.com
Hi David,

The issue is in your mkPrep in ParadigmsCgg. This is what it says now:

   mkPrep : Str -> Str -> Bool -> Preposition
   mkPrep first other bool = lin Prep {
     s = first ;
     other = other;
     isGenPrep = bool
   };

When I change the return type to Prep instead of Preposition, everything works fine. You can remove all lin Preps in LexiconCgg as well. Like this:

Paradigms:  mkPrep : Str -> Str -> Bool -> Prep ;
Lexicon:    father_N2 = mkN2 (mkN "tata" ZERO_BAA) (mkPrep [] [] True) ;

Cheers,
Inari

David Bamutura

unread,
Oct 26, 2020, 3:58:29 AM10/26/20
to Grammatical Framework
Oh Thank you!
Reply all
Reply to author
Forward
0 new messages