← back to Rentv Sheet Enrich

__pycache__/guards.cpython-314.pyc

34 lines

+
�Mj�
��.�Rt^RIt0RkRkRkRkRkRkRkR	kR
kRkRkR
kRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkR kR!kR"kR#kR$kR%kR&kR'kR(kR)kR*kR+kR,kR-kR.kR/kR0kR1kR2kR3kR4kR5kR6kR7kR8kR9kR:kR;kR<kR=kR>kR?ktR@tRAt0RDmtRBtRCtR#)EuV
guards.py — safety filters for recovered-email quality (Cody gate, 2026-08-14).

Two hard gates that every recovered email must pass before it is staged OR written:

  bad_name(name)      -> True if the Contact Name is NOT a plausible human name
                         (placeholder text like "Prop Not"/"Right People", <2 alpha
                         tokens, or a token on the placeholder stoplist). The parts()
                         parser blindly takes toks[0]/toks[-1], so "Prop Not" became
                         prop.not@metlife.com — this stops that class at the source.

  blocked_domain(dom) -> True if the domain is a large institutional / government /
                         franchise employer where a first.last guess is likely WRONG
                         (Goldman uses its own convention; a .gov uses a different one).
                         MX-valid means the domain accepts mail; it says nothing about
                         whether first.last@ is the right local-part. For these we hold
                         rather than guess.

Pure/stdlib. Same input -> same output.
N�prop�props�property�people�contact�contacts�for�not�none�tbd�nazn/a�unknown�orig�email�is�the�legacy�arcg�arch�team�info�admin�office�front�desk�leasing�sales�group�corp�inc�llc�test�sample�new�old�asst�	assistant�jr�sr�vp�svp�evp�avp�dr�mr�mrs�ms�ceo�cfo�coo�cto�cmo�pres�	president�dir�director�mgr�manager�broker�agent�repc��\P!RT;'gRP44Uu.uFq'gKVNK	up#uupi)z[\s,]+�)�re�split�strip)�name�ts& �	guards.py�_tokensrG$s:���x�x�	�D�J�J�B�+=�+=�+?�@�F�@�!�A�A�A�@�F�F��Fs�	A	�A	c���\V4p\V4^8dR#V^,VR,r2VR,P4'dVR,P4'gR#\P!RRVP44\P!RRVP44rT\V4^8g\V4^8dR#V\9gV\9dR#R#)z6True if `name` is not a plausible two-part human name.T:N�Nz[^a-z]r@F�����)rG�len�isalpharA�sub�lower�
_NAME_STOP)rD�toks�first�last�fa�las&     rF�bad_namerU(s����4�=�D�
�4�y�1�}���q�'�4��8�4��"�I�����D��H�$4�$4�$6�$6��
�V�V�I�r�5�;�;�=�
1�2�6�6�)�R�����3V��
�2�w��{�c�"�g��k��	�Z��2��+���c���T;'gRP4P4pV\9dR#VPR4'gVPR4'dR#R#)zOTrue if `dom` is a big-institution / gov / franchise domain we shouldn't guess.r@Tz.govz.eduF)rCrN�_BLOCKED_DOMAINS�endswith)�dom�ds& rF�blocked_domainr\DsN��	�������!�!�#�A������z�z�&���Q�Z�Z��/�/��rVc��\V4'dR#RV9dVPR4R,MRp\V4'dR#R#)z>Convenience: True if this (name,email) is safe to stage/write.F�@r@TrJ)rUrBr\)rDrrZs&& rF�ok_emailr_Ns:����~�~��"%��,�%�+�+�c�
�2�
�B�C��c����rV>�gs.com�jll.com�cbre.com�nmrk.com�	aecom.com�	bell.bank�	hyatt.com�	pimco.com�	rsmus.com�
kidder.com�
srpnet.com�cornell.edu�land.az.gov�metlife.com�cushwake.com�marriott.com)�__doc__rArOrGrUrXr\r_�rVrF�<module>rrs����(
�	�
�	��	��	�!)�	�+4�	�6@�	�BG�	�IN�	�
�	��	��	��	� )�	�+1�	�3:�	�<@�	�BG�	�IQ�	��	�
�	��	�#�	�%,�	�.6�	�8?�	�AG�	�IR�	��		��		��		�$�		�&+�		�-3�		�5=�		�?D�		�FK�		��
	�
�
	��
	� $�
	�&*�
	�,1�
	�38�
	�:?�
	�AE�
	�GK�
	�MR�
	�	�	��	��	��	� %�	�',�	�.4�	�6A�	�CH�	�JT�	�
�	��	��	�!(�	�*/�	�
�G��(���rV