class_docstr: Main class for sentiment inference execution.
  
  Attributes:
      opinion_lex: Opinion lexicon as outputted by TrainSentiment module.
      aspect_lex: Aspect lexicon as outputted by TrainSentiment module.
      intensifier_lex (dict): Pre-defined intensifier lexicon.
      negation_lex (dict): Pre-defined negation lexicon.
class_docstr_tok: ["Main","class","for","sentiment","inference","execution",".","Attributes",":","opinion_lex",":","Opinion","lexicon","as","outputted","by","TrainSentiment","module",".","aspect_lex",":","Aspect","lexicon","as","outputted","by","TrainSentiment","module",".","intensifier_lex","(","dict",")",":","Pre-defined","intensifier","lexicon",".","negation_lex","(","dict",")",":","Pre-defined","negation","lexicon","."]
docstr: Extract opinion and aspect terms from sentence.
docstr_tok: ["Extract","opinion","and","aspect","terms","from","sentence","."]
code: def _extract_event(
      self, aspect_row: LexiconElement, parsed_sentence: list
  ) -> tuple:
      """Extract opinion and aspect terms from sentence."""
      event = []
      sent_aspect_pair = None
      real_aspect_indices = _consolidate_aspects(
          aspect_row.term, parsed_sentence
      )
      aspect_key = aspect_row.term[0]
      for aspect_index_range in real_aspect_indices:
          for word_index in aspect_index_range:
              (
                  sent_aspect_pair,
                  event,
              ) = self._detect_opinion_aspect_events(
                  word_index,
                  parsed_sentence,
                  aspect_key,
                  aspect_index_range,
              )
              if sent_aspect_pair:
                  break
      return sent_aspect_pair, event
  
imports: import math
  from os import PathLike
  from pathlib import Path, PosixPath
  from typing import Union
  from nlp_architect.common.core_nlp_doc import CoreNLPDoc
  from nlp_architect.models.absa import INFERENCE_OUT
  from nlp_architect.models.absa.inference.data_types import Term, TermType, Polarity, SentimentDoc, SentimentSentence, LexiconElement
  from nlp_architect.models.absa.utils import _read_lexicon_from_csv, load_opinion_lex, _load_aspect_lexicon, parse_docs, parse_docs_bist, _load_parsed_docs_from_dir
  from tqdm import tqdm
label_desc: Use image node_id 7 for calling the SentimentInference obj's underlying member method code with example usage: obj._extract_event(aspect_row, parsed_sentence) and returns: sent_aspect_pair,  event