Skip to content

Commit

Permalink
use better logging and provide --verbose option in NER_plaintexts.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-tinc committed Nov 25, 2021
1 parent 54a4a45 commit 971dba8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NER-with-SpaCy/scripts/NER_plaintexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,16 @@ def main(args):
type=int,
help='the number of most frequent NEs to store'
)
arg_parser.add_argument(
'-v', '--verbose',
action='store_true',
help='wether to use more verbose logging output')

args = arg_parser.parse_args()

loglevel = logging.DEBUG if args.verbose else logging.WARNING
logging.basicConfig(format='%(asctime)s -- %(message)s', datefmt='%Y-%m-%d %I:%M:%S', level=loglevel)

logging.info('running with the following options')
logging.info(args)
main(args)

0 comments on commit 971dba8

Please sign in to comment.