class_docstr: This suite was built using the checklist process with the self.editor
  suggestions. Users are encouraged to add/modify as they see fit.
  
  Note: `editor.suggest(...)` can be slow as it runs a language model.
class_docstr_tok: ["This","suite","was","built","using","the","checklist","process","with","the","self.editor","suggestions",".","Users","are","encouraged","to","add\/modify","as","they","see","fit",".","Note",":","`","editor.suggest","(","...",")","`","can","be","slow","as","it","runs","a","language","model","."]
code: def _default_vocabulary_tests(
      self, data: Optional[Iterable[str]], num_test_cases: int = 100
  ):
      positive_words = (
          self.editor.lexicons["pos_adj"]
          + self.editor.lexicons["pos_verb_present"]
          + self.editor.lexicons["pos_verb_past"]
      )
  
      test = MFT(
          positive_words,
          labels=self._positive,
          name="Single Positive Words",
          capability="Vocabulary",
          description="Correctly recognizes positive words",
      )
  
      self.add_test(test)
  
      negative_words = (
          self.editor.lexicons["neg_adj"]
          + self.editor.lexicons["neg_verb_present"]
          + self.editor.lexicons["neg_verb_past"]
      )
  
      test = MFT(
          negative_words,
          labels=self._negative,
          name="Single Negative Words",
          capability="Vocabulary",
          description="Correctly recognizes negative words",
      )
  
      self.add_test(test)
  
      template = self.editor.template(
          "{it} {noun} {be} {pos_adj}.",
          it=["The", "This", "That"],
          be=["is", "was"],
          labels=self._positive,
          save=True,
      )
      template += self.editor.template(
          "{it} {be} {a:pos_adj} {noun}.",
          it=["It", "This", "That"],
          be=["is", "was"],
          labels=self._positive,
          save=True,
      )
      template += self.editor.template(
          "{i} {pos_verb} {the} {noun}.",
          i=["I", "We"],
          the=["this", "that", "the"],
          labels=self._positive,
          save=True,
      )
      template += self.editor.template(
          "{it} {noun} {be} {neg_adj}.",
          it=["That", "This", "The"],
          be=["is", "was"],
          labels=self._negative,
          save=True,
      )
      template += self.editor.template(
          "{it} {be} {a:neg_adj} {noun}.",
          it=["It", "This", "That"],
          be=["is", "was"],
          labels=self._negative,
          save=True,
      )
      template += self.editor.template(
          "{i} {neg_verb} {the} {noun}.",
          i=["I", "We"],
          the=["this", "that", "the"],
          labels=self._negative,
          save=True,
      )
  
      test = MFT(
          **template,
          name="Sentiment-laden words in context",
          capability="Vocabulary",
          description="Use positive and negative verbs and adjectives "
          "with nouns such as product, movie, airline, etc. "
          'E.g. "This was a bad movie"',
      )
  
      self.add_test(test)
  
      template = self.editor.template(
          [
              "{it} {be} {a:pos_adj} {noun}.",
              "{it} {be} {a:intens_adj} {pos_adj} {noun}.",
          ],
          it=["It", "This", "That"],
          be=["is", "was"],
          nsamples=num_test_cases,
          save=True,
      )
      template += self.editor.template(
          [
              "{i} {pos_verb} {the} {noun}.",
              "{i} {intens_verb} {pos_verb} {the} {noun}.",
          ],
          i=["I", "We"],
          the=["this", "that", "the"],
          nsamples=num_test_cases,
          save=True,
      )
      template += self.editor.template(
          [
              "{it} {be} {a:neg_adj} {noun}.",
              "{it} {be} {a:intens_adj} {neg_adj} {noun}.",
          ],
          it=["It", "This", "That"],
          be=["is", "was"],
          nsamples=num_test_cases,
          save=True,
      )
      template += self.editor.template(
          [
              "{i} {neg_verb} {the} {noun}.",
              "{i} {intens_verb} {neg_verb} {the} {noun}.",
          ],
          i=["I", "We"],
          the=["this", "that", "the"],
          nsamples=num_test_cases,
          save=True,
      )
  
      test = DIR(
          template.data,
          self.monotonic_label,
          templates=template.templates,
          name="Intensifiers",
          capability="Vocabulary",
          description="Test is composed of pairs of sentences (x1, x2), where we add an intensifier "
          "such as 'really',or 'very' to x2 and expect the confidence to NOT go down "
          "(with tolerance=0.1). e.g.:"
          "x1 = 'That was a good movie'"
          "x2 = 'That was a very good movie'",
      )
  
      self.add_test(test)
  
      template = self.editor.template(
          [
              "{it} {noun} {be} {pos_adj}.",
              "{it} {noun} {be} {reducer_adj} {pos_adj}.",
          ],
          it=["The", "This", "That"],
          be=["is", "was"],
          nsamples=num_test_cases,
          save=True,
      )
      template += self.editor.template(
          [
              "{it} {noun} {be} {neg_adj}.",
              "{it} {noun} {be} {reducer_adj} {neg_adj}.",
          ],
          it=["The", "This", "That"],
          be=["is", "was"],
          nsamples=num_test_cases,
          save=True,
      )
      test = DIR(
          template.data,
          self.monotonic_label_down,
          templates=template.templates,
          name="Reducers",
          capability="Vocabulary",
          description="Test is composed of pairs of sentences (x1, x2), where we add a reducer "
          "such as 'somewhat', or 'kinda' to x2 and expect the confidence to NOT go up "
          " (with tolerance=0.1). e.g.:"
          "x1 = 'The staff was good.'"
          "x2 = 'The staff was somewhat good.'",
      )
  
      self.add_test(test)
  
      if data:
          positive = self.editor.template(
              "I {pos_verb_present} you."
          ).data
          positive += self.editor.template("You are {pos_adj}.").data
  
          negative = self.editor.template(
              "I {neg_verb_present} you."
          ).data
          negative += self.editor.template("You are {neg_adj}.").data
  
          template = Perturb.perturb(
              data,
              _add_phrase_function(positive),
              nsamples=num_test_cases,
          )
          test = DIR(
              template.data,
              Expect.pairwise(self._diff_up),
              name="Add positive phrases",
              capability="Vocabulary",
              description="Add very positive phrases (e.g. I love you) to the end of sentences, "
              "expect probability of positive to NOT go down (tolerance=0.1)",
          )
  
          self.add_test(test)
  
          template = Perturb.perturb(
              data,
              _add_phrase_function(negative),
              nsamples=num_test_cases,
          )
          test = DIR(
              template.data,
              Expect.pairwise(self._diff_down),
              name="Add negative phrases",
              capability="Vocabulary",
              description="Add very negative phrases (e.g. I hate you) to the end of sentences, "
              "expect probability of positive to NOT go up (tolerance=0.1)",
          )
  
          self.add_test(test)
  
imports: from typing import Optional, Iterable, List, Union, Tuple
  import numpy
  from checklist.test_suite import TestSuite
  from checklist.test_types import MFT, INV, DIR, Expect
  from checklist.perturb import Perturb
  from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
  from allennlp.confidence_checks.task_checklists import utils
  from allennlp.data.instance import Instance
  from allennlp.predictors import Predictor
label_desc: Use image node_id 6 for calling the SentimentAnalysisSuite obj's underlying member method code with example usage: obj._default_vocabulary_tests(data, num_test_cases) without return types