class_docstr: An example for training/inference.
class_docstr_tok: ["An","example","for","training\/inference","."]
docstr: Add features for non-categorical slots.
  Args:
      state_update: slot value pairs of state update
      system_span_boundaries: span boundaries of schema description
      user_span_boundaries: span boundaries of utterance 
docstr_tok: ["Add","features","for","non-categorical","slots",".","Args",":","state_update",":","slot","value","pairs","of","state","update","system_span_boundaries",":","span","boundaries","of","schema","description","user_span_boundaries",":","span","boundaries","of","utterance"]
code: def add_noncategorical_slots(
      self,
      state_update: dict,
      system_span_boundaries: dict,
      user_span_boundaries: dict,
  ):
      """Add features for non-categorical slots.
      Args:
          state_update: slot value pairs of state update
          system_span_boundaries: span boundaries of schema description
          user_span_boundaries: span boundaries of utterance
      """
  
      noncategorical_slots = self.service_schema.non_categorical_slots
      slot = noncategorical_slots[self.noncategorical_slot_id]
  
      values = state_update.get(slot, [])
      if not values:
          self.noncategorical_slot_status = STATUS_OFF
      elif values[0] == STR_DONTCARE:
          self.noncategorical_slot_status = STATUS_DONTCARE
      else:
          self.noncategorical_slot_status = STATUS_ACTIVE
          # Add indices of the start and end tokens for the first encountered
          # value. Spans in user utterance are prioritized over the system
          # utterance. If a span is not found, the slot value is ignored.
          if slot in user_span_boundaries:
              start, end = user_span_boundaries[slot]
          elif slot in system_span_boundaries:
              start, end = system_span_boundaries[slot]
          else:
              # A span may not be found because the value was cropped out or because
              # the value was mentioned earlier in the dialogue. Since this model
              # only makes use of the last two utterances to predict state updates,
              # it will fail in such cases.
              logging.debug(
                  f'"Slot values {str(values)} not found in user or system utterance in example with id - {self.example_id}.'
              )
              start = 0
              end = 0
          self.noncategorical_slot_value_start = start
          self.noncategorical_slot_value_end = end
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/input_example/sgd_input_example.py
imports: from typing import List
  from nemo.collections.nlp.data.dialogue.input_example.input_example import DialogueInputExample
  from nemo.utils import logging
label_desc: Use image node_id 8 for calling the SGDInputExample obj's underlying member method code with example usage: obj.add_noncategorical_slots(state_update, system_span_boundaries, user_span_boundaries) without return types