MCPcopy Index your code
hub / github.com/clips/pattern / outline

Function outline

pattern/text/tree.py:1600–1604  ·  view source on GitHub ↗
(column, fill=1, padding=3, align="left")

Source from the content-addressed store, hash-verified

1598 else : s = token.custom_tags.get(tag)
1599 return s or placeholder
1600 def outline(column, fill=1, padding=3, align="left"):
1601 # Add spaces to each string in the column so they line out to the highest width.
1602 n = max([len(x) for x in column]+[fill])
1603 if align == "left" : return [x+" "*(n-len(x))+" "*padding for x in column]
1604 if align == "right" : return [" "*(n-len(x))+x+" "*padding for x in column]
1605
1606 # Gather the tags of the tokens in the sentece per column.
1607 # If the IOB-tag is I-, mark the chunk tag with "^".

Callers 1

tableFunction · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…