st-annotated-text
st-annotated-text copied to clipboard
added list support
modified util.py to accept list of elements as input.
so far, elements have to be passed on like below,
annotated_text(
"This ", ("is", "verb", "#8ef"), " some ", ("annotated", "adj", "#faa"), ("text", "noun", "#afa"), " for those of ",
("you", "pronoun", "#fea"), " who ", ("like", "verb", "#8ef"), " this sort of ", ("thing", "noun", "#afa"), "."
)
with this PR, we can pass a list
any_list = ["This ", ("is", "verb", "#8ef"), " some ", ("annotated", "adj", "#faa"), ("text", "noun", "#afa"), " for those of ", ("you", "pronoun", "#fea"), " who ", ("like", "verb", "#8ef"), " this sort of ", ("thing", "noun", "#afa"), "."]
annotated_text(any_list)
+1 to this functionality!!
had made a similar PR , but then the repo was updated, and the changes were conflicting. so made a new PR.
would love to see this functionality added. with this PR merge.
tagging the repo contributors for better reach/notifications. @tvst @sashavor @mataney @sai-krishna-msk
Thanks for the idea. I just implemented this in v4.0 using recursion as proposed by @Jrryy .