- normalize.py: normalize_address() + address_fingerprint() (SHA-256, 4dp coords) - houses.py: match_or_create_house() — tiers: cadastr(1.0) / source_exact(1.0) / fingerprint(0.9) / geo_proximity 30m(0.7) / new - listings.py: match_or_create_listing() — tiers: cadastr(1.0) / source_exact(1.0) / minhash(0.85) / composite floor+area±2%+rooms(0.75) / new - conflict_resolution.py: HOUSE/LISTING_FIELD_PRIORITY dicts + update_canonical_fields() stub (Stage 8 v1) - tests/test_matching.py: 28 unit tests (all pass), mock-DB tier routing coverage
15 lines
521 B
Python
15 lines
521 B
Python
"""Cross-source matching service — public API.
|
|
|
|
Provides 3-tier deduplication for houses and listings across Avito, Cian, Yandex, etc.
|
|
Algorithm reference: decisions/Cross_Source_Matching_Strategy.md
|
|
"""
|
|
|
|
from app.services.matching.conflict_resolution import update_canonical_fields
|
|
from app.services.matching.houses import match_or_create_house
|
|
from app.services.matching.listings import match_or_create_listing
|
|
|
|
__all__ = [
|
|
"match_or_create_house",
|
|
"match_or_create_listing",
|
|
"update_canonical_fields",
|
|
]
|