spaCy/website/blog/displacy/pizza-with-anchovies-bad.html

14 lines
3.7 KiB
HTML
Raw Normal View History

2016-03-31 14:24:48 +00:00
<html lang="en">
<head>
<title>displaCy Demo</title>
<meta charset="utf-8">
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<div id="displacy"><style class="" scoped="true">#displacy *,#displacy *:before,#displacy *:after{box-sizing:border-box}#displacy{position:relative;overflow:scroll}#displacy .focus{position:absolute;top:0;height:100%;z-index:-1;background:rgba(0,0,0,.25)}#displacy .current-stack{margin:6em 1.5em;font-size:.75em;opacity:.25}#displacy .actions{position:fixed;}#displacy .words{display:flex;display:-webkit-flex;display:-ms-flexbox;display:-webkit-box;flex-flow:row nowrap;overflow:hidden;text-align:center}#displacy .words .word:after{content:attr(title);display:block}#displacy .arrows{width:100%;position:relative}.level{position:absolute;bottom:0;width:100%}#displacy .arrow{height:100%;position:absolute;overflow:hidden}#displacy .arrow:before{content:attr(title);text-align:center;display:block;height:200%;border-radius:50%;border:2px solid;margin:0 auto}#displacy .arrow:after{content:'';width:0;height:0;position:absolute;bottom:-1px;border-top:12px solid;border-left:6px solid transparent;border-right:6px solid transparent}#displacy .arrow.null{display:none} #displacy .level1{height:33%}#displacy .level1 .arrow{width:calc(150px * 1)}#displacy .level1 .arrow:before{width:calc(100% - 10px * 2 - 10px)}#displacy .level1 .arrow.left:after{left:calc(10px * 1)}#displacy .level1 .arrow.right:after{right:calc(10px * 1)} #displacy .level2{height:66%}#displacy .level2 .arrow{width:calc(150px * 2)}#displacy .level2 .arrow:before{width:calc(100% - 10px * 1 - 10px)}#displacy .level2 .arrow.left:after{left:calc(10px * 0.5)}#displacy .level2 .arrow.right:after{right:calc(10px * 0.5)} #displacy .level3{height:100%}#displacy .level3 .arrow{width:calc(150px * 3)}#displacy .level3 .arrow:before{width:calc(100% - 10px * 0 - 10px)}#displacy .level3 .arrow.left:after{left:calc(10px * 0)}#displacy .level3 .arrow.right:after{right:calc(10px * 0)} #displacy .level .arrow:nth-child(1){left:calc(150px * 0)}#displacy .arrows{height:150px}#displacy .level{left:calc(150px/2)} #displacy .level .arrow:nth-child(2){left:calc(150px * 1)}#displacy .arrows{height:150px}#displacy .level{left:calc(150px/2)} #displacy .level .arrow:nth-child(3){left:calc(150px * 2)}#displacy .arrows{height:150px}#displacy .level{left:calc(150px/2)} #displacy .level .arrow:nth-child(4){left:calc(150px * 3)}#displacy .arrows{height:150px}#displacy .level{left:calc(150px/2)} #displacy .level .arrow:nth-child(5){left:calc(150px * 4)}#displacy .arrows{height:150px}#displacy .level{left:calc(150px/2)} #displacy .words{min-width:calc(150px * 6)}.words .word{width:150px}</style><div class="arrows"><div class="level level1"><span class="arrow left" title="nsubj"></span><span class="arrow null"></span><span class="arrow left" title="det"></span><span class="arrow null"></span><span class="arrow right" title="pobj"></span></div><div class="level level2"><span class="arrow null"></span><span class="arrow right" title="dobj"></span><span class="arrow null"></span><span class="arrow null"></span></div><div class="level level3"><span class="arrow null"></span><span class="arrow right bad" title="prep"></span><span class="arrow null"></span></div></div><div class="words"><div class="word w-pron" title="PRON"><span class="">They</span></div><div class="word w-verb" title="VERB"><span class="">ate</span></div><div class="word w-det" title="DET"><span class="">the</span></div><div class="word w-noun" title="NOUN"><span class="">pizza</span></div><div class="word w-adp" title="ADP"><span class="">with</span></div><div class="word w-noun" title="NOUN"><span class="">anchovies</span></div></div></div>
</body>
</html>