Text model

expert.core.congruence.text_emotions.text_analysis.get_text_fragments(words_path: str | PathLike, stamps: Dict, key: str, duration: int = 10) List[source]

Getting text fragments for selected expert from transcription with ‘duration’ time window.

Parameters
  • words_path (str) – (str | PathLike): Path to JSON file with text transcription.

  • stamps (dict) – Dictionary with diarization information.

  • duration – Length of intervals for extracting features. Defaults to 10.

  • key (str) – Expert selected by user.

expert.core.congruence.text_emotions.text_analysis.get_text_emotions(words_path: str, stamps: str, key: str, device: torch.device | None = None, duration: int = 10) List[source]

Classification of expert emotions in text.

Parameters
  • words_path (str) – Path to JSON file with text transcription.

  • stamps (str) – Dictionary with diarization information.

  • device (torch.device | None, optional) – Device type on local machine (GPU recommended). Defaults to None.

  • duration – Length of intervals for extracting features. Defaults to 10.

  • key (str) – Expert selected by user.