@php $d = $breakdown['irs_data']; $components = $breakdown['components']; $identitySuggested = $breakdown['identity_suggested']; $suggested = $breakdown['suggested']; $confidence = $breakdown['confidence'] ?? null; $matched = $d['matched_keywords'] ?? []; $categories = (array) ($d['categories'] ?? []); $categoryHits = (array) ($d['category_hits'] ?? []); // Backend returns 5 components: [name, mission/desc, classification, church, integrity]. $identityComps = array_slice($components, 0, 4); $integrityComp = $components[4] ?? null; $sources = array_filter([ 'Name' => $d['name'], 'Mission' => $d['mission'], 'Program 1' => $d['program_desc1'] ?? null, 'Program 2' => $d['program_desc2'] ?? null, 'Program 3' => $d['program_desc3'] ?? null, ]); $matchedKws = array_unique(array_column($matched, 'keyword')); $highlight = function (?string $text) use ($matchedKws) { if (!$text) return '—'; $escaped = e($text); foreach ($matchedKws as $kw) { $escaped = preg_replace( '/\b(' . preg_quote(e($kw), '/') . ')\b/i', '$1', $escaped ); } return $escaped; }; @endphp
Identity (0–50) is auto-detected from religious keywords in the org's name (×8, cap 20), mission and program descriptions (×4, cap 15), a regulator-classification boost (+10 when CRA Sub Category or CCEW classification explicitly names Christianity), and a small bonus for church-like 501(c)(3)s with no Schedule A (+3, or +5 with keyword match). Integrity (0–50) is not auto-scored — it requires manual review (truthfulness of claims, fundraising methods, investment policy). While integrity is unset, R2 is NULL and the composite renormalizes across R1/R3/R4.
No religious keywords detected in the org's name, mission, or program descriptions.
| Component | Max | Earned | Calculation |
|---|---|---|---|
| {{ $c['label'] }} | {{ $c['max'] }} | {{ $c['earned'] === null ? 'N/A' : $c['earned'] }} | {{ $c['explanation'] }} |