tylerneylon / explacy

A small tool that EXPLains spACY parse results. See what I did there?
The Unlicense
83 stars 10 forks source link

Is it possible to have the output written to a file? #6

Open ricardojosehlima opened 2 years ago

ricardojosehlima commented 2 years ago

Maybe it's because I'm a beginner... I'm using

saida = explacy.print_parse_info(nlp, frase)

and this prints the output in the terminal. However, as it is a NoneType, I can't write it to a file. So, is it possible to have the output written to a file? BTW, great work and thanks for the project!

ricardojosehlima commented 2 years ago

Solved. I ran the program in the terminal and from there redirected to a file.

tylerneylon commented 2 years ago

Hi @ricardojosehlima !

I think it's a good idea to support getting the output as a string directly, rather than only supporting printed output.

I'm going to reopen this with a plan to update the code accordingly. Thanks for the feature request! 😄