Remove test files.

This commit is contained in:
Raphael Mitsch 2023-10-18 10:42:04 +02:00
parent e7ca6a2a56
commit eb46a9c62d
2 changed files with 0 additions and 93 deletions

20
blub.py
View File

@ -1,20 +0,0 @@
doc_rendering = {
"text": "Welcome to the Bank of China.",
"spans": [
{"start_token": 2, "end_token": 5, "label": "SkillNC"},
{"start_token": 0, "end_token": 2, "label": "Skill"},
{"start_token": 1, "end_token": 3, "label": "Skill"},
],
"tokens": ["Welcome", "to", "the", "Bank", "of", "China", "."],
}
from spacy import displacy
html = displacy.render(
doc_rendering,
style="span",
manual=True,
options={"colors": {"Skill": "#56B4E9", "SkillNC": "#FF5733"}},
)
with open("render.html", "w") as file:
file.write(html)

View File

@ -1,73 +0,0 @@
<div class="spans" style="line-height: 2.5; direction: ltr">
<span style="font-weight: bold; display: inline-block; position: relative; height: 60px;">
Welcome
<span style="background: #56B4E9; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
<span style="background: #56B4E9; top: 40px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;">
<span style="background: #56B4E9; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px">
Skill
</span>
</span>
</span>
<span style="font-weight: bold; display: inline-block; position: relative; height: 77px;">
to
<span style="background: #56B4E9; top: 40px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
<span style="background: #56B4E9; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
<span style="background: #56B4E9; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;">
<span style="background: #56B4E9; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px">
Skill
</span>
</span>
</span>
<span style="font-weight: bold; display: inline-block; position: relative; height: 77px;">
the
<span style="background: #56B4E9; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
<span style="background: #FF5733; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
<span style="background: #FF5733; top: 57px; height: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: -1px; width: calc(100% + 2px); position: absolute;">
<span style="background: #FF5733; z-index: 10; color: #000; top: -0.5em; padding: 2px 3px; position: absolute; font-size: 0.6em; font-weight: bold; line-height: 1; border-radius: 3px">
SkillNC
</span>
</span>
</span>
<span style="font-weight: bold; display: inline-block; position: relative; height: 60px;">
Bank
<span style="background: #FF5733; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
</span>
<span style="font-weight: bold; display: inline-block; position: relative; height: 60px;">
of
<span style="background: #FF5733; top: 57px; height: 4px; left: -1px; width: calc(100% + 2px); position: absolute;">
</span>
</span>
China . </div>