§
    'ê[fÃ  ã                   óf   — d dl Z d dlT d dlT d dlmZmZ  G d„ de¦  «        Z G d„ de¦  «        Z	dS )é    N)Ú*)Úmap_tagÚ	str2tuplec                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚSwitchboardTurnaE  
    A specialized list object used to encode switchboard utterances.
    The elements of the list are the words in the utterance; and two
    attributes, ``speaker`` and ``id``, are provided to retrieve the
    spearker identifier and utterance id.  Note that utterance ids
    are only unique within a given discourse.
    c                 ór   — t                                | |¦  «         || _        t          |¦  «        | _        d S ©N)ÚlistÚ__init__ÚspeakerÚintÚid)ÚselfÚwordsr   r   s       úR/var/www/piapp/venv/lib/python3.11/site-packages/nltk/corpus/reader/switchboard.pyr   zSwitchboardTurn.__init__   s.   € Ý�Š�d˜EÑ"Ô"Ð"ØˆŒÝ�b‘'”'ˆŒˆˆó    c                 óú   — t          | ¦  «        dk    rd}nPt          | d         t          ¦  «        r d                     d„ | D ¦   «         ¦  «        }nd                     | ¦  «        }d| j        › d| j        › d|›d�S )	Nr   Ú Ú c              3   ó    K  — | ]	}d |z  V — Œ
dS )z%s/%sN© )Ú.0Úws     r   ú	<genexpr>z+SwitchboardTurn.__repr__.<locals>.<genexpr>    s&   è è € Ð6Ð6¨A˜G a™KÐ6Ð6Ð6Ð6Ð6Ð6r   Ú<ú.z: Ú>)ÚlenÚ
isinstanceÚtupleÚjoinr   r   )r   Útexts     r   Ú__repr__zSwitchboardTurn.__repr__   s„   € Ýˆt‰9Œ9˜Š>ˆ>ØˆDˆDÝ˜˜Qœ¥Ñ'Ô'ð 	"Ø—8’8Ð6Ð6°Ð6Ñ6Ô6Ñ6Ô6ˆDˆDà—8’8˜D‘>”>ˆDØ6�4”<Ð6Ð6 $¤'Ð6Ð6¨TÐ6Ð6Ð6Ð6r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r   r   r   r   r      s<   € € € € € ðð ðð ð ð
7ð 7ð 7ð 7ð 7r   r   c                   óœ   — e Zd ZdgZdd„Zd„ Zdd„Zd„ Zdd„Zd„ Z	dd
„Z
d„ Zdd„Zd„ Zdd„Zd„ Zdd„Z ej        d¦  «        ZdZdd„ZdS )ÚSwitchboardCorpusReaderÚtaggedNc                 óV   — t                                | || j        ¦  «         || _        d S r	   )ÚCorpusReaderr   Ú_FILESÚ_tagset)r   ÚrootÚtagsets      r   r   z SwitchboardCorpusReader.__init__+   s'   € Ý×Ò˜d D¨$¬+Ñ6Ô6Ð6ØˆŒˆˆr   c                 óR   — t          |                      d¦  «        | j        ¦  «        S ©Nr*   )ÚStreamBackedCorpusViewÚabspathÚ_words_block_reader©r   s    r   r   zSwitchboardCorpusReader.words/   ó!   € Ý% d§l¢l°8Ñ&<Ô&<¸dÔ>VÑWÔWÐWr   c                 óX   ‡ ‡— ˆ ˆfd„}t          ‰                      d¦  «        |¦  «        S )Nc                 ó0   •— ‰                      | ‰¦  «        S r	   )Ú_tagged_words_block_reader©Ústreamr   r0   s    €€r   Útagged_words_block_readerzGSwitchboardCorpusReader.tagged_words.<locals>.tagged_words_block_reader3   ó   ø€ Ø×2Ò2°6¸6ÑBÔBÐBr   r*   ©r3   r4   )r   r0   r=   s   `` r   Útagged_wordsz$SwitchboardCorpusReader.tagged_words2   óG   øø€ ð	Cð 	Cð 	Cð 	Cð 	Cð 	Cõ & d§l¢l°8Ñ&<Ô&<Ð>WÑXÔXÐXr   c                 óR   — t          |                      d¦  «        | j        ¦  «        S r2   )r3   r4   Ú_turns_block_readerr6   s    r   ÚturnszSwitchboardCorpusReader.turns8   r7   r   c                 óX   ‡ ‡— ˆ ˆfd„}t          ‰                      d¦  «        |¦  «        S )Nc                 ó0   •— ‰                      | ‰¦  «        S r	   )Ú_tagged_turns_block_readerr;   s    €€r   Útagged_turns_block_readerzGSwitchboardCorpusReader.tagged_turns.<locals>.tagged_turns_block_reader<   r>   r   r*   r?   )r   r0   rH   s   `` r   Útagged_turnsz$SwitchboardCorpusReader.tagged_turns;   rA   r   c                 óR   — t          |                      d¦  «        | j        ¦  «        S r2   )r3   r4   Ú_discourses_block_readerr6   s    r   Ú
discoursesz"SwitchboardCorpusReader.discoursesA   s(   € Ý%Ø�LŠL˜Ñ"Ô" DÔ$Añ
ô 
ð 	
r   Fc                 óX   ‡ ‡— ˆ ˆfd„}t          ‰                      d¦  «        |¦  «        S )Nc                 ó0   •— ‰                      | ‰¦  «        S r	   ©Ú_tagged_discourses_block_readerr;   s    €€r   Útagged_discourses_block_readerzQSwitchboardCorpusReader.tagged_discourses.<locals>.tagged_discourses_block_readerG   s   ø€ Ø×7Ò7¸ÀÑGÔGÐGr   r*   r?   )r   r0   rQ   s   `` r   Útagged_discoursesz)SwitchboardCorpusReader.tagged_discoursesF   sN   øø€ ð	Hð 	Hð 	Hð 	Hð 	Hð 	Hõ &Ø�LŠL˜Ñ"Ô"Ð$Bñ
ô 
ð 	
r   c                 ó<   ‡ — ˆ fd„t          |¦  «        D ¦   «         gS )Nc                 ó–   •— g | ]E}|                      d ¦  «        D ]-}|                     ¦   «         ¯‰                     |d¬¦  «        ‘Œ.ŒFS )Ú
F)Úinclude_tag©ÚsplitÚstripÚ_parse_utterance)r   ÚbÚur   s      €r   ú
<listcomp>zDSwitchboardCorpusReader._discourses_block_reader.<locals>.<listcomp>Q   sk   ø€ ð ð ð àØŸš ™œðð ð Ø—7’7‘9”9ð	Ø×%Ò% a°UÐ%Ñ;Ô;ðð ð ð r   ©Úread_blankline_block©r   r<   s   ` r   rK   z0SwitchboardCorpusReader._discourses_block_readerN   s;   ø€ ðð ð ð å-¨fÑ5Ô5ðñ ô ð
ð 	
r   c                 ó@   ‡ ‡— ˆ ˆfd„t          |¦  «        D ¦   «         gS )Nc                 ó˜   •— g | ]F}|                      d ¦  «        D ].}|                     ¦   «         ¯‰                     |d‰¬¦  «        ‘Œ/ŒGS )rU   T)rV   r0   rW   )r   r[   r\   r   r0   s      €€r   r]   zKSwitchboardCorpusReader._tagged_discourses_block_reader.<locals>.<listcomp>\   sm   ø€ ð ð ð àØŸš ™œðð ð Ø—7’7‘9”9ð	Ø×%Ò% a°TÀ&Ð%ÑIÔIðð ð ð r   r^   ©r   r<   r0   s   ` `r   rP   z7SwitchboardCorpusReader._tagged_discourses_block_readerY   sA   øø€ ðð ð ð ð å-¨fÑ5Ô5ðñ ô ð
ð 	
r   c                 ó8   — |                       |¦  «        d         S ©Nr   )rK   r`   s     r   rC   z+SwitchboardCorpusReader._turns_block_readerd   s   € Ø×,Ò,¨VÑ4Ô4°QÔ7Ð7r   c                 ó:   — |                       ||¦  «        d         S re   rO   rc   s      r   rG   z2SwitchboardCorpusReader._tagged_turns_block_readerg   s   € Ø×3Ò3°F¸FÑCÔCÀAÔFÐFr   c                 óT   — t          |                      |¦  «        d         g ¦  «        S re   )ÚsumrK   r`   s     r   r5   z+SwitchboardCorpusReader._words_block_readerj   s%   € Ý�4×0Ò0°Ñ8Ô8¸Ô;¸RÑ@Ô@Ð@r   c                 óV   — t          |                      ||¦  «        d         g ¦  «        S re   )rh   rP   rc   s      r   r:   z2SwitchboardCorpusReader._tagged_words_block_readerm   s'   € Ý�4×7Ò7¸ÀÑGÔGÈÔJÈBÑOÔOÐOr   z(\w+)\.(\d+)\:\s*(.*)ú/c                 óJ  ‡ ‡— ‰ j                              |¦  «        }|€t          d|z  ¦  «        ‚|                     ¦   «         \  }}}ˆ fd„|                     ¦   «         D ¦   «         }|sd„ |D ¦   «         }n‰r‰‰ j        k    rˆ ˆfd„|D ¦   «         }t          |||¦  «        S )NzBad utterance %rc                 ó:   •— g | ]}t          |‰j        ¦  «        ‘ŒS r   )r   Ú_SEP)r   Úsr   s     €r   r]   z<SwitchboardCorpusReader._parse_utterance.<locals>.<listcomp>x   s%   ø€ Ð?Ð?Ð?¨Q•˜1˜dœiÑ(Ô(Ð?Ð?Ð?r   c                 ó   — g | ]\  }}|‘ŒS r   r   )r   r   Úts      r   r]   z<SwitchboardCorpusReader._parse_utterance.<locals>.<listcomp>z   s   € Ð+Ð+Ð+™6˜A˜q�QÐ+Ð+Ð+r   c                 óF   •— g | ]\  }}|t          ‰j        ‰|¦  «        f‘ŒS r   )r   r.   )r   r   rp   r   r0   s      €€r   r]   z<SwitchboardCorpusReader._parse_utterance.<locals>.<listcomp>|   s0   ø€ ÐOÐOÐO¹vÀÀ1�a� ¤¨v°qÑ9Ô9Ð:ÐOÐOÐOr   )Ú_UTTERANCE_REÚmatchÚ
ValueErrorÚgroupsrX   r.   r   )	r   Ú	utterancerV   r0   Úmr   r   r"   r   s	   `  `     r   rZ   z(SwitchboardCorpusReader._parse_utterances   sÉ   øø€ ØÔ×$Ò$ YÑ/Ô/ˆØˆ9ÝÐ/°)Ñ;Ñ<Ô<Ð<ØŸHšH™JœJÑˆ��TØ?Ð?Ð?Ð?°$·*²*±,´,Ð?Ñ?Ô?ˆØð 	PØ+Ð+ UÐ+Ñ+Ô+ˆEˆEØð 	P˜ $¤,Ò.Ð.ØOÐOÐOÐOÐOÈÐOÑOÔOˆEÝ˜u g¨rÑ2Ô2Ð2r   r	   )F)r$   r%   r&   r-   r   r   r@   rD   rI   rL   rR   rK   rP   rC   rG   r5   r:   ÚreÚcompilerr   rm   rZ   r   r   r   r)   r)   &   sG  € € € € € ØˆZ€Fðð ð ð ðXð Xð XðYð Yð Yð YðXð Xð XðYð Yð Yð Yð
ð 
ð 
ð

ð 
ð 
ð 
ð	
ð 	
ð 	
ð	
ð 	
ð 	
ð 	
ð8ð 8ð 8ðGð Gð Gð GðAð Að AðPð Pð Pð Pð �B”JÐ7Ñ8Ô8€MØ€Dð
3ð 
3ð 
3ð 
3ð 
3ð 
3r   r)   )
rx   Únltk.corpus.reader.apiÚnltk.corpus.reader.utilÚnltk.tagr   r   r
   r   r,   r)   r   r   r   ú<module>r}      s¨   ðð 
€	€	€	à $Ð $Ð $Ð $Ø %Ð %Ð %Ð %Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'ð7ð 7ð 7ð 7ð 7�dñ 7ô 7ð 7ð0W3ð W3ð W3ð W3ð W3˜lñ W3ô W3ð W3ð W3ð W3r   