text2date-spring-boot-starter

For extracting time in Chinese text

Лицензия

Лицензия

Категории

Категории

Spring Boot Контейнер Микросервисы Mirror Библиотеки уровня приложения Introspection ORM Данные
Группа

Группа

io.github.mirrormingzz
Идентификатор

Идентификатор

text2date-spring-boot-starter
Последняя версия

Последняя версия

1.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

text2date-spring-boot-starter
For extracting time in Chinese text
Ссылка на сайт

Ссылка на сайт

https://github.com/mirrormingzZ/text2date-spring-boot-starter
Система контроля версий

Система контроля версий

https://github.com/mirrormingzZ/text2date-spring-boot-starter

Скачать text2date-spring-boot-starter

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.mirrormingzz/text2date-spring-boot-starter/ -->
<dependency>
    <groupId>io.github.mirrormingzz</groupId>
    <artifactId>text2date-spring-boot-starter</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.mirrormingzz/text2date-spring-boot-starter/
implementation 'io.github.mirrormingzz:text2date-spring-boot-starter:1.0.5'
// https://jarcasting.com/artifacts/io.github.mirrormingzz/text2date-spring-boot-starter/
implementation ("io.github.mirrormingzz:text2date-spring-boot-starter:1.0.5")
'io.github.mirrormingzz:text2date-spring-boot-starter:jar:1.0.5'
<dependency org="io.github.mirrormingzz" name="text2date-spring-boot-starter" rev="1.0.5">
  <artifact name="text2date-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.mirrormingzz', module='text2date-spring-boot-starter', version='1.0.5')
)
libraryDependencies += "io.github.mirrormingzz" % "text2date-spring-boot-starter" % "1.0.5"
[io.github.mirrormingzz/text2date-spring-boot-starter "1.0.5"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
io.github.mirrormingzz : text2date-spring-boot-starter-autoconfigurer jar 1.0.5

Модули Проекта

Данный проект не имеет модулей.

提取中文文本里面的时间

使用

添加依赖

<dependency>
    <groupId>io.github.mirrormingzz</groupId>
    <artifactId>text2date-spring-boot-starter</artifactId>
    <version>1.0.4</version>
</dependency>

注入DatetimeRecognizer

@Autowired
private DatetimeRecognizer datetimeRecognizer;

使用dateParse()/parse()进行文本解析

List<Date> dates = datetimeRecognizer.dateParse("半个小时后提醒我去买票");

List<TimeEntity> timeEntities = datetimeRecognizer.parse("明天下午四点到五点去看电影");
  • 2020-4-22 添加:节假日解析,礼拜x 解析
  • 2020-4-2 修复:半个小时,半个钟头前/后和xx小时前/后 的解析
  • 2020-3-27 添加:半小时前/后和xx小时前/后 的解析

TODO:

  • 节假日解析 4-22
  • 时间短语解析 4-22
  • 是否倾向未来时间可配置
  • 自定义添加解析参数

参考项目:

mandarintools:https://github.com/luoxuefeng01/mandarintools-1

复旦大学fnlp:https://github.com/FudanNLP/fnlp 时间处理模块见:package org.fnlp.nlp.cn.ner;

Microsoft/Recognizers-Text:https://github.com/microsoft/Recognizers-Text 微软的 Java - datetime 目前未完成

Time-NLP:https://github.com/shinyke/Time-NLP

TimeRecognition:https://github.com/senlinxuefeng/TimeRecognition

TimeRec:https://github.com/wbq813/TimeRec

ALBERT_4_Time_Recognition:https://github.com/percent4/ALBERT_4_Time_Recognition

Chinese_Time_Recogniztion:https://github.com/percent4/Chinese_Time_Recogniztion

Версии библиотеки

Версия
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0