[object Object]

← back to Rentv

fix(deals): demote building-form tower/high-rise below explicit use-types so a firm name ('Granite Towers') stops mislabeling a 229-unit multifamily asset as Office; add unit-count → Multifamily signal

8e36e5454eea3c8b754f2b7faf7d21d6484c2689 · 2026-08-06 06:23:03 -0700 · Steve

Files touched

Diff

commit 8e36e5454eea3c8b754f2b7faf7d21d6484c2689
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Aug 6 06:23:03 2026 -0700

    fix(deals): demote building-form tower/high-rise below explicit use-types so a firm name ('Granite Towers') stops mislabeling a 229-unit multifamily asset as Office; add unit-count → Multifamily signal
---
 scripts/pull-deals.mjs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/scripts/pull-deals.mjs b/scripts/pull-deals.mjs
index 0235f685..bc43c18e 100644
--- a/scripts/pull-deals.mjs
+++ b/scripts/pull-deals.mjs
@@ -51,15 +51,21 @@ function txnOf(t) {
     : null;
 }
 function typeOf(t) {
-  return /office|\bhq\b|high-?rise|tower/.test(t) ? 'Office'
+  // "tower"/"high-rise" are building-FORM words (a tower can be residential OR office), not use-types,
+  // so they must NOT outrank an explicit use signal — "Granite Towers Equity Group buys a 229-unit
+  // multifamily asset" is Multifamily, not Office (the firm name carries "Towers"). They live in a
+  // last-resort Office fallback below, after every explicit use-type. A unit count ("229-unit") is a
+  // reliable residential tell (office/industrial/retail are measured in SF, never units) → Multifamily.
+  return /office|\bhq\b/.test(t) ? 'Office'
     : /industrial|warehouse|logistics|distribution|\bflex\b/.test(t) ? 'Industrial'
     : /retail|shopping|mall|grocery|storefront|strip (center|mall)/.test(t) ? 'Retail'
     : /hotel|hospitality|resort|motel/.test(t) ? 'Hospitality'
     : /medical|life science|\blab\b|biotech/.test(t) ? 'Medical/Life Science'
     : /mixed-?use/.test(t) ? 'Mixed-Use'
     : /self-?storage/.test(t) ? 'Self-Storage'
-    : /multifamily|apartment|\bres\b|residential communit/.test(t) ? 'Multifamily'
+    : /multifamily|apartment|\bres\b|residential communit|\d[\d,]*[- ]units?\b/.test(t) ? 'Multifamily'
     : /\bland\b|\bsite\b|\bacres?\b/.test(t) ? 'Land'
+    : /high-?rise|tower/.test(t) ? 'Office'
     : null;
 }
 function classify(title, body) {

← 71c6cae2 auto-save: 2026-08-06T06:19:10 (7 files) — data/deals-regist  ·  back to Rentv  ·  harden(deals): Cody gate — classify senior/independent/assis 827944b1 →