
    Ofi                     X    S r SSK7  SSK7  SSKJrJr   " S S\5      r " S S\5      r	g)	z
Indian Language POS-Tagged Corpus
Collected by A Kumaran, Microsoft Research, India
Distributed with permission

Contents:
  - Bangla: IIT Kharagpur
  - Hindi: Microsoft Research India
  - Marathi: IIT Bombay
  - Telugu: IIIT Hyderabad
    )*)map_tag	str2tuplec                   @    \ rS rSrSrS	S jrS
S jrS	S jrS
S jrSr	g)IndianCorpusReader   z8
List of words, one per line.  Blank lines are ignored.
Nc                     [        U R                  US5       VVs/ s H  u  p#[        X#SS5      PM     snn5      $ s  snnf NTFconcatabspathsIndianCorpusViewselffileidsfileidencs       ;/usr/lib/python3/dist-packages/nltk/corpus/reader/indian.pywordsIndianCorpusReader.words   sG     &*]]7D%A%AMV !eU;%A
 	
   <
c                    ^ ^ T(       a  TT R                   :w  a  U U4S jnOS n[        T R                  US5       VVs/ s H  u  pE[        XESSU5      PM     snn5      $ s  snnf )Nc                 2   > [        TR                  TU 5      $ Nr   _tagsettr   tagsets    r   <lambda>1IndianCorpusReader.tagged_words.<locals>.<lambda>)       WT\\61-M    TFr   r   r   r   r   r   r   tag_mapping_functionr   r   s   ` `   r   tagged_wordsIndianCorpusReader.tagged_words'   se    f,#M #'  &*]]7D%A%AMV !dE;OP%A
 	
   A 
c                     [        U R                  US5       VVs/ s H  u  p#[        X#SS5      PM     snn5      $ s  snnf r
   r   r   s       r   sentsIndianCorpusReader.sents3   sG     &*]]7D%A%AMV !eT:%A
 	
r   c                    ^ ^ T(       a  TT R                   :w  a  U U4S jnOS n[        T R                  US5       VVs/ s H  u  pE[        XESSU5      PM     snn5      $ s  snnf )Nc                 2   > [        TR                  TU 5      $ r   r   r   s    r   r    1IndianCorpusReader.tagged_sents.<locals>.<lambda>=   r"   r#   Tr$   r%   s   ` `   r   tagged_sentsIndianCorpusReader.tagged_sents;   se    f,#M #'  &*]]7D%A%AMV !dD:NO%A
 	
r)    r   )NN)
__name__
__module____qualname____firstlineno____doc__r   r'   r+   r0   __static_attributes__r2   r#   r   r   r      s    





r#   r   c                   &    \ rS rSr SS jrS rSrg)r   H   Nc                 P    X0l         X@l        XPl        [        R	                  XUS9  g )N)encoding)_tagged_group_by_sent_tag_mapping_functionStreamBackedCorpusView__init__)r   corpus_filer<   taggedgroup_by_sentr&   s         r   rA   IndianCorpusView.__init__I   s(     +%9"''H'Mr#   c                    UR                  5       nUR                  S5      (       a  / $ UR                  5        Vs/ s H  n[        USS9PM     nnU R                  (       a&  U VVs/ s H  u  pVXPR	                  U5      4PM     nnnU R
                  (       d  U VVs/ s H  u  pVUPM	     nnnU R                  (       a  U/$ U$ s  snf s  snnf s  snnf )N<_)sep)readline
startswithsplitr   r?   r=   r>   )r   streamlinewordsentwr   s          r   
read_blockIndianCorpusView.read_blockQ   s     ??3I59ZZ\B\T	$C(\B%%EIJT6AQ22156TDJ||$()D&1ADD)6MK CJ)s   C'C
C)r>   r?   r=   r   )r3   r4   r5   r6   rA   rR   r8   r2   r#   r   r   r   H   s    QUNr#   r   N)
r7   nltk.corpus.reader.apinltk.corpus.reader.utilnltk.tagr   r   CorpusReaderr   r@   r   r2   r#   r   <module>rX      s/   
 % % '+
 +
\- r#   