class_docstr: Ranking task on multiple sentences.
  
  Args:
      dictionary (Dictionary): the dictionary for the input of the task
class_docstr_tok: ["Ranking","task","on","multiple","sentences",".","Args",":","dictionary","(","Dictionary",")",":","the","dictionary","for","the","input","of","the","task"]
docstr: Add task-specific arguments to the parser.
docstr_tok: ["Add","task-specific","arguments","to","the","parser","."]
code: def add_args(parser):
      """Add task-specific arguments to the parser."""
      parser.add_argument(
          "data", metavar="FILE", help="file prefix for data"
      )
      parser.add_argument(
          "--num-classes",
          type=int,
          help="number of sentences to be ranked",
      )
      parser.add_argument(
          "--init-token",
          type=int,
          help="add token at the beginning of each batch item",
      )
      parser.add_argument(
          "--separator-token",
          type=int,
          help="add separator token between inputs",
      )
      parser.add_argument("--no-shuffle", action="store_true")
      parser.add_argument(
          "--shorten-method",
          default="none",
          choices=["none", "truncate", "random_crop"],
          help="if not none, shorten sequences that exceed --tokens-per-sample",
      )
      parser.add_argument(
          "--shorten-data-split-list",
          default="",
          help="comma-separated list of dataset splits to apply shortening to, "
          'e.g., "train,valid" (default: all dataset splits)',
      )
      parser.add_argument(
          "--max-option-length",
          type=int,
          help="max length for each option",
      )
  
file_path: fairseq/fairseq/tasks/sentence_ranking.py
imports: import logging
  import os
  import numpy
  from fairseq import utils
  from fairseq.data import ConcatSentencesDataset, Dictionary, IdDataset, NestedDictionaryDataset, NumelDataset, NumSamplesDataset, PrependTokenDataset, RawLabelDataset, RightPadDataset, SortDataset, TruncateDataset, data_utils
  from fairseq.data.shorten_dataset import maybe_shorten_dataset
  from fairseq.tasks import LegacyFairseqTask, register_task
label_desc: Use image node_id 1 for calling the SentenceRankingTask obj's underlying member method code with example usage: obj.add_args(parser) without return types