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)
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.2.tar.gz
(14.1 kB
view details)
Built Distribution
tsresolve-0.2-py3-none-any.whl
(15.4 kB
view details)
File details
Details for the file tsresolve-0.2.tar.gz
.
File metadata
- Download URL: tsresolve-0.2.tar.gz
- Upload date:
- Size: 14.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7046e82794e50416119281b30961519925c02f2ae2d8cf31844c67253618f3e8 |
|
MD5 | 575affe74148985cac6557c31ebe1797 |
|
BLAKE2b-256 | d2faab0532ccf40581f3bf08715183b7ef0c8e5fae301cf1b3576ff998d5331a |
File details
Details for the file tsresolve-0.2-py3-none-any.whl
.
File metadata
- Download URL: tsresolve-0.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 906cf22430e7fc1442c64d23bd1b615a682d47a53d670022276e64616da9566f |
|
MD5 | 9dabb4e7ddcbf91db4c5a039fc3fc916 |
|
BLAKE2b-256 | 607cb5fa2490289af6246c3e674ee9a1bb03f580a2391c7e35e7bf9c09788407 |