Jatime: Time Expression Analyzer for Japanese
Jatime is a Python library to extract Japanese time expressions from a given text and turning them into objects. Try Jatime now from your browser!
Installing jatime
Install with pip or your favorite PyPI package manager.
$ pip install jatime
Using jatime
Here's how to analyze Japanese text using jatime. Note that "dow" means the day of the week.
From within Python
from jatime.analyzer import analyze
result = analyze("それは令和2年十月十七日の出来事でした。")
print(result)
['それは', {'string': '令和2年十月十七日', 'year': 2020, 'month': 10, 'day': 17, 'dow': 5, 'hour': None, 'minute': None}, 'の出来事でした。']
From the command line
$ jatime analyze --format-json それは令和2年十月十七日の出来事でした。
[
"それは",
{
"string": "令和2年十月十七日",
"year": 2020,
"month": 10,
"day": 17,
"dow": 5,
"hour": null,
"minute": null
},
"の出来事でした。"
]
Over HTTP communication
$ jatime serve
$ curl --get "http://localhost:1729/analysis" --data-urlencode "string=それは令和2年十月十七日の出来事でした。"
["それは",{"day":17,"dow":5,"hour":null,"minute":null,"month":10,"string":"令和2年十月十七日","year":2020},"の出来事でした。"]
Features
- Jatime does not change the given string at all. It just objectifies the extracted time expressions.
- Jatime supports a variety of time expressions.
22:30,午後十時半andP.M.10:30are all interpreted as the same time as we want. - Jatime tries to make up for the missing time information whenever possible. That is, jatime calculates the year given the month, day and day of the week.
- Jatime will tell us why the time information is inconsistent if it is inconsistent.
Metadata
Release files for jatime 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jatime-0.1.0.tar.gz | 15.0 kB | Without provenance | Details for jatime-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jatime-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for jatime-0.1.0-py3-none-any.whl |
Total release size: 30.4 kB
Release files / jatime-0.1.0.tar.gz
| Download URL | jatime-0.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c5eecbf2dcb7bbb8dd3a21a791bdf2a6b510fccb6765b19fa2a429e895f6c26
|
|
BLAKE2b-256 checksum How to use checksums |
870854a48cd1176d1dfee813c2de181a1832896b36e5c2f360a5d0f81b5263bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/4.18.0-193.19.1.el8_2.x86_64
|
Release files / jatime-0.1.0-py3-none-any.whl
| Download URL | jatime-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93a32522492cd08ff45cb478dca9d8ec539e4eae1f0c9753e57e427f850d1f70
|
|
BLAKE2b-256 checksum How to use checksums |
7d040b1dc4946310dfe2066fad47aa3485d8efae3a03cd2e7637051794029626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Linux/4.18.0-193.19.1.el8_2.x86_64
|
Security for jatime 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.