diff --git a/bindings/python/examples/using_the_visualizer.ipynb b/bindings/python/examples/using_the_visualizer.ipynb index 2840d2e07..43d43c143 100644 --- a/bindings/python/examples/using_the_visualizer.ipynb +++ b/bindings/python/examples/using_the_visualizer.ipynb @@ -563,7 +563,8 @@ "metadata": {}, "outputs": [], "source": [ - "converter = lambda funny: Annotation(start=funny['startPlace'], end=funny['endPlace'], label=funny['theTag'])\n", + "def converter(funny):\n", + " return Annotation(start=funny[\"startPlace\"], end=funny[\"endPlace\"], label=funny[\"theTag\"])\n", "visualizer = EncodingVisualizer(tokenizer=tokenizer, default_to_notebook=True, annotation_converter=converter)" ] },