From 59358d9b71c983b4fb61c3aa33e87ee14eb16b3a Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 31 Oct 2019 15:09:43 +0100 Subject: [PATCH 1/2] Remove box-decoration-break from entities in displacy (#4564) --- spacy/displacy/templates.py | 2 +- website/docs/images/displacy-ent-custom.html | 42 +++++++++++++++----- website/docs/images/displacy-ent-snek.html | 34 ++++++++++------ website/docs/images/displacy-ent1.html | 35 ++++++++++++---- website/docs/images/displacy-ent2.html | 35 ++++++++++++---- 5 files changed, 111 insertions(+), 37 deletions(-) diff --git a/spacy/displacy/templates.py b/spacy/displacy/templates.py index 4a7c596d8..1a2d0a568 100644 --- a/spacy/displacy/templates.py +++ b/spacy/displacy/templates.py @@ -44,7 +44,7 @@ TPL_ENTS = """ TPL_ENT = """ - + {text} {label} diff --git a/website/docs/images/displacy-ent-custom.html b/website/docs/images/displacy-ent-custom.html index 15294db49..709c6f631 100644 --- a/website/docs/images/displacy-ent-custom.html +++ b/website/docs/images/displacy-ent-custom.html @@ -1,9 +1,33 @@ -
But -Google -ORGis starting from behind. The company made a late push into hardware, -and -Apple -ORG’s Siri, available on iPhones, and -Amazon -ORG’s Alexa software, which runs on its Echo and Dot devices, have clear -leads in consumer adoption.
+
But + Google + ORGis starting from behind. The company made a late push into hardware, and + Apple + ORG’s Siri, available on iPhones, and + Amazon + ORG’s Alexa software, which runs on its Echo and Dot devices, have clear leads in consumer + adoption.
diff --git a/website/docs/images/displacy-ent-snek.html b/website/docs/images/displacy-ent-snek.html index 1e4920fb5..c8b416d8d 100644 --- a/website/docs/images/displacy-ent-snek.html +++ b/website/docs/images/displacy-ent-snek.html @@ -2,17 +2,25 @@ class="entities" style="line-height: 2.5; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px" > - 🌱🌿 🐍 SNEK ____ 🌳🌲 ____ 👨‍🌾 HUMAN 🏘️ + 🌱🌿 + 🐍 + SNEK + ____ 🌳🌲 ____ + 👨‍🌾 + HUMAN + 🏘️ diff --git a/website/docs/images/displacy-ent1.html b/website/docs/images/displacy-ent1.html index 6e3de2675..708df8093 100644 --- a/website/docs/images/displacy-ent1.html +++ b/website/docs/images/displacy-ent1.html @@ -1,16 +1,37 @@ -
- +
+ Apple - ORG + ORG is looking at buying - + U.K. - GPE + GPE startup for - + $1 billion - MONEY + MONEY
diff --git a/website/docs/images/displacy-ent2.html b/website/docs/images/displacy-ent2.html index e72640b51..5e1833ca0 100644 --- a/website/docs/images/displacy-ent2.html +++ b/website/docs/images/displacy-ent2.html @@ -1,18 +1,39 @@ -
+
When - + Sebastian Thrun - PERSON + PERSON started working on self-driving cars at - + Google - ORG + ORG in - + 2007 - DATE + DATE , few people outside of the company took him seriously.
From df4c9ae3dca9788a565f67e7e3f0099f89f459d1 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 31 Oct 2019 15:10:25 +0100 Subject: [PATCH 2/2] Fix formatting [ci skip] --- spacy/displacy/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/displacy/templates.py b/spacy/displacy/templates.py index 1a2d0a568..ade75d1d6 100644 --- a/spacy/displacy/templates.py +++ b/spacy/displacy/templates.py @@ -51,7 +51,7 @@ TPL_ENT = """ """ TPL_ENT_RTL = """ - + {text} {label}