diff --git a/tutorial/01-visualizing.ipynb b/tutorial/01-visualizing.ipynb index 70bea240..963037f7 100644 --- a/tutorial/01-visualizing.ipynb +++ b/tutorial/01-visualizing.ipynb @@ -44,7 +44,10 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [ { @@ -111,7 +114,10 @@ "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [ { @@ -532,7 +538,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -546,7 +552,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.9" + "version": "3.13.3" } }, "nbformat": 4, diff --git a/udapi/block/corefud/mergesamespan.py b/udapi/block/corefud/mergesamespan.py index 61b613cb..fdab35e1 100644 --- a/udapi/block/corefud/mergesamespan.py +++ b/udapi/block/corefud/mergesamespan.py @@ -50,3 +50,8 @@ def process_tree(self, tree): mB.entity.mentions.remove(mB) except ValueError: pass + + # This is a sentence level block so it should not remove an entity at Doc level, + # but we can at least warn if this creates an empty entity + if len(mB.entity.mentions) == 0: + logging.warning(f"Entity now contains no mentions after removal of mention: {mB.entity.eid} entity of {mB}")