in src/dfcx_scrapi/builders/intents.py [0:0]
def _show_training_phrases(self, repeat_count: int = None) -> str:
"""String representation for the training phrases of proto_obj."""
self._check_proto_obj_attr_exist()
phrases = []
for tp in self.proto_obj.training_phrases:
if repeat_count and tp.repeat_count != repeat_count:
continue
phrase = "".join([part.text for part in tp.parts])
annotations = {
part.text: part.parameter_id
for part in tp.parts
if part.parameter_id
}
phrases.append(
f"phrase: {phrase}"
f"\nannotations: {str(annotations)}"
f"\n\trepeat_count: {tp.repeat_count}"
)
return "\n".join(phrases)