[00:52:32] *** Quits: fotonzade (~photon@78.189.158.97) (Ping timeout: 260 seconds) [01:11:47] *** Quits: sirdancealot (~sirdancea@79.98.72.195) (Ping timeout: 272 seconds) [01:38:13] *** Joins: fotonzade (~photon@78.189.158.97) [02:13:44] *** Quits: fotonzade (~photon@78.189.158.97) (Ping timeout: 260 seconds) [03:04:10] *** Joins: JuanDaugherty (~juan@98.4.124.117) [04:04:20] *** Quits: freeside (~mengwong@2601:184:4700:16b0:5ec:7275:1ce1:cb79) (Ping timeout: 255 seconds) [04:51:38] *** Quits: drbean (~drbean@124.219.82.41) (Quit: ZNC 1.6.5 - http://znc.in) [04:55:13] *** Joins: drbean (~drbean@124.219.82.42) [05:33:54] *** Quits: JuanDaugherty (~juan@98.4.124.117) (Quit: Hibernate, reboot, exeunt, etc.) [08:22:26] *** Joins: sirdancealot (~sirdancea@79.98.72.195) [08:26:59] *** Quits: sirdancealot (~sirdancea@79.98.72.195) (Ping timeout: 258 seconds) [08:58:41] *** Joins: sirdancealot (~sirdancea@37-48-51-1.tmcz.cz) [09:40:59] *** Joins: fotonzade (~photon@78.189.158.97) [09:41:28] *** Quits: sirdancealot (~sirdancea@37-48-51-1.tmcz.cz) (Ping timeout: 255 seconds) [10:47:57] *** Quits: fotonzade (~photon@78.189.158.97) (Ping timeout: 240 seconds) [10:55:07] *** Quits: proteus-guy (~proteus-g@49.228.92.248) (Remote host closed the connection) [11:00:53] *** Joins: sirdancealot (~sirdancea@109.107.211.244) [11:47:28] *** Joins: fotonzade (~photon@161.9.40.220) [12:07:11] *** Quits: fotonzade (~photon@161.9.40.220) (Quit: Leaving) [12:21:46] *** Joins: JuanDaugherty (~juan@98.4.124.117) [13:22:36] *** Joins: fotonzade (~photon@161.9.40.220) [13:55:16] *** Quits: fotonzade (~photon@161.9.40.220) (Ping timeout: 255 seconds) [13:56:07] *** Joins: fotonzade (~photon@161.9.40.220) [14:56:44] *** Joins: Jana (82f1d74f@gateway/web/freenode/ip.130.241.215.79) [15:04:18] hi Jana! [15:06:38] Hello! I have a question about the function "UseCl" in my concrete grammar. When I try to run it, I get the error " Happened in linearization of UseCl: type of cl.s; expected: Prelude.Bool => Str; inferred: Try.MyTense => Prelude.Bool => Str". What I don't understand is why it expects the type "Prelude.Bool" for cl.s, when I declare cl to be of type "MyTense => Bool => Str" in the lincat. I'm very thankful for any tipps. [15:06:52] I uploaded my code under these links: https://pastebin.com/zxg9hHqv (abstract) [15:07:08] https://pastebin.com/ (concrete) [15:07:42] sorry, the concrete can be found here: https://pastebin.com/9MHpjJ65 [15:11:08] yeah the message is confusing with the expected and inferred [15:11:20] in the body of your UseCl function, you write [15:11:20] s = cl.s ! pol.b ++ pol.s [15:11:39] so you're trying to access the s from the cl with a Bool [15:14:26] if you are doing the extmini, then you should use this abstract syntax: https://github.com/GrammaticalFramework/gf-contrib/blob/master/extmini/Grammar.gf#L25 [15:14:38] in which UseCl has a type Tense -> Pol -> Cl -> S [15:14:56] so then your lincat of Cl is more in line with the abstract syntax [15:19:04] Aha! Right now I am close finishing my miniresource grammar. I guess I should stay with the given abstract grammar for this assignment, because I am not allowed to change the abstract syntax for the miniresource, don't I? [15:19:44] But it is very good to see that my current concrete syntax will be more in line with the abstract soon. :) [15:20:03] even in the mini, UseCl is the same: https://github.com/GrammaticalFramework/gf-contrib/blob/master/mini/Grammar.gf#L11 [15:21:08] Ok this abstract looks a bit different from the one Aarne gave us this year: https://github.com/GrammaticalFramework/gf-contrib/blob/master/mini/newmini/MiniGrammar.gf [15:21:47] aha, I see [15:22:01] To be precise, my UseCl function should have been called "UsePresCl". But I thought renaming the functions is not that disturbing. [15:22:24] so if you want to do the UsePresCl, then you just always choose cl.s ! MyTensePres [15:22:32] yeah renaming is totally fine [15:23:38] But don't I also have to access the polarity of cl? [15:24:08] yes you do [15:24:25] I just mean that, to get rid of the problem of Cl having a type {s : MyTense => Str} [15:24:34] and UsePresCl not giving a Tense [15:24:55] for polarity of Cl, it depends on your language whether you want to put it in the type of Cl [15:25:15] ie. {s : MyTense => MyPol => Str} [15:25:27] or just concatenate some strings in UsePresCl [15:25:56] if negation is only expressed with the presence or absence of "nicht", then you don't need a parameter like MyPol [15:27:13] Yes, polarity is only expressed by "nicht". Of course we have negated determiners as well, but I guess I will do this later in the extmini. [15:27:48] oh yes that's trickier [15:28:13] you'll have to keep things open in the Cl all the way up to a NP level [15:30:11] I would like to keep the type of cl and adapt my UseCl function to it. In my PredVP I build a clause where I concatenate a np with a vp specified for tense (and agreement) and the negator "nicht". For UseCl I just want to access Cl with a given polarity." [15:32:01] if you place the "nicht" inside a PredVP already, then you'll need a MyPol parameter in Cl [15:35:44] Ok, but it is still neccessary to access the Bool from the cl.s via "cl.s!pol.b", isn't it? [15:37:07] if you make your Cl into {s : MyTense => Bool => Str}, then yes, you keep the ! pol.b part [15:38:09] if you attach the "nicht" already in PredVP, then you should a) change type of Cl, and b) remove ++ pol.s in UseCl [15:38:55] but if you don't attach a "nicht" earlier, then you can just do like this: [15:39:01] lin Neg = {s = "nicht" ; b = False} ; [15:39:35] lin UsePresCl pol cl = { s = cl.s ! MyPres ++ pol.s } ; [15:40:03] (sorry, for that solution you won't even need the b field in Tense) [15:40:04] [15:40:19] and if you do attach a "nicht" in PredVP, then you need the following: [15:40:34] lincat Cl = {s : MyTense => Bool => Str}; [15:41:08] lin Neg = {s = [] ; b = False} ; [15:41:31] PredVP as it is [15:41:46] lin UsePresCl pol cl = { s = cl.s ! MyPres ! pol.b } ; [15:42:07] [15:42:58] okay, so this is pretty much what you do already! so the only thing to change is that you add a MyTensePres between: s = cl.s ! MyTensePres ! pol.b [15:45:53] Aaah ok, I tried it several times to add a tense variable to usecl so I could re-use the function for other tenses as well. But this hasn't worked so far, I think I need a table or something similar for it. But now with the concrete value of tense it works perfectly. Thank you very much! [15:46:40] *** Quits: sirdancealot (~sirdancea@109.107.211.244) (Ping timeout: 260 seconds) [15:46:48] if the type of the abstract syntax function was this: https://github.com/GrammaticalFramework/gf-contrib/blob/master/mini/Grammar.gf#L11 [15:46:54] then you'd just get it from the tense argument [15:47:18] So the error message was asking for a type like "Bool=>Str" because I have not given the function a tense parameter, right? [15:48:10] it was just noticing that what you had in the function body was not matching the lincat of Cl [15:48:43] you were given a MyTense => Bool => Str, and you only tried to access it with a bool [15:49:04] so yes, there was a missing MyTense parameter [15:50:16] *** Quits: jbalint (~jbalint@unaffiliated/jbalint) (Ping timeout: 240 seconds) [15:50:52] Yes, this was exactly what I meant. Thank you so much for your help! [15:51:21] no worries! [15:56:41] *** Joins: jbalint (~jbalint@24-177-124-81.dhcp.mdsn.wi.charter.com) [15:56:41] *** Quits: jbalint (~jbalint@24-177-124-81.dhcp.mdsn.wi.charter.com) (Changing host) [15:56:41] *** Joins: jbalint (~jbalint@unaffiliated/jbalint) [15:57:43] *** Joins: sirdancealot (~sirdancea@109.107.211.244) [16:07:40] *** Quits: sirdancealot (~sirdancea@109.107.211.244) (Ping timeout: 240 seconds) [16:33:44] *** Quits: stoopkid (uid137696@gateway/web/irccloud.com/x-hpaxmioviifdehhj) () [16:34:48] *** Joins: stoopkid (uid137696@gateway/web/irccloud.com/x-jrsdujisqhqjcocg) [16:46:39] *** Quits: Jana (82f1d74f@gateway/web/freenode/ip.130.241.215.79) (Ping timeout: 260 seconds) [17:45:40] *** Quits: fotonzade (~photon@161.9.40.220) (Ping timeout: 255 seconds) [18:44:08] *** Quits: JuanDaugherty (~juan@98.4.124.117) (Ping timeout: 260 seconds) [19:24:33] *** Joins: proteus-guy (~proteus-g@2405:9800:b408:bc31:baf6:b1ff:fee4:301c) [20:10:40] *** Joins: fotonzade (~photon@78.189.158.97) [21:14:46] *** Joins: sirdancealot (~sirdancea@37-48-46-165.tmcz.cz) [21:33:35] *** Quits: sirdancealot (~sirdancea@37-48-46-165.tmcz.cz) (Ping timeout: 240 seconds) [22:43:37] *** Joins: JuanDaugherty (~juan@98.4.124.117)