<commit_before>#ifndef SRC_LABELLING_LABELS_CONTAINER_H_

#define SRC_LABELLING_LABELS_CONTAINER_H_

#include <vector>
#include <map>
#include "./label.h"

/**
 * \brief
 *
 *
 */
class LabelsContainer
{
 public:
  LabelsContainer() = default;

  virtual void add(Label label);

  Label getById(int id);

  int count();

  void clear();

  std::vector<Label> getLabels();

 protected:
  std::map<int, Label> labels;
};

#endif  // SRC_LABELLING_LABELS_CONTAINER_H_<commit_msg>Add docu for LabelsContainer.<commit_after>#ifndef SRC_LABELLING_LABELS_CONTAINER_H_

#define SRC_LABELLING_LABELS_CONTAINER_H_

#include <vector>
#include <map>
#include "./label.h"

/**
 * \brief Collection of lables with lookup by id
 *
 * This is used by Labels and also to work on a subset of all labels,
 * e.g. labels of a layer or in cluster.
 */
class LabelsContainer
{
 public:
  LabelsContainer() = default;

  virtual void add(Label label);

  Label getById(int id);

  int count();

  void clear();

  std::vector<Label> getLabels();

 protected:
  std::map<int, Label> labels;
};

#endif  // SRC_LABELLING_LABELS_CONTAINER_H_
{'fraction_non_alphanumeric': 0.11838565022421525, 'fraction_numerical': 0.0, 'mean_word_length': 4.470588235294118, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7536038', 'n_tokens_mistral': 418, 'n_tokens_neox': 409, 'n_words': 102}