TakeLab / spacy-udpipe

spaCy + UDPipe
MIT License
159 stars 11 forks source link

Do not show download messages by default #37

Closed BramVanroy closed 3 years ago

BramVanroy commented 3 years ago

Currently, when you have a setup as follows:

def get_parser(lang: str):
    spacy_udpipe.download(lang)
    nlp = spacy_udpipe.load(lang)

this will always print out a message, whether it downloaded the model or whether it is already present. I would be useful if this behaviour can be controlled by the user. I added a verbose flag to the download method, which is False by default.

In my specific case, I have the above workflow, but I also write other things to STDOUT. If a user wants to pipe that to a file, it will always have the spacy-udpipe download message at the top - which is not desired.

asajatovic commented 3 years ago

Thanks for the contrib, makes sense. Please just fix the lint issues causing tests to fail :grin: