Skip to main content

Natural language parsing of recurring events

Project description

# Tsresolve (Timestamp resolve)

Timestamp generator for either "Point of time" or "Duration of time" from Text (string). This uses recurrent, parsedatetime libraries to detect dates from strings. However, there are lot of major updations in this library which will allow user to generate either point of time or duration between two point of times.

#### Points to know:
1. It generates time stamps in ISO format.
2. When no ammod (last/previous/next..) is used before month/year, it detects the passed one.
Ex: Show calls from December 5th. (If you are asking this before December 5th 2018, it detects December 5th 2017 else, December 5th 2018). Test it with and without ammods for better understanding.

##### Examples:

Point of time: Expected result will be (Timestamp, Bool). Bool is "True" if time detected in phrase. Else, "False"

1. November 3rd at 3 p.m. | Result: (2019-11-03T15:00:00, True)
2. next monday evening at 5 o'clock | Result: (2018-12-24T17:00:00, True)
3. last saturday | Result: (2018-12-24T17:00:00, False)

Period of time: Expected result will be (Start timestamp, End timestamp)

1. from last tuesday till date | Result: ('2018-12-11T00:00:00', '2018-12-18T23:59:59')
2. from last november 5th to december 15th | Result: ('2018-11-01T00:00:00', '2018-12-18T23:59:59')
3. show something from november 5th 2017 | Result: ('2017-11-05T00:00:00', '2017-11-05T23:59:59')

#### Not handled:
1. Duration between two years. Ex: 2018-2019
2. Currently not handling "5th of January" format.
3. Time level is currently handled only in point of time, yet to be handled in period of time.

#### Credits
Tsresolve is inspired by Recurrent. It also uses the parsedatetime library for creating timestamps.

#### Author
Akhil kumar D (akhilkumar.doppalapudi@gmail.com)

Project details


Download files

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

Source Distribution

tsresolve-0.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

tsresolve-0.3-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file tsresolve-0.3.tar.gz.

File metadata

  • Download URL: tsresolve-0.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for tsresolve-0.3.tar.gz
Algorithm Hash digest
SHA256 8705b40b1e5027f99d56b89ec1e2a1167f7ab6dc5583afb9b0f8527dd784afaf
MD5 be4d546c057f609483d124e05fce9411
BLAKE2b-256 7426ca7a6b98f01df7a5e36f32ebcd1ee83db1724119a9dde5df3568b20f3a62

See more details on using hashes here.

File details

Details for the file tsresolve-0.3-py3-none-any.whl.

File metadata

  • Download URL: tsresolve-0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for tsresolve-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 651530ee29eb6b601c6b9d3094d8e780ae2b12c2b9b0fd2c9094007c7e8d2724
MD5 4db4ae363a32b579b29b220d6a15a993
BLAKE2b-256 0f9f0bd8fe231619a9af1701105c8649a51f1be0cfd1e9c0f7e6e84c2f08dc33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page