Ë
    <ÁÜhò  ã                  óD   — d Z ddlmZ ddlZddlZddlmZ  G d„ d«      Zy)a@  
This file contains deprecated code that can only be used with the old `model.fit`-style Sentence Transformers v2.X training.
It exists for backwards compatibility with the `model.old_fit` method, but will be removed in a future version.

Nowadays, with Sentence Transformers v3+, it is recommended to use the `SentenceTransformerTrainer` class to train models.
See https://www.sbert.net/docs/sentence_transformer/training_overview.html for more information.

Instead, you should create a `datasets` `Dataset` for training: https://huggingface.co/docs/datasets/create_dataset
é    )ÚannotationsNé   )ÚInputExamplec                  ó:   — e Zd ZdZd„ Zdd„Zed„ «       Zd„ Zd„ Z	y)	ÚNLIDataReaderz@Reads in the Stanford NLI dataset and the MultiGenre NLI datasetc                ó   — || _         y ©N)Údataset_folder)Úselfr
   s     úl/var/www/html/axiom-chatbot/venv/lib/python3.12/site-packages/sentence_transformers/readers/NLIDataReader.pyÚ__init__zNLIDataReader.__init__   s
   € Ø,ˆÕó    c           
     óÆ  — t        j                  t        j                  j	                  | j
                  d|z   «      dd¬«      j                  «       }t        j                  t        j                  j	                  | j
                  d|z   «      dd¬«      j                  «       }t        j                  t        j                  j	                  | j
                  d|z   «      dd¬«      j                  «       }g }d}t        |||«      D ]Y  \  }}	}
d||fz  }|d	z  }|j                  t        |||	g| j                  |
«      ¬
«      «       d|cxk  rt        |«      k  sŒV |S  Œ[ |S )a  
        data_splits specified which data split to use (train, dev, test).
        Expects that self.dataset_folder contains the files s1.$data_split.gz,  s2.$data_split.gz,
        labels.$data_split.gz, e.g., for the train split, s1.train.gz, s2.train.gz, labels.train.gz
        zs1.Úrtzutf-8)ÚmodeÚencodingzs2.zlabels.r   z%s-%dr   )ÚguidÚtextsÚlabel)ÚgzipÚopenÚosÚpathÚjoinr
   Ú	readlinesÚzipÚappendr   Ú	map_labelÚlen)r   ÚfilenameÚmax_examplesÚs1Ús2ÚlabelsÚexamplesÚidÚ
sentence_aÚ
sentence_br   r   s               r   Úget_exampleszNLIDataReader.get_examples   s:  € ô Y‰Y”r—w‘w—|‘| D×$7Ñ$7¸ÀÑ9IÓJÐQUÐ`gÔh×rÑrÓtˆÜY‰Y”r—w‘w—|‘| D×$7Ñ$7¸ÀÑ9IÓJÐQUÐ`gÔh×rÑrÓtˆÜ—‘ÜG‰GL‰L˜×,Ñ,¨i¸(Ñ.BÓCÈ$ÐY`ô
ç
‰)‹+ð 	ð ˆØˆÜ-0°°R¸Ó-@ò 	Ñ)ˆJ˜
 EØ˜h¨˜^Ñ+ˆDØ!‰GˆBØO‰OœL¨d¸:ÀzÐ:RÐZ^×ZhÑZhÐinÓZoÔpÔqà<Ô0¤3 x£=Ó0Øàˆñ 1ð	ð ˆr   c                 ó   — ddddœS )Nr   r   é   )ÚcontradictionÚ
entailmentÚneutral© r/   r   r   Ú
get_labelszNLIDataReader.get_labels1   s   € à!"°!ÀÑBÐBr   c                ó4   — t        | j                  «       «      S r	   )r   r0   )r   s    r   Úget_num_labelszNLIDataReader.get_num_labels5   s   € Ü4—?‘?Ó$Ó%Ð%r   c                ó`   — | j                  «       |j                  «       j                  «          S r	   )r0   ÚstripÚlower)r   r   s     r   r   zNLIDataReader.map_label8   s#   € Ø‰Ó  §¡£×!4Ñ!4Ó!6Ñ7Ð7r   N)r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r)   Ústaticmethodr0   r2   r   r/   r   r   r   r      s/   „ ÙJò-óð0 ñCó ðCò&ó8r   r   )r9   Ú
__future__r   r   r   Ú r   r   r/   r   r   ú<module>r=      s"   ðñõ #ã Û 	å ÷&8ò &8r   