403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/nltk/lm/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/nltk/lm/__pycache__/preprocessing.cpython-311.pyc
�

 T�c��v�ddlmZddlmZddlmZmZejZeedddd���Z	de	_
d	�Zd
�ZdS)�)�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�\�ttt||�����|���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  �7/usr/lib/python3/dist-packages/nltk/lm/preprocessing.py�padded_everygramsrs,��
�d�=��U�;�;�;�<�<�e�L�L�L�L�c����tt�������fd�|D��tt�|����fS)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c3�f�K�|]+}tt�|��������V��,dS)rN)rr)�.0�sentr�
padding_fns  ��r�	<genexpr>z,padded_everygram_pipeline.<locals>.<genexpr>1sB�����L�L�t��D���D�)�)�*�*�E�	:�	:�	:�L�L�L�L�L�Lr)rr�flatten�map)r�textrs` @r�padded_everygram_pipeliner "sQ������%�0�0�0�J�L�L�L�L�L�t�L�L�L���J��%�%�&�&��rN)
�	functoolsr�	itertoolsr�	nltk.utilrr�
from_iterablerr�__doc__rr �rr�<module>r's���������������.�.�.�.�.�.�.�.�
�
�����
�������
��
��M�M�M�����r

Youez - 2016 - github.com/yon3zu
LinuXploit