sammous/spacy-lefff

Hide debugging printing comments

JulienDrochon opened this issue · 1 comments

Hello,

i'm using Spacy-Lefff with Mac 10.11.6 running python 3.7.

I can't find a way to avoid printing these informations :

2019-08-29 13:33:03,196 - spacy_lefff.downloader - INFO - data already set up
2019-08-29 13:33:03,197 - spacy_lefff.melt_tagger - INFO -   TAGGER: Loading lexicon...
2019-08-29 13:33:04,339 - spacy_lefff.melt_tagger - INFO -   TAGGER: Loading tags...
2019-08-29 13:33:04,398 - spacy_lefff.melt_tagger - INFO -   TAGGER: Loading model from /usr/local/lib/python3.7/site-packages/spacy_lefff/data/tagger/models/fr...
2019-08-29 13:33:05,311 - spacy_lefff.melt_tagger - INFO -   TAGGER: Loading model from /usr/local/lib/python3.7/site-packages/spacy_lefff/data/tagger/models/fr: done
2019-08-29 13:33:05,311 - spacy_lefff.lefff - INFO - New LefffLemmatizer instantiated.
2019-08-29 13:33:05,312 - spacy_lefff.lefff - INFO - Reading lefff data...
2019-08-29 13:33:06,414 - spacy_lefff.lefff - INFO - Successfully loaded lefff lemmatizer
2019-08-29 13:33:06,439 - spacy_lefff.melt_tagger - INFO -   TAGGER: POS Tagging...

Is there a way to do this ?

hello,
I used logging so you can specify the spacy_lefff logger and disable it.
cf : https://stackoverflow.com/questions/35325042/python-logging-disable-logging-from-imported-modules

import logging
logging.getLogger('spacy_lefff').setLevel(logging.WARNING)

Cheers