syntax-prosody-ot / main

A webapp for the syntax-prosody analyst working in Optimality Theory, with automated Gen, Con and Eval. Download build files from syntax-prosody-ot/build
https://spot.sites.ucsc.edu/
GNU General Public License v2.0
12 stars 2 forks source link

Match any both issues #580

Closed sz245 closed 3 years ago

sz245 commented 3 years ago

There are still some minor things to fix for this. But just wanted to put this pull request for an update on the two issues. For matchSP(stree2, ptree3, 'xp', {anyPCat:true}) it equals to 3 instead of 4. I think stree2 is correct. I think it might be my interpretation of ptree3 that might be wrong. I copied and pasted it here. What's your perspective on this? Thanks!

var ptree3 = { "id": 'root', "cat": 'i', "children": [ { "id": 'xp', "cat": 'phi', "children": [ { "id": 'x', "cat": 'w' }, { "id": 'y', "cat": 'w' }, { "id": 'z', "cat": 'w' } ] } ] };

jbellik commented 3 years ago

You would have to create the function matchSPAny(). You should put it in main/constraints/match.js. It'll be very simple: function matchSPAny(stree, ptree, scat, options){ options = options || {}; options.anyPcat = true; return matchSP(stree, ptree, scat, options); }

On Thu, Apr 29, 2021 at 9:59 AM M130 @.***> wrote:

@M130 commented on this pull request.

In interface1.html https://github.com/syntax-prosody-ot/main/pull/580#discussion_r623232403 :

@@ -1057,6 +1058,10 @@

Mapping constraints

CP
XP
X0
  • Ignore Prosodic Categories

I tried the way with the matchSPAny() but I got a globalNameOrDirect due to it. I am not sure if it is due to my naming and changed it to matchSPAny() but that still didn't work. We could discuss this during the meeting if that works.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/syntax-prosody-ot/main/pull/580#discussion_r623232403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7ROKQR4HYR5GIDXAPLAYTTLGF55ANCNFSM43M2WHKQ .

--

-- Jennifer Bellik, PhD Post-doctoral researcher & lecturer UC Santa Cruz https://people.ucsc.edu/~jbellik/

sz245 commented 3 years ago

@jbellik That's exactly what I did. But it's giving me a globalNameOrDirect error. I think it might be my naming in interface1?

jbellik commented 3 years ago

Did you forget to build (jsbuild.sh) and reload the interface? I just pulled from your branch and tried it and it's not giving me any error on the interface.

On Thu, Apr 29, 2021 at 11:45 AM M130 @.***> wrote:

@jbellik https://github.com/jbellik That's exactly what I did. But it's giving me a globalNameOrDirect error.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/syntax-prosody-ot/main/pull/580#issuecomment-829500867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7ROKTNT5MXB6ZIWGLMBNLTLGSNTANCNFSM43M2WHKQ .

--

-- Jennifer Bellik, PhD Post-doctoral researcher & lecturer UC Santa Cruz https://people.ucsc.edu/~jbellik/

sz245 commented 3 years ago

Yes, that was the problem. I tried it and it worked. Thank you!!!