Skip to main content

Date Location Extractor

date_location_extractor is a date_location extractor that retrieves dates and locations found in a list of strings. The input can either be a json file with a list or you can use a list directly

Install & Setup

Grab the package using pip (this will take a few minutes)

pip install TBD

Dater Location Extractor uses the following dependencies:

  • datetime
  • dateutil
  • geotext
  • datefinder
  • ast
  • os

Basic Usage

Import the module, give some text or a URL, and presto.

from date_location_extractor import DateLocationExtractor

date_location_extractor = DateLocationExtractor()
print(date_location_extractor.get_date_location_from_json_file("list_to_parse.json", use_simple_parser=True))
  • use_simple_parser does not use datefinder and uses the simple dateutil parser

The result is a list of dictionaries, e.g:

[{'address': 'San Juan Costa Rica', 'date_iso': '2009-11-27', 'ranking': 1.0, 'normalized_address': {'City': 'San Juan', 'Country': 'CR'}}]

Without loading a file:

from date_location_extractor import DateLocationExtractor

date_location_extractor = DateLocationExtractor()
print(date_location_extractor.get_date_location_from_list(["13 May 2009", "12/15/2010"]))
print(date_location_extractor.get_date_location_from_list_with_parser(["13 May 2009", "12/15/2010"]))

The ranking algorithm

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

date_location_extractor-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file date_location_extractor-0.1.0.tar.gz.

File metadata

  • Download URL: date_location_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for date_location_extractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b25f6a7b35d66c55065f22d38359abecc13e4104fd88e1abffd3f454e97d3489
MD5 17f5c188ac00c6d872f1f497941037ee
BLAKE2b-256 4a2f4397287ec2856a55bc16920ad555429c5b901a098d702340f4cccfeda38c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page