{"id":13592889,"url":"https://github.com/yagays/ja-timex","last_synced_at":"2026-01-29T01:47:56.013Z","repository":{"id":40322686,"uuid":"387462924","full_name":"yagays/ja-timex","owner":"yagays","description":"自然言語で書かれた時間情報表現を抽出/規格化するルールベースの解析器","archived":false,"fork":false,"pushed_at":"2025-02-27T01:55:13.000Z","size":628,"stargazers_count":140,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-26T21:03:13.652Z","etag":null,"topics":["datetime","nlp","python","regular-expression","temporal","time-parsing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yagays.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-19T12:51:35.000Z","updated_at":"2025-06-05T03:34:12.000Z","dependencies_parsed_at":"2025-04-09T05:30:33.157Z","dependency_job_id":null,"html_url":"https://github.com/yagays/ja-timex","commit_stats":{"total_commits":304,"total_committers":5,"mean_commits":60.8,"dds":0.02960526315789469,"last_synced_commit":"5d723778dc65c0cfcfc0011d4e8825efa818672b"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/yagays/ja-timex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yagays%2Fja-timex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yagays%2Fja-timex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yagays%2Fja-timex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yagays%2Fja-timex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yagays","download_url":"https://codeload.github.com/yagays/ja-timex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yagays%2Fja-timex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28859843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datetime","nlp","python","regular-expression","temporal","time-parsing"],"created_at":"2024-08-01T16:01:14.385Z","updated_at":"2026-01-29T01:47:55.998Z","avatar_url":"https://github.com/yagays.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![](docs/docs/img/logo_title_wide.png)\n\n# ja-timex\n\n自然言語で書かれた時間情報表現を抽出/規格化するルールベースの解析器\n\n## 概要\n`ja-timex` は、現代日本語で書かれた自然文に含まれる時間情報表現を抽出し`TIMEX3`と呼ばれるアノテーション仕様に変換することで、プログラムが利用できるような形に規格化するルールベースの解析器です。\n\n以下の機能を持っています。\n\n- ルールベースによる日本語テキストからの日付や時刻、期間や頻度といった時間情報表現を抽出\n- アラビア数字/漢数字、西暦/和暦などの多彩なフォーマットに対応\n- 時間表現のdatetime/timedeltaオブジェクトへの変換サポート\n\n### 入力\n\n```python\nfrom ja_timex import TimexParser\n\ntimexes = TimexParser().parse(\"彼は2008年4月から週に3回のジョギングを、朝8時から1時間行ってきた\")\n```\n\n### 出力\n\n```python\n[\u003cTIMEX3 tid=\"t0\" type=\"DATE\" value=\"2008-04-XX\" text=\"2008年4月\"\u003e,\n \u003cTIMEX3 tid=\"t1\" type=\"SET\" value=\"P1W\" freq=\"3X\" text=\"週に3回\"\u003e,\n \u003cTIMEX3 tid=\"t2\" type=\"TIME\" value=\"T08-XX-XX\" text=\"朝8時\"\u003e,\n \u003cTIMEX3 tid=\"t3\" type=\"DURATION\" value=\"PT1H\" text=\"1時間\"\u003e]\n```\n\n### datetime/timedeltaへの変換\n\n```python\n# \u003cTIMEX3 tid=\"t0\" type=\"DATE\" value=\"2008-04-XX\" text=\"2008年4月\"\u003e\nIn []: timexes[0].to_datetime()\nOut[]: DateTime(2008, 4, 1, 0, 0, 0, tzinfo=Timezone('Asia/Tokyo'))\n```\n\n\n```python\n# \u003cTIMEX3 tid=\"t3\" type=\"DURATION\" value=\"PT1H\" text=\"1時間\"\u003e\nIn []: timexes[3].to_duration()\nOut[]: Duration(hours=1)\n```\n\n## インストール\n\n```\npip install ja-timex\n```\n\n## ドキュメント\n[ja\\-timex documentation](https://ja-timex.github.io/docs/)\n\n### 参考仕様\n本パッケージは、以下の論文で提案されている時間情報アノテーションの枠組みを元に作成しています。\n\n- [1] [小西光, 浅原正幸, \u0026 前川喜久雄. (2013). 『現代日本語書き言葉均衡コーパス』 に対する時間情報アノテーション. 自然言語処理, 20(2), 201-221.](https://www.jstage.jst.go.jp/article/jnlp/20/2/20_201/_article/-char/ja/)\n- [2] [成澤克麻 (2014)「自然言語処理における数量表現の取り扱い」東北大学大学院 修士論文](http://www.cl.ecei.tohoku.ac.jp/publications/2015/mthesis2013_narisawa_submitted.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyagays%2Fja-timex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyagays%2Fja-timex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyagays%2Fja-timex/lists"}