CODAIT / text-extensions-for-pandas

Natural language processing support for Pandas dataframes.
Apache License 2.0
215 stars 34 forks source link

Add option to render compact parse trees #200

Open frreiss opened 3 years ago

frreiss commented 3 years ago

Right now tp.io.spacy.render_parse_tree() uses DisplaCy's large format to render parse trees. Bigger parse trees end up taking a lot of space. There should be an option to use the compact argument to use the more compact format with square arrows; see https://spacy.io/usage/visualizers#dep.

Compact rendering should be on by default for parse trees larger than 10 nodes or so.