class_docstr: World representation for the WikitableQuestions domain.
  
  Parameters
  ----------
  table_graph : ``TableQuestionKnowledgeGraph``
      Context associated with this world.
class_docstr_tok: ["World","representation","for","the","WikitableQuestions","domain",".","Parameters","--","--","--","--","--","table_graph",":","``","TableQuestionKnowledgeGraph","``","Context","associated","with","this","world","."]
code: def get_agenda(self):
      agenda_items = self.table_graph.get_linked_agenda_items()
      # Global rules
      question_tokens = [
          token.text for token in self.table_graph.question_tokens
      ]
      question = " ".join(question_tokens)
      for token in question_tokens:
          if token in [
              "next",
              "previous",
              "before",
              "after",
              "above",
              "below",
          ]:
              agenda_items.append("fb:row.row.next")
          if token == "total":
              agenda_items.append("sum")
          if token == "difference":
              agenda_items.append("-")
          if token == "average":
              agenda_items.append("avg")
          if token in [
              "least",
              "top",
              "first",
              "smallest",
              "shortest",
              "lowest",
          ]:
              # This condition is too brittle. But for most logical forms with "min", there are
              # semantically equivalent ones with "argmin". The exceptions are rare.
              if "what is the least" in question:
                  agenda_items.append("min")
              else:
                  agenda_items.append("argmin")
          if token in [
              "last",
              "most",
              "largest",
              "highest",
              "longest",
              "greatest",
          ]:
              # This condition is too brittle. But for most logical forms with "max", there are
              # semantically equivalent ones with "argmax". The exceptions are rare.
              if "what is the most" in question:
                  agenda_items.append("max")
              else:
                  agenda_items.append("argmax")
  
      if "how many" in question or "number" in question:
          if "sum" not in agenda_items and "avg" not in agenda_items:
              # The question probably just requires counting the rows. But this is not very
              # accurate. The question could also be asking for a value that is in the table.
              agenda_items.append("count")
      agenda = []
      for agenda_item in set(agenda_items):
          agenda.append(self.terminal_productions[agenda_item])
      return agenda
  
file_path: magnitude/pymagnitude/third_party/allennlp/semparse/worlds/wikitables_world.py
imports: from __future__ import absolute_import
  import re
  from nltk.sem.logic import Type
  from allennlp.semparse.worlds.world import ParsingError, World
  from allennlp.semparse.type_declarations import wikitables_type_declaration
  from allennlp.semparse.contexts import TableQuestionKnowledgeGraph
label_desc: Use image node_id 9 for calling the WikiTablesWorld obj's underlying member method code with example usage: obj.get_agenda() and returns: agenda