All Projects → charlesXu86 → Time_Convert

charlesXu86 / Time_Convert

Licence: other
时间转换工具

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Time Convert

Ner Bert Pytorch
PyTorch solution of named entity recognition task Using Google AI's pre-trained BERT model.
Stars: ✭ 249 (+678.13%)
Mutual labels:  ner
neural name tagging
Code for "Reliability-aware Dynamic Feature Composition for Name Tagging" (ACL2019)
Stars: ✭ 39 (+21.88%)
Mutual labels:  ner
keras-crf-ner
keras+bi-lstm+crf,中文命名实体识别
Stars: ✭ 16 (-50%)
Mutual labels:  ner
KoBERT-NER
NER Task with KoBERT (with Naver NLP Challenge dataset)
Stars: ✭ 76 (+137.5%)
Mutual labels:  ner
neuro-comma
🇷🇺 Punctuation restoration production-ready model for Russian language 🇷🇺
Stars: ✭ 46 (+43.75%)
Mutual labels:  ner
ai explore
机器学习、深度学习基础知识. 推荐系统及nlp相关算法实现
Stars: ✭ 54 (+68.75%)
Mutual labels:  ner
Pytorch ner bilstm cnn crf
End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF implement in pyotrch
Stars: ✭ 249 (+678.13%)
Mutual labels:  ner
scikitcrf NER
Python library for custom entity recognition using Sklearn CRF
Stars: ✭ 17 (-46.87%)
Mutual labels:  ner
PhoNER COVID19
COVID-19 Named Entity Recognition for Vietnamese (NAACL 2021)
Stars: ✭ 55 (+71.88%)
Mutual labels:  ner
video music book datasets
NLP NER datasets video/music/book bio
Stars: ✭ 73 (+128.13%)
Mutual labels:  ner
NEMO
Neural Modeling for Named Entities and Morphology (Hebrew NER)
Stars: ✭ 25 (-21.87%)
Mutual labels:  ner
sequence tagging
Named Entity Recognition (LSTM + CRF + FastText) with models for [historic] German
Stars: ✭ 25 (-21.87%)
Mutual labels:  ner
datagrand bert
2019达观杯信息提取第5名代码
Stars: ✭ 20 (-37.5%)
Mutual labels:  ner
Chinese Names Corpus
中文人名语料库。人名生成器。中文姓名,姓氏,名字,称呼,日本人名,翻译人名,英文人名。可用于中文分词、人名实体识别。
Stars: ✭ 3,053 (+9440.63%)
Mutual labels:  ner
TweebankNLP
[LREC 2022] An off-the-shelf pre-trained Tweet NLP Toolkit (NER, tokenization, lemmatization, POS tagging, dependency parsing) + Tweebank-NER dataset
Stars: ✭ 84 (+162.5%)
Mutual labels:  ner
Zh Ner Keras
details
Stars: ✭ 252 (+687.5%)
Mutual labels:  ner
extractacy
Spacy pipeline object for extracting values that correspond to a named entity (e.g., birth dates, account numbers, laboratory results)
Stars: ✭ 47 (+46.88%)
Mutual labels:  ner
genalog
Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.
Stars: ✭ 234 (+631.25%)
Mutual labels:  ner
SynLSTM-for-NER
Code and models for the paper titled "Better Feature Integration for Named Entity Recognition", NAACL 2021.
Stars: ✭ 26 (-18.75%)
Mutual labels:  ner
NER-and-Linking-of-Ancient-and-Historic-Places
An NER tool for ancient place names based on Pleiades and Spacy.
Stars: ✭ 26 (-18.75%)
Mutual labels:  ner

Time_Convert

Build Status Coverage Status Version Status Python Versions Downloads

Introduction

Time_Convert是一个中文语义时间提取转换工具,他参考的项目是微软的时间提取代码。(由于时间比较久,找不到链接了)。目前该工具基本可以 提取出对话文本中提及的时间相关的短语,例如:今天、明天、下周、下个月等等,并归一化成相对应的时间日期。可以为很多NLP的基础分析任务提供极大的便利。

Install

pip install time-convert

import time_convert as tv
print(tv.__version__)    # 查看版本信息

Usage

eg1:

from time_convert import TimeNormalizer

tc = TimeNormalizer()

msg = '明天去你家'

res = tc.parse(msg)

print(res)

{'key': '明天', 'type': 'timestamp', 'date': '2019-09-26 00:00:00'}

eg2:

from time_convert import TimeNormalizer

tc = TimeNormalizer()

msg = `明天去你家'

timeBase = '2013-02-28 16:30:29'

res = tc.parse(msg, timeBase)

print(res)

{'key': '明天', 'type': 'timestamp', 'date': '2013-03-01 00:00:00'}

Mark

  • 1、时间解析的默认basetime时间为请求的当前时间。
  • 2、也可以指定basetime,basetime的格式为:YYYY-MM-DD 00:00:00
  • 3、如果不指定basetime,则默认basetime为当前请求时间

返回值类型说明

Time_Convert总的会返回四种类型的情况:

  • 1、timespan
  • 2、timestamp
  • 3、timedelta
  • 4、error

Update NEWS

  • 2019.10 v1版本打包上线
  • 2020.1 更新python版本兼容问题

To do list

  • 1、timedelta的拼接
  • 2、'一会儿'等口语化表述时间的提取
  • 3、过两天,明天吧
  • 4、下礼拜
  • 5、在返回关键词的时候添加上index
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].