Matthew Curland:The basic approach here (objectified unary) is likely also acceptable to the FCO-IM community, but they wouldn't enforce that the objectifying object type be an entity type as ORM currently does.
I was going to object, but it seems that in this situation where a cardinality of one applies, I should be able to use the value which identifies the objectified unary "Average Comment Ratio". In CQL:
Comment Count is written as Integer;
Comment Ratio is written as Real;
// Derive the Comment Count for a Post:
Post has Comment Count where
Comment Count is count of Comment in Post has Comment;
// Derive the overall average Comment Ratio as a unary:
Comment Ratio is average where
Comment Count is count of Comment in Post has Comment,
Post Count is count of Post in Author wrote Post,
Comment Ratio = Comment Count / Post Count;
// Derive the average Comment Ratio for each Author:
Author receives Comment Ratio where
Author wrote Post that has Comment,
Comment Count is count of Comment in Post has Comment,
Post Count is count of Post in Author wrote Post,
Comment Ratio = Comment Count / Post Count;
// Derive the final unary:
Author is controversial where
Author receives Comment Ratio(1) > Comment Ratio(2) that is average;
That all works nicely, and doesn't have issues with the verbalisation regarding the unary (I hadn't found this rather nice way of expressing it before).
CQL could (but doesn't) figure out that the inequality means there are two Comment Ratios at play here, so should allow dropping the subscripts. Anyhow...
However, if I objectify "Comment Ratio that is average", I can use the value of the objectification. Here's an alternate definition of "Author is controversial:
// Objectify "Comment Ratio is average":
Average Comment Ratio is where
Comment Ratio is average;
Author is controversial where
Author receives Comment Ratio > 2*Average Comment Ratio;
In the final comparison, the value of (the value which identifies) Average Comment Ratio is used. Note that multiplying by 2 would have been uglier without the objectification:
Author is controversial where
Author receives Comment Ratio(1) > 2*Comment Ratio(2) and Comment Ratio(2) is average;
I guess that seems to work ok, in any case. The verbalisations aren't that bad.