§
    'ê[f²  ã                   óv   — d dl mZ d dlmZ d dlmZmZ ej        Z eedddd¬¦  «        Z	de	_
        d	„ Zd
„ ZdS )é    )Úpartial)Úchain)Ú
everygramsÚpad_sequenceTz<s>z</s>)Úpad_leftÚleft_pad_symbolÚ	pad_rightÚright_pad_symbolz‘Pads both ends of a sentence to length specified by ngram order.

    Following convention <s> pads the start of sentence </s> pads its end.
    c                 ó\   — t          t          t          || ¬¦  «        ¦  «        | ¬¦  «        S )zpHelper with some useful defaults.

    Applies pad_both_ends to sentence and follows it up with everygrams.
    ©Ún©Úmax_len)r   ÚlistÚpad_both_ends)ÚorderÚsentences     úI/var/www/piapp/venv/lib/python3.11/site-packages/nltk/lm/preprocessing.pyÚpadded_everygramsr      s,   € õ
 •d�=¨°UÐ;Ñ;Ô;Ñ<Ô<ÀeÐLÑLÔLÐLó    c                 óŠ   ‡ ‡— t          t          ‰ ¬¦  «        Šˆ ˆfd„|D ¦   «         t          t          ‰|¦  «        ¦  «        fS )aú  Default preprocessing for a sequence of sentences.

    Creates two iterators:

    - sentences padded and turned into sequences of `nltk.util.everygrams`
    - sentences padded as above and chained together for a flat stream of words

    :param order: Largest ngram length produced by `everygrams`.
    :param text: Text to iterate over. Expected to be an iterable of sentences.
    :type text: Iterable[Iterable[str]]
    :return: iterator over text as ngrams, iterator over text as vocabulary data
    r   c              3   óf   •K  — | ]+}t          t           ‰|¦  «        ¦  «        ‰¬ ¦  «        V — Œ,dS )r   N)r   r   )Ú.0Úsentr   Ú
padding_fns     €€r   ú	<genexpr>z,padded_everygram_pipeline.<locals>.<genexpr>1   sB   øè è € ÐLÐL¸t�•D˜˜ DÑ)Ô)Ñ*Ô*°EÐ	:Ñ	:Ô	:ÐLÐLÐLÐLÐLÐLr   )r   r   ÚflattenÚmap)r   Útextr   s   ` @r   Úpadded_everygram_pipeliner    "   sQ   øø€ õ �¨%Ð0Ñ0Ô0€JàLÐLÐLÐLÐLÀtÐLÑLÔLÝ•�J Ñ%Ô%Ñ&Ô&ðð r   N)Ú	functoolsr   Ú	itertoolsr   Ú	nltk.utilr   r   Úfrom_iterabler   r   Ú__doc__r   r    © r   r   ú<module>r'      s¥   ðð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à .Ð .Ð .Ð .Ð .Ð .Ð .Ð .à
Ô
€Ø�ØØØØØðñ ô €ð€Ô ðMð Mð Mðð ð ð ð r   