S0-R1-C5.5-R6-R12 Derived Statistical Reporting Frame

#100
Files changed (1) hide show
  1. core/quantitative_engine.py +32 -4
core/quantitative_engine.py CHANGED
@@ -1160,6 +1160,31 @@ Keywords: {keywords}"""
1160
  )
1161
  if re.search(strong_actor, actor, flags=re.I):
1162
  return "ANALYTICAL_ACTOR"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1163
  if re.search(r"\b(?:model|procedure|method|computation|calculation)\b", actor, flags=re.I):
1164
  return "WEAK_ANALYTICAL_ACTOR"
1165
  return "OTHER_ACTOR"
@@ -1173,6 +1198,8 @@ Keywords: {keywords}"""
1173
  r"coefficient(?:\s+estimates?)?s?|standard\s+errors?|"
1174
  r"parameter\s+estimates?|point\s+estimates?|indirect\s+estimates?|"
1175
  r"direct\s+estimates?|effect-size\s+estimates?|"
 
 
1176
  r"correlations?|covariances?|variances?|loadings?|"
1177
  r"test\s+statistics?|p[- ]?values?|vif(?:s|\s+values)?|"
1178
  r"cronbach(?:'s)?\s+alpha|composite\s+reliability|"
@@ -1194,14 +1221,15 @@ Keywords: {keywords}"""
1194
  # causal gate must not terminate the manuscript for it.
1195
  if actor == "ANALYTICAL_ACTOR":
1196
  return True
1197
- if actor == "WEAK_ANALYTICAL_ACTOR" and predicate_target_is_reporting_output(match):
1198
  return True
1199
  return False
1200
 
1201
  # Strong causal predicates remain fail-closed. Preserve only the
1202
- # narrow statistical-reporting idiom already accepted by R1, such as
1203
- # ``the analysis led to the following numerical estimate``.
1204
- return actor in {"ANALYTICAL_ACTOR", "WEAK_ANALYTICAL_ACTOR"} and predicate_target_is_reporting_output(match)
 
1205
 
1206
  def direct_match_is_disclaimed(match):
1207
  prefix = value[max(0, match.start() - 220):match.start()]
 
1160
  )
1161
  if re.search(strong_actor, actor, flags=re.I):
1162
  return "ANALYTICAL_ACTOR"
1163
+
1164
+ # R6-R12 derived statistical-expression actor frame. Phrases such
1165
+ # as ``the product of the two constituent associations`` and
1166
+ # ``multiplying the path coefficients`` denote a deterministic
1167
+ # statistical calculation, not a substantive study construct.
1168
+ # They receive a distinct actor type so ambiguous reporting verbs
1169
+ # (yields/produces/generates/results in) are exempt *only* when the
1170
+ # predicate target is also a recognised statistical reporting
1171
+ # object. This keeps construct-level uses such as ``X yields lower
1172
+ # anxiety`` fail-closed.
1173
+ derived_statistical_actor = (
1174
+ r"\b(?:"
1175
+ r"(?:the\s+)?product\s+of\s+(?:the\s+)?"
1176
+ r"(?:(?:two|constituent|standardized|standardised|estimated|path)\s+){0,4}"
1177
+ r"(?:associations?|coefficients?|paths?|estimates?)|"
1178
+ r"(?:coefficient|association|path)[- ]product(?:\s+(?:calculation|computation|estimate))?|"
1179
+ r"path[- ]product(?:\s+(?:calculation|computation|estimate))?|"
1180
+ r"multiplying\s+(?:the\s+)?(?:(?:two|constituent|standardized|standardised|path)\s+){0,4}"
1181
+ r"(?:associations?|coefficients?|paths?)|"
1182
+ r"multiplication\s+of\s+(?:the\s+)?(?:(?:two|constituent|standardized|standardised|path)\s+){0,4}"
1183
+ r"(?:associations?|coefficients?|paths?)"
1184
+ r")\b"
1185
+ )
1186
+ if re.search(derived_statistical_actor, actor, flags=re.I):
1187
+ return "DERIVED_STATISTICAL_ACTOR"
1188
  if re.search(r"\b(?:model|procedure|method|computation|calculation)\b", actor, flags=re.I):
1189
  return "WEAK_ANALYTICAL_ACTOR"
1190
  return "OTHER_ACTOR"
 
1198
  r"coefficient(?:\s+estimates?)?s?|standard\s+errors?|"
1199
  r"parameter\s+estimates?|point\s+estimates?|indirect\s+estimates?|"
1200
  r"direct\s+estimates?|effect-size\s+estimates?|"
1201
+ r"indirect\s+associations?|association\s+estimates?|"
1202
+ r"standardized\s+associations?|standardised\s+associations?|"
1203
  r"correlations?|covariances?|variances?|loadings?|"
1204
  r"test\s+statistics?|p[- ]?values?|vif(?:s|\s+values)?|"
1205
  r"cronbach(?:'s)?\s+alpha|composite\s+reliability|"
 
1221
  # causal gate must not terminate the manuscript for it.
1222
  if actor == "ANALYTICAL_ACTOR":
1223
  return True
1224
+ if actor in {"WEAK_ANALYTICAL_ACTOR", "DERIVED_STATISTICAL_ACTOR"} and predicate_target_is_reporting_output(match):
1225
  return True
1226
  return False
1227
 
1228
  # Strong causal predicates remain fail-closed. Preserve only the
1229
+ # narrow statistical-reporting idiom already accepted by R1/R6-R12,
1230
+ # such as ``the analysis led to the following numerical estimate``
1231
+ # or a derived coefficient product leading to an estimate.
1232
+ return actor in {"ANALYTICAL_ACTOR", "WEAK_ANALYTICAL_ACTOR", "DERIVED_STATISTICAL_ACTOR"} and predicate_target_is_reporting_output(match)
1233
 
1234
  def direct_match_is_disclaimed(match):
1235
  prefix = value[max(0, match.start() - 220):match.start()]