Ë
    çÍ:jJX  ã                   ó‚   — d dl Z d dlmZmZ d dlmZ d dlmZ  G d„ dee¬«      Z G d„ d	e«      Z	 G d
„ de«      Z
d	dgZy)é    N)ÚABCMetaÚabstractmethod)ÚTree)Úslice_boundsc                   ó¸   ‡ — e Zd ZdZdˆ fd„	Zedd„«       Zed„ «       Zˆ fd„Zˆ fd„Z	ˆ fd„Z
ˆ fd„Zˆ fd	„Zdˆ fd
„	Zˆ fd„Z eed«      r	d„ Zd„ Zd„ Zd„ Zˆ xZS )ÚAbstractParentedTreeaÃ  
    An abstract base class for a ``Tree`` that automatically maintains
    pointers to parent nodes.  These parent pointers are updated
    whenever any change is made to a tree's structure.  Two subclasses
    are currently defined:

      - ``ParentedTree`` is used for tree structures where each subtree
        has at most one parent.  This class should be used in cases
        where there is no"sharing" of subtrees.

      - ``MultiParentedTree`` is used for tree structures where a
        subtree may have zero or more parents.  This class should be
        used in cases where subtrees may be shared.

    Subclassing
    ===========
    The ``AbstractParentedTree`` class redefines all operations that
    modify a tree's structure to call two methods, which are used by
    subclasses to update parent information:

      - ``_setparent()`` is called whenever a new child is added.
      - ``_delparent()`` is called whenever a child is removed.
    c                 ó  •— t         ‰| �  ||«       |�ot        | «      D ]*  \  }}t        |t        «      sŒ| j                  ||d¬«       Œ, t        | «      D ](  \  }}t        |t        «      sŒ| j                  ||«       Œ* y y )NT©Údry_run)ÚsuperÚ__init__Ú	enumerateÚ
isinstancer   Ú
_setparent©ÚselfÚnodeÚchildrenÚiÚchildÚ	__class__s        €úg/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/nltk/tree/parented.pyr   zAbstractParentedTree.__init__.   s…   ø€ Ü‰Ñ˜˜xÔ(ð Ðô & d›Oò <‘��5Ü˜e¤TÕ*Ø—O‘O E¨1°d�OÕ;ð<ô & d›Oò .‘��5Ü˜e¤TÕ*Ø—O‘O E¨1Õ-ñ.ð  ó    c                  ó   — y)a¡  
        Update the parent pointer of ``child`` to point to ``self``.  This
        method is only called if the type of ``child`` is ``Tree``;
        i.e., it is not called when adding a leaf to a tree.  This method
        is always called before the child is actually added to the
        child list of ``self``.

        :type child: Tree
        :type index: int
        :param index: The index of ``child`` in ``self``.
        :raise TypeError: If ``child`` is a tree with an impropriate
            type.  Typically, if ``child`` is a tree, then its type needs
            to match the type of ``self``.  This prevents mixing of
            different tree types (single-parented, multi-parented, and
            non-parented).
        :param dry_run: If true, the don't actually set the child's
            parent pointer; just check for any error conditions, and
            raise an exception if one is found.
        N© ©r   r   Úindexr   s       r   r   zAbstractParentedTree._setparent@   ó   � r   c                  ó   — y)a»  
        Update the parent pointer of ``child`` to not point to self.  This
        method is only called if the type of ``child`` is ``Tree``; i.e., it
        is not called when removing a leaf from a tree.  This method
        is always called before the child is actually removed from the
        child list of ``self``.

        :type child: Tree
        :type index: int
        :param index: The index of ``child`` in ``self``.
        Nr   ©r   r   r   s      r   Ú
_delparentzAbstractParentedTree._delparentV   r   r   c                 óÂ  •— t        |t        «      r]t        | |d¬«      \  }}}t        |||«      D ]+  }t        | |   t        «      sŒ| j                  | |   |«       Œ- t        ‰| �  |«       y t        |t        «      r[|dk  r|t        | «      z  }|dk  rt        d«      ‚t        | |   t        «      r| j                  | |   |«       t        ‰| �  |«       y t        |t        t        f«      r;t        |«      dk(  rt        d«      ‚t        |«      dk(  r| |d   = y | |d      |dd  = y t        t        | «      j                  ›dt        |«      j                  ›�«      ‚)NT©Ú
allow_stepr   úindex out of rangez(The tree position () may not be deleted.é   ú indices must be integers, not )r   Úslicer   Úranger   r!   r   Ú__delitem__ÚintÚlenÚ
IndexErrorÚlistÚtupleÚ	TypeErrorÚtypeÚ__name__)r   r   ÚstartÚstopÚstepr   r   s         €r   r*   z AbstractParentedTree.__delitem__j   sJ  ø€ ä�eœUÔ#Ü ,¨T°5ÀTÔ JÑˆE�4˜ä˜5 $¨Ó-ò 0�Ü˜d 1™g¤tÕ,Ø—O‘O D¨¡G¨QÕ/ð0ô ‰GÑ Õ&ô ˜œsÔ#Ø�qŠyØœ˜T›Ñ"�Ø�qŠyÜ Ð!5Ó6Ð6ä˜$˜u™+¤tÔ,Ø—‘  U¡¨UÔ3ä‰GÑ Õ&ä˜¤¤e˜}Ô-ä�5‹z˜QŠÜ Ð!KÓLÐLä�U“˜q’Ø˜˜q™‘Nð ˜˜q™‘N 5¨¨ 9Ñ-ô ä˜“:×&Ó&¬¨U«×(<Ò(<ð>óð r   c                 óX  •— t        |t        «      rùt        | |d¬«      \  }}}t        |t        t        f«      st        |«      }t        |«      D ]0  \  }}t        |t        «      sŒ| j                  ||||z  z   d¬«       Œ2 t        |||«      D ]+  }t        | |   t        «      sŒ| j                  | |   |«       Œ- t        |«      D ].  \  }}t        |t        «      sŒ| j                  ||||z  z   «       Œ0 t        ‰| �-  ||«       y t        |t        «      r†|dk  r|t        | «      z  }|dk  rt        d«      ‚|| |   u ry t        |t        «      r| j                  ||«       t        | |   t        «      r| j                  | |   |«       t        ‰| �-  ||«       y t        |t        t        f«      r?t        |«      dk(  rt        d«      ‚t        |«      dk(  r	|| |d   <   y || |d      |dd  <   y t        t!        | «      j"                  ›dt!        |«      j"                  ›�«      ‚)	NTr#   r
   r   r%   z,The tree position () may not be assigned to.r&   r'   )r   r(   r   r.   r/   r   r   r   r)   r!   r   Ú__setitem__r+   r,   r-   r0   r1   r2   )	r   r   Úvaluer3   r4   r5   r   r   r   s	           €r   r7   z AbstractParentedTree.__setitem__’   s  ø€ ä�eœUÔ#Ü ,¨T°5ÀTÔ JÑˆE�4˜ä˜e¤d¬E ]Ô3Ü˜U›�ô & eÓ,ò K‘��5Ü˜e¤TÕ*Ø—O‘O E¨5°1°t±8Ñ+;ÀT�OÕJðKô ˜5 $¨Ó-ò 0�Ü˜d 1™g¤tÕ,Ø—O‘O D¨¡G¨QÕ/ð0ô & eÓ,ò =‘��5Ü˜e¤TÕ*Ø—O‘O E¨5°1°t±8Ñ+;Õ<ð=ô ‰GÑ  uÕ-ô ˜œsÔ#Ø�qŠyØœ˜T›Ñ"�Ø�qŠyÜ Ð!5Ó6Ð6à˜˜U™Ñ#Øä˜%¤Ô&Ø—‘  uÔ-ä˜$˜u™+¤tÔ,Ø—‘  U¡¨UÔ3ä‰GÑ  uÕ-ä˜¤¤e˜}Ô-ä�5‹z˜QŠÜ Ð!OÓPÐPä�U“˜q’Ø!&��U˜1‘X’ð -2��U˜1‘X‘˜u Q R˜yÒ)ô ä˜“:×&Ó&¬¨U«×(<Ò(<ð>óð r   c                 óz   •— t        |t        «      r| j                  |t        | «      «       t        ‰| �  |«       y ©N©r   r   r   r,   r   Úappend)r   r   r   s     €r   r<   zAbstractParentedTree.appendÎ   s+   ø€ Ü�eœTÔ"Ø�O‰O˜E¤3 t£9Ô-Ü‰‰�uÕr   c                 óˆ   •— |D ]<  }t        |t        «      r| j                  |t        | «      «       t        ‰| �  |«       Œ> y r:   r;   )r   r   r   r   s      €r   ÚextendzAbstractParentedTree.extendÓ   s:   ø€ Øò 	"ˆEÜ˜%¤Ô&Ø—‘ ¤s¨4£yÔ1Ü‰G‰N˜5Õ!ñ	"r   c                 óž   •— |dk  r|t        | «      z  }|dk  rd}t        |t        «      r| j                  ||«       t        ‰| �  ||«       y ©Nr   )r,   r   r   r   r   Úinsert)r   r   r   r   s      €r   rA   zAbstractParentedTree.insertÙ   sL   ø€ ð �1Š9Ø”S˜“YÑˆEØ�1Š9ØˆEä�eœTÔ"Ø�O‰O˜E 5Ô)Ü‰‰�u˜eÕ$r   c                 ó¸   •— |dk  r|t        | «      z  }|dk  rt        d«      ‚t        | |   t        «      r| j	                  | |   |«       t
        ‰| �  |«      S )Nr   r%   )r,   r-   r   r   r!   r   Úpop)r   r   r   s     €r   rC   zAbstractParentedTree.popæ   sZ   ø€ Ø�1Š9Ø”S˜“YÑˆEØ�1Š9ÜÐ1Ó2Ð2Ü�d˜5‘k¤4Ô(Ø�O‰O˜D ™K¨Ô/Ü‰w‰{˜5Ó!Ð!r   c                 ó–   •— | j                  |«      }t        | |   t        «      r| j                  | |   |«       t        ‰| �  |«       y r:   )r   r   r   r!   r   Úremove)r   r   r   r   s      €r   rE   zAbstractParentedTree.removeñ   s=   ø€ Ø—
‘
˜5Ó!ˆÜ�d˜5‘k¤4Ô(Ø�O‰O˜D ™K¨Ô/Ü‰‰�uÕr   Ú__getslice__c           	      ó`   — | j                  t        t        d|«      t        d|«      «      «      S r@   )Ú__getitem__r(   Úmax©r   r3   r4   s      r   rF   z!AbstractParentedTree.__getslice__ÿ   ó&   € Ø×#Ñ#¤E¬#¨a°«-¼¸QÀ»Ó$FÓGÐGr   c           	      ó`   — | j                  t        t        d|«      t        d|«      «      «      S r@   )r*   r(   rI   rJ   s      r   Ú__delslice__z!AbstractParentedTree.__delslice__  rK   r   c           	      ób   — | j                  t        t        d|«      t        d|«      «      |«      S r@   )r7   r(   rI   )r   r3   r4   r8   s       r   Ú__setslice__z!AbstractParentedTree.__setslice__  s(   € Ø×#Ñ#¤E¬#¨a°«-¼¸QÀ»Ó$FÈÓNÐNr   c                 ó0   — | j                   t        | «      fS )a©  Method used by the pickle module when un-pickling.
        This method provides the arguments passed to ``__new__``
        upon un-pickling. Without this method, ParentedTree instances
        cannot be pickled and unpickled in Python 3.7+ onwards.

        :return: Tuple of arguments for ``__new__``, i.e. the label
            and the children of this node.
        :rtype: Tuple[Any, List[AbstractParentedTree]]
        )Ú_labelr.   ©r   s    r   Ú__getnewargs__z#AbstractParentedTree.__getnewargs__  s   € ð —‘œT $›ZÐ(Ð(r   r:   ©F)éÿÿÿÿ)r2   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r!   r*   r7   r<   r>   rA   rC   rE   Úhasattrr.   rF   rM   rO   rS   Ú__classcell__©r   s   @r   r   r      s}   ø„ ñõ0.ð$ òó ðð* ñó ðô&&ôP:ôxô
"ô%õ"ôñ ˆt�^Ô$ò	Hò	Hò	Oö
)r   r   )Ú	metaclassc                   óh   ‡ — e Zd ZdZdˆ fd„	Zd„ Zdˆ fd„	Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zdd„Zˆ xZS )ÚParentedTreea  
    A ``Tree`` that automatically maintains parent pointers for
    single-parented trees.  The following are methods for querying
    the structure of a parented tree: ``parent``, ``parent_index``,
    ``left_sibling``, ``right_sibling``, ``root``, ``treeposition``.

    Each ``ParentedTree`` may have at most one parent.  In
    particular, subtrees may not be shared.  Any attempt to reuse a
    single ``ParentedTree`` as a child of more than one parent (or
    as multiple children of the same parent) will cause a
    ``ValueError`` exception to be raised.

    ``ParentedTrees`` should never be used in the same tree as ``Trees``
    or ``MultiParentedTrees``.  Mixing tree implementations may result
    in incorrect parent pointers and in ``TypeError`` exceptions.
    c                 ó¶   •— d | _         	 t        ‰| �	  ||«       |€>t        | «      D ]/  \  }}t	        |t
        «      sŒd |_         | j                  ||«       Œ1 y y r:   )Ú_parentr   r   r   r   r   r   r   s        €r   r   zParentedTree.__init__'  s_   ø€ ØˆŒØCÜ‰Ñ˜˜xÔ(ØÐô
 & d›Oò .‘��5Ü˜e¤TÕ*Ø$(�E”MØ—O‘O E¨1Õ-ñ.ð r   c                 ó   — ddl m} |S )Nr   )ÚImmutableParentedTree)Únltk.tree.immutablerb   )r   rb   s     r   Ú_frozen_classzParentedTree._frozen_class5  s   € Ý=à$Ð$r   c                 ó€   •— |s,t        j                  | j                  j                  › d�«       t        ‰| �  d¬«      S )NzB objects do not support shallow copies. Defaulting to a deep copy.T)Údeep)ÚwarningsÚwarnr   r2   r   Úcopy)r   rf   r   s     €r   ri   zParentedTree.copy:  s;   ø€ ÙÜ�M‰MØ—>‘>×*Ñ*Ð+Ð+mÐnôô ‰w‰| ˆ|Ó&Ð&r   c                 ó   — | j                   S )z5The parent of this tree, or None if it has no parent.)r`   rR   s    r   ÚparentzParentedTree.parentE  s   € à�|‰|Ðr   c                 ót   — | j                   €yt        | j                   «      D ]  \  }}|| u sŒ|c S  J d«       ‚)aD  
        The index of this tree in its parent.  I.e.,
        ``ptree.parent()[ptree.parent_index()] is ptree``.  Note that
        ``ptree.parent_index()`` is not necessarily equal to
        ``ptree.parent.index(ptree)``, since the ``index()`` method
        returns the first child that is equal to its argument.
        Nz&expected to find self in self._parent!)r`   r   )r   r   r   s      r   Úparent_indexzParentedTree.parent_indexI  sF   € ð �<‰<ÐØÜ! $§,¡,Ó/ò 	‰HˆAˆuØ˜Š}Ø’ð	ð 	?Ð>Ó>ˆur   c                 ój   — | j                  «       }| j                  r|dkD  r| j                  |dz
     S y)z6The left sibling of this tree, or None if it has none.r   r&   N)rm   r`   ©r   rm   s     r   Úleft_siblingzParentedTree.left_siblingX  s5   € à×(Ñ(Ó*ˆØ�<Š<˜L¨1Ò,Ø—<‘< ¨qÑ 0Ñ1Ð1Ør   c                 ó–   — | j                  «       }| j                  r-|t        | j                  «      dz
  k  r| j                  |dz      S y)z7The right sibling of this tree, or None if it has none.r&   N)rm   r`   r,   ro   s     r   Úright_siblingzParentedTree.right_sibling_  sC   € à×(Ñ(Ó*ˆØ�<Š<˜L¬C°·±Ó,=ÀÑ,AÒBØ—<‘< ¨qÑ 0Ñ1Ð1Ør   c                 ól   — | }|j                  «       �!|j                  «       }|j                  «       �Œ!|S )z¶
        The root of this tree.  I.e., the unique ancestor of this tree
        whose parent is None.  If ``ptree.parent()`` is None, then
        ``ptree`` is its own root.
        )rk   )r   Úroots     r   rt   zParentedTree.rootf  s3   € ð ˆØ�k‰k‹mÐ'Ø—;‘;“=ˆDð �k‰k‹mÑ'àˆr   c                 ó„   — | j                  «       €y| j                  «       j                  «       | j                  «       fz   S )z�
        The tree position of this tree, relative to the root of the
        tree.  I.e., ``ptree.root[ptree.treeposition] is ptree``.
        r   )rk   Útreepositionrm   rR   s    r   rv   zParentedTree.treepositionq  s9   € ð
 �;‰;‹=Ð Øà—;‘;“=×-Ñ-Ó/°4×3DÑ3DÓ3FÐ2HÑHÐHr   c                 óh   — t        |t        «      sJ ‚| |   |u sJ ‚|j                  | u sJ ‚d |_        y r:   )r   r^   r`   r    s      r   r!   zParentedTree._delparent  s?   € ä˜%¤Ô.Ð.Ð.Ø�E‰{˜eÑ#Ð#Ð#Ø�}‰} Ñ$Ð$Ð$ð ˆ�r   c                 ó”   — t        |t        «      st        d«      ‚t        |d«      r|j                  �t        d«      ‚|s| |_        y y )Nz5Can not insert a non-ParentedTree into a ParentedTreer`   z3Can not insert a subtree that already has a parent.)r   r^   r0   rY   r`   Ú
ValueErrorr   s       r   r   zParentedTree._setparentˆ  sJ   € ä˜%¤Ô.ÜÐSÓTÐTô �5˜)Ô$¨¯©Ð)BÜÐRÓSÐSñ Ø ˆE�Mð r   r:   rT   )r2   rV   rW   rX   r   rd   ri   rk   rm   rp   rr   rt   rv   r!   r   rZ   r[   s   @r   r^   r^     s@   ø„ ñõ".ò%õ
'òò?òòò	òIò÷!r   r^   c                   óh   ‡ — e Zd ZdZdˆ fd„	Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zdd„Zˆ xZS )ÚMultiParentedTreea  
    A ``Tree`` that automatically maintains parent pointers for
    multi-parented trees.  The following are methods for querying the
    structure of a multi-parented tree: ``parents()``, ``parent_indices()``,
    ``left_siblings()``, ``right_siblings()``, ``roots``, ``treepositions``.

    Each ``MultiParentedTree`` may have zero or more parents.  In
    particular, subtrees may be shared.  If a single
    ``MultiParentedTree`` is used as multiple children of the same
    parent, then that parent will appear multiple times in its
    ``parents()`` method.

    ``MultiParentedTrees`` should never be used in the same tree as
    ``Trees`` or ``ParentedTrees``.  Mixing tree implementations may
    result in incorrect parent pointers and in ``TypeError`` exceptions.
    c                 ó¶   •— g | _         	 t        ‰| �	  ||«       |€>t        | «      D ]/  \  }}t	        |t
        «      sŒg |_         | j                  ||«       Œ1 y y r:   )Ú_parentsr   r   r   r   r   r   r   s        €r   r   zMultiParentedTree.__init__¨  sc   ø€ ØˆŒð	ô 	‰Ñ˜˜xÔ(ØÐô
 & d›Oò .‘��5Ü˜e¤TÕ*Ø%'�E”NØ—O‘O E¨1Õ-ñ.ð r   c                 ó   — ddl m} |S )Nr   )ÚImmutableMultiParentedTree)rc   r   )r   r   s     r   rd   zMultiParentedTree._frozen_class¸  s   € ÝBà)Ð)r   c                 ó,   — t        | j                  «      S )a  
        The set of parents of this tree.  If this tree has no parents,
        then ``parents`` is the empty set.  To check if a tree is used
        as multiple children of the same parent, use the
        ``parent_indices()`` method.

        :type: list(MultiParentedTree)
        )r.   r}   rR   s    r   ÚparentszMultiParentedTree.parentsÁ  s   € ô �D—M‘MÓ"Ð"r   c                 ój   — | j                  «       D ��cg c]  \  }}|dkD  r||dz
     ‘Œ c}}S c c}}w )a}  
        A list of all left siblings of this tree, in any of its parent
        trees.  A tree may be its own left sibling if it is used as
        multiple contiguous children of the same parent.  A tree may
        appear multiple times in this list if it is the left sibling
        of this tree with respect to multiple parents.

        :type: list(MultiParentedTree)
        r   r&   )Ú_get_parent_indices©r   rk   r   s      r   Úleft_siblingszMultiParentedTree.left_siblingsÌ  sA   € ð $(×#;Ñ#;Ó#=÷
á�˜Ø�qŠyð �5˜1‘9Óó
ð 	
ùó 
s   ”/c                 ó‚   — | j                  «       D ��cg c]  \  }}|t        |«      dz
  k  r||dz      ‘Œ  c}}S c c}}w )a€  
        A list of all right siblings of this tree, in any of its parent
        trees.  A tree may be its own right sibling if it is used as
        multiple contiguous children of the same parent.  A tree may
        appear multiple times in this list if it is the right sibling
        of this tree with respect to multiple parents.

        :type: list(MultiParentedTree)
        r&   )rƒ   r,   r„   s      r   Úright_siblingsz MultiParentedTree.right_siblingsÜ  sJ   € ð $(×#;Ñ#;Ó#=÷
á�˜Øœ˜F› a™Ò(ð �5˜1‘9Óó
ð 	
ùó 
s   ”#;c                 ó~   — | j                   D ���cg c]  }t        |«      D ]  \  }}|| u r||f‘Œ Œ c}}}S c c}}}w r:   ©r}   r   ©r   rk   r   r   s       r   rƒ   z%MultiParentedTree._get_parent_indicesì  sV   € ð Ÿ-™-÷
ð 
àÜ )¨&Ó 1ò
ñ ��uØ˜‰}ð �UŠOð
Øô
ð 	
ùô 
s   ‘"8c                 óR   — t        | j                  i «      j                  «       «      S )zÌ
        The set of all roots of this tree.  This set is formed by
        tracing all possible parent paths until trees with no parents
        are found.

        :type: list(MultiParentedTree)
        )r.   Ú_get_roots_helperÚvaluesrR   s    r   ÚrootszMultiParentedTree.rootsô  s#   € ô �D×*Ñ*¨2Ó.×5Ñ5Ó7Ó8Ð8r   c                 ó‚   — | j                   r$| j                   D ]  }|j                  |«       Œ |S | |t        | «      <   |S r:   )r}   rŒ   Úid)r   Úresultrk   s      r   rŒ   z#MultiParentedTree._get_roots_helperþ  sF   € Ø�=Š=ØŸ-™-ò 1�Ø×(Ñ(¨Õ0ð1ð ˆð  $ˆF”2�d“8ÑØˆr   c                 ót   — || j                   vrg S t        |«      D ��cg c]  \  }}|| u sŒ|‘Œ c}}S c c}}w )aY  
        Return a list of the indices where this tree occurs as a child
        of ``parent``.  If this child does not occur as a child of
        ``parent``, then the empty list is returned.  The following is
        always true::

          for parent_index in ptree.parent_indices(parent):
              parent[parent_index] is ptree
        r‰   rŠ   s       r   Úparent_indicesz MultiParentedTree.parent_indices  s8   € ð ˜Ÿ™Ñ&ØˆIä09¸&Ó0A×S™n˜u eÀUÈdÂ]’EÓSÐSùÓSs   Ÿ4¬4c           
      óÂ   — | |u rdgS | j                   D ����cg c]5  }|j                  |«      D ]  }t        |«      D ]  \  }}|| u r||fz   ‘Œ Œ! Œ7 c}}}}S c c}}}}w )a  
        Return a list of all tree positions that can be used to reach
        this multi-parented tree starting from ``root``.  I.e., the
        following is always true::

          for treepos in ptree.treepositions(root):
              root[treepos] is ptree
        r   )r}   Útreepositionsr   )r   rt   rk   Útreeposr   r   s         r   r•   zMultiParentedTree.treepositions  s‰   € ð �4‰<Ø�4ˆKð #Ÿm™m÷ñ àØ%×3Ñ3°DÓ9òð Ü&/°Ó&7ò	ñ #�U˜EØ˜D‘=ð	 ˜5˜(Ó"ðØ"ðØ"õð ùõ s   ™:A
c                 ó  — t        |t        «      sJ ‚| |   |u sJ ‚t        |j                  D �cg c]	  }|| u sŒ|‘Œ c}«      dk(  sJ ‚t	        | «      D ]  \  }}||u sŒ||k7  sŒ y  |j                  j                  | «       y c c}w )Nr&   )r   r{   r,   r}   r   rE   )r   r   r   Úpr   Úcs         r   r!   zMultiParentedTree._delparent-  s�   € ä˜%Ô!2Ô3Ð3Ð3Ø�E‰{˜eÑ#Ð#Ð#Ü˜uŸ~™~Ö;˜!°°d²’AÒ;Ó<ÀÒAÐAÐAô ˜d“Oò 	(‰DˆAˆqØ�EŠz˜a 5›jÙð	(ð �N‰N×!Ñ! $Õ'ùò <s
   ¯	B¹Bc                 ó¤   — t        |t        «      st        d«      ‚|s3|j                  D ]  }|| u sŒ y  |j                  j	                  | «       y y )Nz?Can not insert a non-MultiParentedTree into a MultiParentedTree)r   r{   r0   r}   r<   )r   r   r   r   rk   s        r   r   zMultiParentedTree._setparent;  sX   € ä˜%Ô!2Ô3ÜØQóð ñ
 ØŸ.™.ò ,�Ø˜T’>Ùð,ð —‘×%Ñ% dÕ+ð r   r:   rT   )r2   rV   rW   rX   r   rd   r�   r…   r‡   rƒ   rŽ   rŒ   r“   r•   r!   r   rZ   r[   s   @r   r{   r{   –  sE   ø„ ñõ".ò *ò	#ò
ò 
ò 
ò9òòTòò0(÷,r   r{   )rg   Úabcr   r   Únltk.tree.treer   Ú	nltk.utilr   r   r^   r{   Ú__all__r   r   r   ú<module>rŸ      sS   ðó ß 'å Ý "ô})˜4¨7õ })ô@~!Ð'ô ~!ôBr,Ð,ô r,ðl Øð�r   