• Description:

The Text REtrieval Conference (TREC) Question Classification dataset contains 5500 labeled questions in training set and another 500 for test set. The dataset has 6 labels, 47 level-2 labels. Average length of each sentence is 10, vocabulary size of 8700. Data are collected from four sources: 4,500 English questions published by USC (Hovy et al., 2001), about 500 manually constructed questions for a few rare classes, 894 TREC 8 and TREC 9 questions, and also 500 questions from TREC 10 which serves as the test set.

Split Examples
'test' 500
'train' 5,452
  • Feature structure:
    'label-coarse': ClassLabel(shape=(), dtype=int64, num_classes=6),
    'label-fine': ClassLabel(shape=(), dtype=int64, num_classes=47),
    'text': Text(shape=(), dtype=string),
  • Feature documentation:
Feature Class Shape Dtype Description
label-coarse ClassLabel int64
label-fine ClassLabel int64
text Text string
  • Citation:
    title = "Learning Question Classifiers",
    author = "Li, Xin  and
      Roth, Dan",
    booktitle = "{COLING} 2002: The 19th International Conference on Computational Linguistics",
    year = "2002",
    url = "",
    title = "Toward Semantics-Based Answer Pinpointing",
    author = "Hovy, Eduard  and
      Gerber, Laurie  and
      Hermjakob, Ulf  and
      Lin, Chin-Yew  and
      Ravichandran, Deepak",
    booktitle = "Proceedings of the First International Conference on Human Language Technology Research",
    year = "2001",
    url = "",