3
d                 @   s   d Z ddlZddlmZ ddlmZ dddZdddZdd	d
Zdd Z	dddZ
edkr|ed ed ed ed dS )z-
Provide structured access to documentation.
    N)wrap)loadc             C   s   t d|  d S )Nbrown_tagset)_format_tagset)
tagpattern r   )/tmp/pip-build-v9q4h5k9/nltk/nltk/help.pyr      s    r   c             C   s   t d|  d S )Nclaws5_tagset)r   )r   r   r   r   r	      s    r	   c             C   s   t d|  d S )Nupenn_tagset)r   )r   r   r   r   r
      s    r
   c             C   sR   xL| D ]D}|| }|d |d  g}t |d dddd}tdj||  qW d S )Nz: r      K   z    )widthinitial_indentsubsequent_indent
)r   printjoin)tagstagdicttagentryZdefnZexamplesr   r   r   _print_entries#   s    
r   c                sv   t d|  d } s$tt|| nN |kr:t g| n8tj   fddt|D }|rjt|| ntd d S )Nzhelp/tagsets/z.picklec                s   g | ]} j |r|qS r   )match).0r   )r   r   r   
<listcomp>5   s    z"_format_tagset.<locals>.<listcomp>zNo matching tags found.)r   r   sortedrecompiler   )Ztagsetr   r   r   r   )r   r   r   -   s    
r   __main__zNN.*z.*\$	UNDEFINEDZNN)N)N)N)N)__doc__r   textwrapr   Z	nltk.datar   r   r	   r
   r   r   __name__r   r   r   r   <module>
   s   


	

