class_docstr: Main class for executing Sentiment Solution pipeline.
  
  Args:
      anonymiser (Anonymiser, optional): Method to anonymise events' text.
      max_events (int, optional): Maximum number of events to show for each aspect-polarity pair.
class_docstr_tok: ["Main","class","for","executing","Sentiment","Solution","pipeline",".","Args",":","anonymiser","(","Anonymiser",",","optional",")",":","Method","to","anonymise","events","'","text",".","max_events","(","int",",","optional",")",":","Maximum","number","of","events","to","show","for","each","aspect-polarity","pair","."]
docstr: Utility function for incrementing event counts.
docstr_tok: ["Utility","function","for","incrementing","event","counts","."]
code: def _add_event(
      df: pd.DataFrame, key: tuple, in_domain: bool, score: int
  ) -> int:
      """Utility function for incrementing event counts."""
      key = key + (in_domain,)
      count = int(df.loc[key, "Quantity"]) + 1
      df.loc[key, "Quantity"] = count
      df.loc[key, "Score"] += score
      return count
  
imports: import argparse
  import json
  from os import PathLike
  from os.path import isdir
  from typing import Optional
  import csv
  import re
  from abc import abstractmethod
  import numpy
  import pandas
  from tqdm import tqdm
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.common.core_nlp_doc import CoreNLPDoc
  from nlp_architect.models.absa.inference.data_types import TermType, SentimentDocEncoder, SentimentDoc, SentimentSentence
  from nlp_architect.models.absa.inference.inference import SentimentInference
  from nlp_architect.models.absa.utils import load_opinion_lex
  from nlp_architect.utils.io import walk_directory, validate_existing_filepath, validate_existing_directory, validate_existing_path, line_count
label_desc: Use image node_id 6 for calling the SentimentSolution obj's underlying member method code with example usage: obj._add_event(df, key, in_domain, score) and returns: count