class_docstr: Reader for the Comparative Sentence Dataset by Jindal and Liu (2006).
  
      >>> from nltk.corpus import comparative_sentences
      >>> comparison = comparative_sentences.comparisons()[0]
      >>> comparison.text # doctest: +NORMALIZE_WHITESPACE
      ['its', 'fast-forward', 'and', 'rewind', 'work', 'much', 'more', 'smoothly',
      'and', 'consistently', 'than', 'those', 'of', 'other', 'models', 'i', "'ve",
      'had', '.']
      >>> comparison.entity_2
      'models'
      >>> (comparison.feature, comparison.keyword)
      ('rewind', 'more')
      >>> len(comparative_sentences.comparisons())
      853
class_docstr_tok: ["Reader","for","the","Comparative","Sentence","Dataset","by","Jindal","and","Liu","(","2006",")",".",">",">",">","from","nltk.corpus","import","comparative_sentences",">",">",">","comparison","=","comparative_sentences.comparisons","(",")","[","0","]",">",">",">","comparison.text","#","doctest",":","+NORMALIZE_WHITESPACE","[","'its","'",",","'fast-forward","'",",","'and","'",",","'rewind","'",",","'work","'",",","'much","'",",","'more","'",",","'smoothly","'",",","'and","'",",","'consistently","'",",","'than","'",",","'those","'",",","'of","'",",","'other","'",",","'models","'",",","'","i","'",",","``","'ve","''",",","'had","'",",","'",".","'","]",">",">",">","comparison.entity_2","'models'",">",">",">","(","comparison.feature",",","comparison.keyword",")","(","'rewind","'",",","'more","'",")",">",">",">","len","(","comparative_sentences.comparisons","(",")",")","853"]
docstr: :param root: The root directory for this corpus.
  :param fileids: a list or regexp specifying the fileids in this corpus.
  :param word_tokenizer: tokenizer for breaking sentences or paragraphs
      into words. Default: `WhitespaceTokenizer`
  :param sent_tokenizer: tokenizer for breaking paragraphs into sentences.
  :param encoding: the encoding that should be used to read the corpus.
docstr_tok: [":","param","root",":","The","root","directory","for","this","corpus",".",":","param","fileids",":","a","list","or","regexp","specifying","the","fileids","in","this","corpus",".",":","param","word_tokenizer",":","tokenizer","for","breaking","sentences","or","paragraphs","into","words",".","Default",":","`","WhitespaceTokenizer","`",":","param","sent_tokenizer",":","tokenizer","for","breaking","paragraphs","into","sentences",".",":","param","encoding",":","the","encoding","that","should","be","used","to","read","the","corpus","."]
code: def __init__(
      self,
      root,
      fileids,
      word_tokenizer=WhitespaceTokenizer(),
      sent_tokenizer=None,
      encoding="utf8",
  ):
      """
      :param root: The root directory for this corpus.
      :param fileids: a list or regexp specifying the fileids in this corpus.
      :param word_tokenizer: tokenizer for breaking sentences or paragraphs
          into words. Default: `WhitespaceTokenizer`
      :param sent_tokenizer: tokenizer for breaking paragraphs into sentences.
      :param encoding: the encoding that should be used to read the corpus.
      """
  
      CorpusReader.__init__(self, root, fileids, encoding)
      self._word_tokenizer = word_tokenizer
      self._sent_tokenizer = sent_tokenizer
      self._readme = "README.txt"
  
file_path: nltk/nltk/corpus/reader/comparative_sents.py
imports: import re
  from nltk.corpus.reader.api import *
  from nltk.tokenize import *
label_desc: Use image node_id 1 to create a new ComparativeSentencesCorpusReader object from inherited base classes: CorpusReader with example: obj = ComparativeSentencesCorpusReader(root, fileids, word_tokenizer, sent_tokenizer, encoding)