New rule type: MergeCohorts
Documentation:
https://visl.sdu.dk/cg3/chunked/rules.html#mergecohortsThis feature has been asked for since at least Nov 2013 (
https://groups.google.com/d/msg/constraint-grammar/qXStKY2qpEM/DG8tuCsKjoEJ ), and yesterday I finally implemented a first version of it.
E.g., given input
"<March>"
"March" month
"<2nd>"
"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