Possible bug in PARENTHESIS command

15 views
Skip to first unread message

paul....@uib.no

unread,
May 10, 2024, 5:58:27 AM5/10/24
to Constraint Grammar
I suspect there is a bug in the interaction between PARENTHESIS and REMCOHORT.

Here is a minimal example. As you can see in the output, the order of the cohorts is mixed up.

Grammar:

---
# cat test.vrt | vislcg3 --grammar bug-dis.cg3 --trace > test.dis

STRICT-TAGS += Adj Noun V Punct >AMOD ;
PARENTHESES = ("<«>" "<»>") ;

WITH NOPARENT Adj
   IF (-1C Noun) {
   MAP >AMOD (*) ;
   SETPARENT (*) TO (jC1 (*)) ;
   REMCOHORT IGNORED WITHCHILD (*) (*) ;
} ;
---

Input:
---
"<ироман>"
        "а-рома́н" Noun
"<ҿыц>"
        "а-ҿы́ц" Adj
"<«>"
        "«" Punct
"<еизааигәахон>"
        "а́изааигәахара" V
"<»>"
        "»" Punct
"<азкуп>"
        "а-зкзаара́" V
"<.>"
      "." Punct
---

Output:

---
"<ироман>"
        "а-рома́н" Noun #1->1
"<«>"
        "«" Punct #2->2
"<еизааигәахон>"
        "а́изааигәахара" V #3->3
"<»>"
        "»" Punct #4->4
"<ҿыц>"
        "а-ҿы́ц" Adj >AMOD #5->1 WITH:7 MAP:9 SETPARENT:10 REMCOHORT:11
"<азкуп>"
        "а-зкзаара́" V #6->6
"<.>"
        "." Punct #7->7

---

Tino Didriksen

unread,
May 10, 2024, 9:45:06 AM5/10/24
to constrain...@googlegroups.com
Yup, that's a non-trivial bug. Filed as https://github.com/GrammarSoft/cg3/issues/143

-- Tino Didriksen

Tino Didriksen

unread,
May 22, 2024, 12:23:43 PM5/22/24
to constrain...@googlegroups.com
Fixed, and nightly packages rebuilt with the fix.

-- Tino Didriksen

Reply all
Reply to author
Forward
0 new messages