+
    ÖÇÜh›  ã                   ó>   € R t ^ RIt^ RI5 ^ RI5  ! R R]]4      tR# )aˆ  
CorpusReader for the Pros and Cons dataset.

- Pros and Cons dataset information -

Contact: Bing Liu, liub@cs.uic.edu
        https://www.cs.uic.edu/~liub

Distributed with permission.

Related papers:

- Murthy Ganapathibhotla and Bing Liu. "Mining Opinions in Comparative Sentences".
    Proceedings of the 22nd International Conference on Computational Linguistics
    (Coling-2008), Manchester, 18-22 August, 2008.

- Bing Liu, Minqing Hu and Junsheng Cheng. "Opinion Observer: Analyzing and Comparing
    Opinions on the Web". Proceedings of the 14th international World Wide Web
    conference (WWW-2005), May 10-14, 2005, in Chiba, Japan.
N)Ú*c                   ó`   a € ] tR t^"t o Rt]t]! 4       R3R ltR
R lt	R
R lt
R tR tR	tV tR# )ÚProsConsCorpusReadera®  
Reader for the Pros and Cons sentence dataset.

    >>> from nltk.corpus import pros_cons
    >>> pros_cons.sents(categories='Cons') # doctest: +NORMALIZE_WHITESPACE
    [['East', 'batteries', '!', 'On', '-', 'off', 'switch', 'too', 'easy',
    'to', 'maneuver', '.'], ['Eats', '...', 'no', ',', 'GULPS', 'batteries'],
    ...]
    >>> pros_cons.words('IntegratedPros.txt')
    ['Easy', 'to', 'use', ',', 'economical', '!', ...]
Úutf8c                óh   € \         P                  WW$4       \        P                  W4       W0n        R# )a}  
:param root: The root directory for the corpus.
:param fileids: a list or regexp specifying the fileids in the corpus.
:param word_tokenizer: a tokenizer for breaking sentences or paragraphs
    into words. Default: `WhitespaceTokenizer`
:param encoding: the encoding that should be used to read the corpus.
:param kwargs: additional parameters passed to CategorizedCorpusReader.
N)ÚCorpusReaderÚ__init__ÚCategorizedCorpusReaderÚ_word_tokenizer)ÚselfÚrootÚfileidsÚword_tokenizerÚencodingÚkwargss   &&&&&,Ú>/usr/lib/python3/dist-packages/nltk/corpus/reader/pros_cons.pyr   ÚProsConsCorpusReader.__init__1   s(   € ô" 	×Ñ˜d¨'Ô<Ü×(Ñ(¨Ô6Ø-Öó    Nc                ó"  € V P                  W4      pVf   V P                  pM\        V\        4      '       d   V.p\	        V P                  VRR4       UUUu. uF#  w  r4pV P                  W0P                  VR7      NK%  	  uppp4      # u upppi )a   
Return all sentences in the corpus or in the specified files/categories.

:param fileids: a list or regexp specifying the ids of the files whose
    sentences have to be returned.
:param categories: a list specifying the categories whose sentences
    have to be returned.
:return: the given file(s) as a list of sentences. Each sentence is
    tokenized using the specified word_tokenizer.
:rtype: list(list(str))
T©r   )Ú_resolveÚ_fileidsÚ
isinstanceÚstrÚconcatÚabspathsÚ
CorpusViewÚ_read_sent_block©r   r   Ú
categoriesÚpathÚencÚfileids   &&&   r   ÚsentsÚProsConsCorpusReader.sentsF   óˆ   € ð —-‘- Ó4ˆØŠ?Ø—m‘m‰GÜ˜¤×%Ò%Ø�iˆGÜð ,0¯=©=¸À$ÈÔ+Mõá+MÑ'�T ð —‘ ×&;Ñ&;Àc�ÖJÙ+Móó
ð 	
ùôó   Á)B
c                ó"  € V P                  W4      pVf   V P                  pM\        V\        4      '       d   V.p\	        V P                  VRR4       UUUu. uF#  w  r4pV P                  W0P                  VR7      NK%  	  uppp4      # u upppi )aw  
Return all words and punctuation symbols in the corpus or in the specified
files/categories.

:param fileids: a list or regexp specifying the ids of the files whose
    words have to be returned.
:param categories: a list specifying the categories whose words have
    to be returned.
:return: the given file(s) as a list of words and punctuation symbols.
:rtype: list(str)
Tr   )r   r   r   r   r   r   r   Ú_read_word_blockr   s   &&&   r   ÚwordsÚProsConsCorpusReader.words^   r%   r&   c                ó2  € . p\        ^4       F…  pVP                  4       pV'       g   K  \        P                  ! RV4      pV'       g   K>  VP	                  V P
                  P                  VP                  ^4      P                  4       4      4       K‡  	  V# )é   z+^(?!\n)\s*<(Pros|Cons)>(.*)</(?:Pros|Cons)>)	ÚrangeÚreadlineÚreÚmatchÚappendr
   ÚtokenizeÚgroupÚstrip)r   Ústreamr#   ÚiÚlineÚsents   &&    r   r   Ú%ProsConsCorpusReader._read_sent_blockv   sr   € ØˆÜ�r–ˆAØ—?‘?Ó$ˆDßÙÜ—8’8ÐJÈDÓQˆDß‰tØ—‘˜T×1Ñ1×:Ñ:¸4¿:¹:Àa»=×;NÑ;NÓ;PÓQÖRñ ð ˆr   c                ó\   € . pV P                  V4       F  pVP                  V4       K  	  V# )N)r   Úextend)r   r5   r)   r8   s   &&  r   r(   Ú%ProsConsCorpusReader._read_word_block�   s-   € ØˆØ×)Ñ)¨&Ö1ˆDØ�L‰L˜Öñ 2àˆr   )r
   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚStreamBackedCorpusViewr   ÚWordPunctTokenizerr   r#   r)   r   r(   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   "   s:   ø‡ € ñ
ð (€Jñ *Ó+Øô.ô*
ô0
ò0	÷ð r   r   )rA   r/   Únltk.corpus.reader.apiÚnltk.tokenizer	   r   r   © r   r   Ú<module>rJ      s&   ðñó( 
ä $Ü ôcÐ2°Lö cr   