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 :  /lib/python3/dist-packages/nltk/ccg/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/nltk/ccg/__pycache__/combinator.cpython-311.pyc
�

 T�c6(���dZddlmZmZddlmZGd�de���ZGd�de���ZGd	�d
e��ZGd�de��Z	Gd
�de��Z
d�Zd�Zee
��e��Z
e	e
��e��ZGd�de��Zd�Zd�Zd�Zd�Zee��e��Ze	e��e��Ze	e��ed���ZGd�de��Zd�Zd�Zee��e��Ze	e��ed��Zd�ZGd�de��Zd �Zd!�Zee��e��Z e	e��e��Z!d"S)#z
CCG Combinators
�)�ABCMeta�abstractmethod)�FunctionalCategoryc�>�eZdZdZed���Zed���ZdS)�UndirectedBinaryCombinatora�
    Abstract class for representing a binary combinator.
    Merely defines functions for checking if the function and argument
    are able to be combined, and what the resulting category is.

    Note that as no assumptions are made as to direction, the unrestricted
    combinators can perform all backward, forward and crossed variations
    of the combinators; these restrictions must be added in the rule
    class.
    c��dS�N���self�function�arguments   �5/usr/lib/python3/dist-packages/nltk/ccg/combinator.py�can_combinez&UndirectedBinaryCombinator.can_combine�����c��dSr	r
rs   r�combinez"UndirectedBinaryCombinator.combine rrN��__name__�
__module__�__qualname__�__doc__rrrr
rrrrsT������	�	��
�
��^�
��
�
��^�
�
�
rr)�	metaclassc�>�eZdZdZed���Zed���ZdS)�DirectedBinaryCombinatorz�
    Wrapper for the undirected binary combinator.
    It takes left and right categories, and decides which is to be
    the function, and which the argument.
    It then decides whether or not they can be combined.
    c��dSr	r
�r�left�rights   rrz$DirectedBinaryCombinator.can_combine-rrc��dSr	r
rs   rrz DirectedBinaryCombinator.combine1rrNrr
rrrr%sT���������
�
��^�
��
�
��^�
�
�
rrc�,�eZdZdZdd�Zd�Zd�Zd�ZdS)	�ForwardCombinatorz�
    Class representing combinators where the primary functor is on the left.

    Takes an undirected combinator, and a predicate which adds constraints
    restricting the cases in which it may apply.
    �c�0�||_||_||_dSr	��_combinator�
_predicate�_suffix�r�
combinator�	predicate�suffixs    r�__init__zForwardCombinator.__init__>���%���#�������rc�d�|j�||��o|�||��Sr	�r'rr(rs   rrzForwardCombinator.can_combineCs7����+�+�D�%�8�8�
�T�_�_��%�>
�>
�	
rc#�LK�|j�||��Ed{V��dSr	�r'rrs   rrzForwardCombinator.combineHs7�����#�+�+�D�%�8�8�8�8�8�8�8�8�8�8�8rc�$�d|j�|j��S)N�>�r'r)�rs r�__str__zForwardCombinator.__str__K���3�4�#�3�T�\�3�3�3rN�r$�rrrrr.rrr8r
rrr#r#6s_������������

�
�
�
9�9�9�4�4�4�4�4rr#c�,�eZdZdZdd�Zd�Zd�Zd�ZdS)	�BackwardCombinatorzA
    The backward equivalent of the ForwardCombinator class.
    r$c�0�||_||_||_dSr	r&r*s    rr.zBackwardCombinator.__init__Tr/rc�d�|j�||��o|�||��Sr	r1rs   rrzBackwardCombinator.can_combineYs7����+�+�E�4�8�8�
�T�_�_��%�>
�>
�	
rc#�LK�|j�||��Ed{V��dSr	r3rs   rrzBackwardCombinator.combine^s7�����#�+�+�E�4�8�8�8�8�8�8�8�8�8�8�8rc�$�d|j�|j��S)N�<r6r7s rr8zBackwardCombinator.__str__ar9rNr:r;r
rrr=r=Os_������������

�
�
�
9�9�9�4�4�4�4�4rr=c�$�eZdZdZd�Zd�Zd�ZdS)�UndirectedFunctionApplicationz�
    Class representing function application.
    Implements rules of the form:
    X/Y Y -> X (>)
    And the corresponding backwards application rule
    c��|���sdS|����|��duS�NF)�is_function�arg�	can_unifyrs   rrz)UndirectedFunctionApplication.can_combinems<���#�#�%�%�	��5��<�<�>�>�+�+�H�5�5��=�=rc#��K�|���sdS|����|��}|�dS|����|��V�dSr	)rGrHrI�res�
substitute�rr
r�subss    rrz%UndirectedFunctionApplication.combinessl�����#�#�%�%�	��F��|�|�~�~�'�'��1�1���<��F��l�l�n�n�'�'��-�-�-�-�-�-�-rc��dS)Nr$r
r7s rr8z%UndirectedFunctionApplication.__str__}s���rrN�rrrrrrr8r
rrrDrDesK��������>�>�>�.�.�.�����rrDc�N�|������Sr	��dir�
is_forward�rr s  r�forwardOnlyrV�s���8�8�:�:� � �"�"�"rc�N�|������Sr	�rS�is_backwardrUs  r�backwardOnlyrZ�s���9�9�;�;�"�"�$�$�$rc�$�eZdZdZd�Zd�Zd�ZdS)�UndirectedCompositionz�
    Functional composition (harmonic) combinator.
    Implements rules of the form
    X/Y Y/Z -> X/Z (B>)
    And the corresponding backwards and crossed variations.
    c�h�|���r|���sdS|������ra|������r;|����|�����duSdSrF)rGrS�can_composerHrIrKrs   rrz!UndirectedComposition.can_combine�s����$�$�&�&�	�8�+?�+?�+A�+A�	��5��<�<�>�>�%�%�'�'�	H�H�L�L�N�N�,F�,F�,H�,H�	H��|�|�~�~�/�/������?�?�4�G�G��urc#�VK�|���r|���sdS|������r�|������r�|����|�����}|�ut
|����|��|����|��|�����V�dSdSdSdSr	)rGrSr^rHrIrKrrLrMs    rrzUndirectedComposition.combine�s�����$�$�&�&�	�8�+?�+?�+A�+A�	��F��<�<�>�>�%�%�'�'�	�H�L�L�N�N�,F�,F�,H�,H�	��<�<�>�>�+�+�H�L�L�N�N�;�;�D���(��L�L�N�N�-�-�d�3�3��L�L�N�N�-�-�d�3�3��L�L�N�N��������	�	�	�	��rc��dS)N�Br
r7s rr8zUndirectedComposition.__str__�����srNrPr
rrr\r\�sK�����������
�
�
�����rr\c��|������o%|������Sr	rRrUs  r�bothForwardrd�s5���8�8�:�:� � �"�"�?�u�y�y�{�{�'=�'=�'?�'?�?rc��|������o%|������Sr	rXrUs  r�bothBackwardrf�s5���8�8�:�:�!�!�#�#�A��	�	���(?�(?�(A�(A�Arc��|������o%|������Sr	)rSrTrYrUs  r�crossedDirsrh�s5���8�8�:�:� � �"�"�@�u�y�y�{�{�'>�'>�'@�'@�@rc��t||��sdS|������s(|������rdS|������SrF)rhrS�	can_crossrH�is_primitiverUs  r�backwardBxConstraintrl�so���t�U�#�#���u��8�8�:�:���!�!��e�i�i�k�k�&;�&;�&=�&=���u��8�8�:�:�"�"�$�$�$r�x)r-c�$�eZdZdZd�Zd�Zd�ZdS)�UndirectedSubstitutionz�
    Substitution (permutation) combinator.
    Implements rules of the form
    Y/Z (X\Y)/Z -> X/Z (<Sx)
    And other variations.
    c�^�|���s|���rdS|������rdS|������sdS|������r&|������sdS|������|���ko)|���|���kSrF)rkrKrHrSr^rs   rrz"UndirectedSubstitution.can_combine�s���� � �"�"�	�h�&;�&;�&=�&=�	��5��<�<�>�>�&�&�(�(�	��5��|�|�~�~�*�*�,�,�	��5������*�*�,�,�	������1K�1K�1M�1M�	��5������"�"�$�$������6�
��L�L�N�N�h�l�l�n�n�,�	
rc#��K�|�||��r]t|������|���|�����V�dSdSr	)rrrKrHrSrs   rrzUndirectedSubstitution.combine�sy�������H�h�/�/�	�$������"�"�$�$�h�l�l�n�n�h�l�l�n�n���
�
�
�
�
�	�	rc��dS)N�Sr
r7s rr8zUndirectedSubstitution.__str__�rbrNrPr
rrroro�sK��������
�
�
�"�������rroc���t||��sdS|���������o%|������SrF)rdrKrSrTrHrkrUs  r�forwardSConstraintru�sV���t�U�#�#���u��8�8�:�:�>�>���&�&�(�(�F�T�X�X�Z�Z�-D�-D�-F�-F�Frc�~�|������s(|������rdSt||��sdS|���������o%|������SrF)rSrjrdrKrYrHrkrUs  r�backwardSxConstraintrws����8�8�:�:���!�!��e�i�i�k�k�&;�&;�&=�&=���u��t�U�#�#���u��9�9�;�;�?�?���(�(�*�*�I�u�y�y�{�{�/G�/G�/I�/I�Irc���|������r:|���}|�������:|Sr	)rKrG)�categs r�innermostFunctionrzsN��
�)�)�+�+�
!�
!�
#�
#���	�	�����)�)�+�+�
!�
!�
#�
#���Lrc�$�eZdZdZd�Zd�Zd�ZdS)�UndirectedTypeRaisez1
    Undirected combinator for type raising.
    c��|���r&|������sdSt|��}t�t
�����}|�dSdS)NFT)rGrKrzrrI�	arg_categrH)rr
rHrNs    rrzUndirectedTypeRaise.can_combinesn�����!�!�	�c�g�g�i�i�&;�&;�&=�&=�	��5���$�$���~�~�i�m�m�o�o�.�.�����4��urc	#�K�|���r:|���r&|������sdSt|��}|�|�����}|�p|����|��}t|t|||�����|�����V�dSdSr	)	rkrGrKrzrIrHrLrrS)rr
rHrN�xcats     rrzUndirectedTypeRaise.combine.s������!�!�#�#�	�(+���(9�(9�	�>A�g�g�i�i�>S�>S�>U�>U�	�
�F� ��$�$���!�!�#�'�'�)�)�,�,�����7�7�9�9�'�'��-�-�D�$��(��x������C�C�s�w�w�y�y�\���
�
�
�
�
��rc��dS)N�Tr
r7s rr8zUndirectedTypeRaise.__str__>rbrNrPr
rrr|r|sK�����������&��� ����rr|c��t|��}|������o%|������Sr	)rzrSrYrKrk�rr rHs   r�forwardTConstraintr�GsB��
�E�
"�
"�C��7�7�9�9� � �"�"�?�s�w�w�y�y�'=�'=�'?�'?�?rc��t|��}|������o%|������Sr	)rzrSrTrKrkr�s   r�backwardTConstraintr�LsB��
�D�
!�
!�C��7�7�9�9���!�!�>�c�g�g�i�i�&<�&<�&>�&>�>rN)"r�abcrr�nltk.ccg.apirrrr#r=rDrVrZ�ForwardApplication�BackwardApplicationr\rdrfrhrl�ForwardComposition�BackwardComposition�
BackwardBxrorurw�ForwardSubstitution�
BackwardSxrzr|r�r��ForwardT�	BackwardTr
rr�<module>r�sw����(�'�'�'�'�'�'�'�+�+�+�+�+�+�
�
�
�
�
�7�
�
�
�
�*
�
�
�
�
��
�
�
�
�"4�4�4�4�4�0�4�4�4�24�4�4�4�4�1�4�4�4�,�����$>����>#�#�#�
%�%�%�
'�&�'D�'D�'F�'F��T�T��(�(�)F�)F�)H�)H�,�W�W�������6����D@�@�@�B�B�B�
A�A�A�%�%�%�'�&�'<�'<�'>�'>��L�L��(�(�)>�)>�)@�)@�,�O�O�� �
�����1�#����
�
 � � � � �7� � � �HG�G�G�J�J�J�(�'�(>�(>�(@�(@�BT�U�U��
�
� 6� 6� 8� 8�:N�PS�
T�
T�
�
���)�)�)�)�)�4�)�)�)�b@�@�@�
?�?�?���0�0�2�2�4F�G�G����2�2�4�4�6I�J�J�	�	�	r

Youez - 2016 - github.com/yon3zu
LinuXploit