explacy icon indicating copy to clipboard operation
explacy copied to clipboard

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

Open ricardojosehlima opened this issue 3 years ago • 2 comments

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 avatar Feb 23 '22 19:02 ricardojosehlima

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

ricardojosehlima avatar Feb 24 '22 20:02 ricardojosehlima

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! 😄

tylerneylon avatar Feb 24 '22 20:02 tylerneylon