Skip to content

Commit

Permalink
updating dateparser-downloads and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gavishpoddar authored Aug 30, 2021
1 parent 5df60c2 commit e68260a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 3 additions & 7 deletions dateparser_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def entrance():
dateparser_argparse = argparse.ArgumentParser(
description='dateparser-download manager.', usage="dateparser-download [-h] [--fasttext] [--clear-cache]"
description='dateparser download manager.'"
)
dateparser_argparse.add_argument(
'--fasttext',
Expand All @@ -25,10 +25,6 @@ def entrance():

if args.fasttext:
fasttext_downloader(args.fasttext)
elif args.clear:
if args.clear:
clear_cache()
logging.info("dateparser-download: All cache deleted")
else:
logging.info(
"dateparser-download: You need to specify the command (i.e.: --fasttext or --clear)"
)
dateparser_argparse.error("dateparser-download: All cache deleted")
5 changes: 3 additions & 2 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ languages for parsing when language detection fails. eg. ["en", "fr"]:
>>> parse('3 de marzo de 2020', settings={'DEFAULT_LANGUAGES': ["es"]})

.. note:: When using this setting, these languages will be tried after trying with the detected languages with no success. It is especially useful when using the ``detect_languages_function`.
Optional language detect
++++++++++++++++++++++++

Optional language detection
+++++++++++++++++++++++++++

``LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD``: defaults to ``0.5``. It is a ``float`` of minimum required confidence for the custom language detection:

Expand Down

0 comments on commit e68260a

Please sign in to comment.