New Feature: MergeCohorts

Skip to first unread message

Tino Didriksen

Sep 7, 2018, 3:09:01 AM9/7/18
to Constraint Grammar
New rule type: MergeCohorts

This feature has been asked for since at least Nov 2013 ( ), and yesterday I finally implemented a first version of it.

E.g., given input
    "March" month
    "2nd" ordinal

The rule
    MergeCohorts ("<$1 $2>"v "$1 $2"v date) ("<(.+)>"r month) WITH (1 ("<(.+)>"r ordinal)) ;

would yield
"<March 2nd>"
    "March 2nd" date

It does not yet handle dependencies or named relations. One would assume you'd only ever merge inter-dependent cohorts, in which case the dependencies are trivial to solve - just have the new cohort take the place of the removed cohorts. But when that's not true, it gets complicated.

-- Tino Didriksen

Tino Didriksen

Sep 7, 2018, 7:30:12 AM9/7/18
to Constraint Grammar
And first update already: In the cohort recipe, * now means copy all the target cohort's tags to this spot.

-- Tino Didriksen
Reply all
Reply to author
0 new messages