class_docstr: Check properties of an ongoing discourse.
class_docstr_tok: ["Check","properties","of","an","ongoing","discourse","."]
docstr: Add a sentence to the current discourse.
  
  Updates ``self._input`` and ``self._sentences``.
  :param sentence: An input sentence
  :type sentence: str
  :param informchk: if ``True``, check that the result of adding the sentence is thread-informative. Updates ``self._readings``.
  :param consistchk: if ``True``, check that the result of adding the sentence is thread-consistent. Updates ``self._readings``.
code: def add_sentence(self, sentence, informchk=False, consistchk=False):
      """
      Add a sentence to the current discourse.
  
      Updates ``self._input`` and ``self._sentences``.
      :param sentence: An input sentence
      :type sentence: str
      :param informchk: if ``True``, check that the result of adding the sentence is thread-informative. Updates ``self._readings``.
      :param consistchk: if ``True``, check that the result of adding the sentence is thread-consistent. Updates ``self._readings``.
  
      """
      # check whether the new sentence is informative (i.e. not entailed by the previous discourse)
      if informchk:
          self.readings(verbose=False)
          for tid in sorted(self._threads):
              assumptions = [
                  reading for (rid, reading) in self.expand_threads(tid)
              ]
              assumptions += self._background
              for sent_reading in self._get_readings(sentence):
                  tp = Prover9Command(
                      goal=sent_reading, assumptions=assumptions
                  )
                  if tp.prove():
                      print(
                          "Sentence '%s' under reading '%s':"
                          % (sentence, str(sent_reading))
                      )
                      print(
                          "Not informative relative to thread '%s'"
                          % tid
                      )
  
      self._input.append(sentence)
      self._sentences = {
          "s%s" % i: sent for i, sent in enumerate(self._input)
      }
      # check whether adding the new sentence to the discourse preserves consistency (i.e. a model can be found for the combined set of
      # of assumptions
      if consistchk:
          self.readings(verbose=False)
          self.models(show=False)
  
imports: import os
  from abc import ABCMeta, abstractmethod
  from functools import reduce
  from operator import add, and_
  from nltk.data import show_cfg
  from nltk.inference.mace import MaceCommand
  from nltk.inference.prover9 import Prover9Command
  from nltk.parse import load_parser
  from nltk.parse.malt import MaltParser
  from nltk.sem.drt import AnaphoraResolutionException, resolve_anaphora
  from nltk.sem.glue import DrtGlue
  from nltk.sem.logic import Expression
  from nltk.tag import RegexpTagger
label_desc: Use image node_id 3 for calling the DiscourseTester obj's underlying member method code with example usage: obj.add_sentence(sentence, informchk, consistchk) without return types