Ë
    ÔÆj  ã                  óH   — d Z ddlmZ ddlmZmZmZmZmZ ddl	m
Z
mZ dd„Zy)z8Fallback regex-based extraction when LLM is unavailable.é    )Úannotations)Úextract_brandÚextract_categoryÚextract_engine_codesÚextract_oe_numbersÚhas_buy_intent)Ú	PartQueryÚPostc                óÐ   — | j                   }t        |«      }t        |«      }t        |«      }t	        |«      }t        |«      }t        |||dd||r|d   nd||rd¬«	      S d¬«	      S )zDExtract PartQuery using regex patterns only. Lower quality than LLM.Nr   zregex fallbackzregex: no buy intent)	Úis_part_requestÚraw_textÚbrandÚmodelÚyearÚcategoryÚengine_codeÚ
oe_numbersÚreason)Útextr   r   r   r   r   r	   )Úpostr   Ú
is_requestr   r   Úengine_codesr   s          úS/var/www/html/agent.samochodowy/src/agent_samochodowy/extraction/regex_extractor.pyÚextract_with_regexr      s€   € à�9‰9€DÜ Ó%€JÜ˜$Ó€EÜ Ó%€HÜ'¨Ó-€LÜ# DÓ)€JäØ"ØØØØØÙ'3�L ’O¸ØÙ#-Ðô
ð 
ð 4Jô
ð 
ó    N)r   r
   Úreturnr	   )Ú__doc__Ú
__future__r   Ú%agent_samochodowy.extraction.keywordsr   r   r   r   r   Úagent_samochodowy.modelsr	   r
   r   © r   r   ú<module>r"      s   ðÙ >å "÷õ ÷ 5ôr   