ml6team/Knowledge-graphs
55
1
2def clip_text(t, lenght = 4):
3 t_sub = t.replace("...", "dotdotdot")
4 t_clipped = ".".join(t_sub.split(".")[:lenght]) + "."
5 t_reverted = t_clipped.replace("dotdotdot", "...")
6 return t_reverted
7
8
9 1
2def clip_text(t, lenght = 4):
3 t_sub = t.replace("...", "dotdotdot")
4 t_clipped = ".".join(t_sub.split(".")[:lenght]) + "."
5 t_reverted = t_clipped.replace("dotdotdot", "...")
6 return t_reverted
7
8
9