class_docstr: PyTorch dataset class for storing tokenized sentences and other properties used for BERT score calculation.
class_docstr_tok: ["PyTorch","dataset","class","for","storing","tokenized","sentences","and","other","properties","used","for","BERT","score","calculation","."]
docstr: Return the number of sentences in the dataset.
docstr_tok: ["Return","the","number","of","sentences","in","the","dataset","."]
code: def __len__(self) -> int:
      """Return the number of sentences in the dataset."""
      return self.num_sentences
  
imports: import math
  import os
  from collections import Counter, defaultdict
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Union
  import torch
  from torch import Tensor
  from torch.utils.data import DataLoader, Dataset
  from torchmetrics.utilities.data import _cumsum
  from torchmetrics.utilities.imports import _TQDM_AVAILABLE, _TRANSFORMERS_GREATER_EQUAL_4_4
label_desc: Use image node_id 3 for calling the TextDataset obj's underlying member method code with example usage: obj.__len__() and returns: self