#Time semantic recognition in Chinese sentences
author:shinyke
This tool is modified from the time analysis function in Fudan NLP, and has made many details and function optimization, as follows:
- Generally speaking, it refers to the support of time, such as morning, evening, noon, evening, etc.
- Future tendency of time. For example, if you input "meeting on Monday morning" on Friday, you will recognize the time of next Monday morning; if you input "milk to the man next door at 9:00" at 17:00 p.m., you will recognize 9:00 a.m. the next day.
- Identification of multiple times, and context processing between multiple times. For example: "return books to the library from 3:00 to 5:00 p.m. on the 1st of next month", and the identification start time is 3:00 p.m. on the 1st of next month. At the same time, the end time inherits the above time and is recognized to 5:00 p.m. on the 1st of next month.
- Customizable benchmark time: if the specified benchmark time is "2016-05-20-09-00-00-00", all analysis will be based on this time.
- Fixed various bugs.
In short, it is a tool to input a sentence and recognize the time in the sentence. ╮(╯▽╰)╭
See the test class for details of the use method:
At 9:44 on June 7, 2016, the test was carried out with the following results:
2016年6月7日9:44
Hi, all. Next Monday at 3pm
2016-06-13 15:00:00-false
Meeting on Monday
2016-06-13 00:00:00-true
Meeting next Monday
2016-06-20 00:00:00-true
Get up at 6:30.
2016-06-08 06:30:00-false
6-3 spring outing
2016-06-03 00:00:00-true
Spring outing on June 3
2016-06-03 00:00:00-true
Run tomorrow morning
2016-06-08 08:00:00-false
Business trip from this Sunday to next Sunday
2016-06-12 00:00:00-true
2016-06-19 00:00:00-true
There will be a meeting from 3:00 to 5:00 on Thursday afternoon
2016-06-16 15:00:00-false
2016-06-16 17:00:00-false
Yesterday morning, the eighth joint session of the China US strategic and economic dialogue on climate change was held. Xie Zhenhua, China's special representative for climate change, said that the key task of policy dialogue between China and the United States in the multilateral process of tackling climate change this year is to promote the early entry into force of the Paris Agreement.
Time text: yesterday morning, corresponding time: 2016-06-06 10:00:00
Time text: this year, corresponding time: 2016-01-01 00:00:00
Liaoning Daily reported today that on June 3, an expanded meeting of the Standing Committee of the provincial Party committee was held in Liaoning, which opened from 2:30 p.m. to 6:30 p.m. and the main topic was to implement the central inspection and rectification requirements.
Time text: today, corresponding time: 2016-06-07 00:00:00
Time text: June 3, corresponding time: June 3, 2016 00:00:00
Time text: 2:30 p.m., corresponding time: 2016-06-03 14:30:00
Time text: 6:30, corresponding time: 2016-06-03 18:30:00
According to the Ninth Amendment to the criminal law, which came into effect in November last year, those who organize cheating in the national examinations prescribed by law will be sentenced to a maximum of seven years' imprisonment. In addition, the new version of the education law, which just came into effect this month, also makes it clear
Time text: last November, corresponding time: 2015-11-01 00:00:00
Time text: this month, corresponding time: 2016-06-01 00:00:00
If you use it and have comments and suggestions, please contact me at issue. If it's easy to use, your star is the best support for the author.
Enjoy ** - shinyke**