def get_active_intent_accuracy(frame_ref, frame_hyp):
  """Get active intent accuracy of a frame.

  Args:
    frame_ref: single semantic frame from reference (ground truth) file.
    frame_hyp: single semantic frame from hypothesis (prediction) file.

  Returns:
    1.0 if the intent prediction is correct, otherwise 0.0.
  """
  return float(frame_ref["state"]["active_intent"] == frame_hyp["state"]
               ["active_intent"])