Skip CORES address suggestion when it's just the company name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-04-29 01:24:10 -05:00
parent 63f74e8486
commit 42f331101e

View file

@ -167,13 +167,16 @@
});
}
// CORES address (entity-level, not a person name)
if (d.cores?.address && d.cores.city) {
// CORES address — only if it looks like an actual street address
// (skip if it's just the company name, which CORES sometimes returns)
const coresAddr = (d.cores?.address || "").trim();
const looksLikeStreet = coresAddr && /\d/.test(coresAddr) && !/^[A-Z].*\b(LLC|Inc|Corp|Ltd|LP|LLP)\b/i.test(coresAddr);
if (looksLikeStreet && d.cores.city) {
suggestions.push({
name: "",
title: "Principal address (from CORES)",
source: "FCC CORES",
address: d.cores.address,
address: coresAddr,
city: d.cores.city,
state: d.cores.state || "",
zip: d.cores.zip || "",