Skip to content

displaCy: Separating Punctuations in Dependency Visualization #13306

Discussion options

You must be logged in to vote

Hi! You can find the documentation for displacy's functionality here, and the docs for "dep" visualisation specifically are here. You can add options to your code like so:

options = {"collapse_punct": False}
spacy.displacy.serve(doc, style="dep", options=options)

This will separate the punctuation tokens in the visualisation as you wanted.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zar-zar-hlaing
Comment options

Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / visualizers Feature: Built-in displaCy and other visualizers
2 participants
Converted from issue

This discussion was converted from issue #13305 on February 06, 2024 09:54.