class_docstr: `Dbpedia <https://aclanthology.org/L16-1532.pdf>`_ is a Wikipedia Topic Classification dataset.
  
  we use dataset provided by `LOTClass <https://github.com/yumeng5/LOTClass>`_
  
  Examples:
  
  ..  code-block:: python
  
      from openprompt.data_utils.text_classification_dataset import PROCESSORS
  
      base_path = "datasets/TextClassification"
  
      dataset_name = "dbpedia"
      dataset_path = os.path.join(base_path, dataset_name)
      processor = PROCESSORS[dataset_name.lower()]()
      trainvalid_dataset = processor.get_train_examples(dataset_path)
      test_dataset = processor.get_test_examples(dataset_path)
  
      assert processor.get_num_labels() == 14
      assert len(trainvalid_dataset) == 560000
      assert len(test_dataset) == 70000
code: def get_examples(self, data_dir, split):
      examples = []
      label_file = open(
          os.path.join(data_dir, "{}_labels.txt".format(split)), "r"
      )
      labels = [int(x.strip()) for x in label_file.readlines()]
      with open(
          os.path.join(data_dir, "{}.txt".format(split)), "r"
      ) as fin:
          for idx, line in enumerate(fin):
              splited = line.strip().split(". ")
              text_a, text_b = splited[0], splited[1:]
              text_a = text_a + "."
              text_b = ". ".join(text_b)
              example = InputExample(
                  guid=str(idx),
                  text_a=text_a,
                  text_b=text_b,
                  label=int(labels[idx]),
              )
              examples.append(example)
      return examples
  
imports: import os
  import json, csv
  from abc import ABC, abstractmethod
  from collections import defaultdict, Counter
  from typing import List, Dict, Callable
  from openprompt.utils.logging import logger
  from openprompt.data_utils.utils import InputExample
  from openprompt.data_utils.data_processor import DataProcessor
label_desc: Use image node_id 2 for calling the DBpediaProcessor obj's underlying member method code with example usage: obj.get_examples(data_dir, split) and returns: examples