googlejobs: filter out U.S. Navy company postings

Add exclude_company_keywords post-filter (case-insensitive substring
match against company field). Configure googlejobs.yaml to exclude
"U.S. Navy" / "US Navy" — these recurring military recruitment ads
aren't relevant orthodontist openings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
I Luk Kim 3 months ago
parent 2f33ea890d
commit fa748bebf9

@ -55,6 +55,7 @@ class PostFilterConfig(BaseModel):
include_posted_text: list[str] = Field(default_factory=list)
include_title_keywords: list[str] = Field(default_factory=list)
exclude_title_keywords: list[str] = Field(default_factory=list)
exclude_company_keywords: list[str] = Field(default_factory=list)
class HealthcheckConfig(BaseModel):

@ -329,6 +329,18 @@ class RunOrchestrator:
f"(excluded: {manifest.post_filters.exclude_title_keywords})"
)
if manifest.post_filters.exclude_company_keywords:
exc_co = [t.lower() for t in manifest.post_filters.exclude_company_keywords]
before = len(candidates)
candidates = [
c for c in candidates
if not any(kw in (c.company or "").lower() for kw in exc_co)
]
logger.info(
f"[{site_id}] company exclude filter: {len(candidates)}/{before} kept "
f"(excluded: {manifest.post_filters.exclude_company_keywords})"
)
# Ensure fingerprints and deduplicate within batch
candidates = ensure_fingerprints(candidates)
candidates = deduplicate_in_batch(candidates)

@ -29,6 +29,9 @@ extract:
post_filters:
include_title_keywords:
- orthodontist
exclude_company_keywords:
- u.s. navy
- us navy
healthcheck:
min_items_expected: 0

Loading…
Cancel
Save