mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Add table row for linguistic annotations
This commit is contained in:
parent
7e5163402e
commit
00ede349dc
|
@ -352,7 +352,22 @@ mixin pos-row(tag, pos, morph, desc)
|
||||||
| #[code=m]
|
| #[code=m]
|
||||||
+cell.u-text-small=desc
|
+cell.u-text-small=desc
|
||||||
|
|
||||||
|
|
||||||
mixin dep-row(label, desc)
|
mixin dep-row(label, desc)
|
||||||
+row
|
+row
|
||||||
+cell #[code=label]
|
+cell #[code=label]
|
||||||
+cell=desc
|
+cell=desc
|
||||||
|
|
||||||
|
|
||||||
|
//- Table rows for linguistic annotations
|
||||||
|
annots [array] - array of cell content
|
||||||
|
style [array] array of 1 (display as code) or 0 (display as text)
|
||||||
|
|
||||||
|
mixin annotation-row(annots, style)
|
||||||
|
+row
|
||||||
|
for cell, i in annots
|
||||||
|
if style && style[i]
|
||||||
|
- cell = (typeof(cell) != 'boolean') ? cell : cell ? 'True' : 'False'
|
||||||
|
+cell #[code=cell]
|
||||||
|
else
|
||||||
|
+cell=cell
|
||||||
|
|
Loading…
Reference in New Issue
Block a user