OpenVoiceOS / OpenVoiceOS/ovos-date-parser

No handling of relative time words to the past

Open
#89 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
0
Forks
8
Avg merge
7h 9m
Merged PRs (30d)
17

Description

Even if the ovos-date-parser is used to set up reminders or actions for the future, it would be nice if time and date specifications that lie in the past were also recognized. I don't know whether the problem only affects the German language. While absolute time specifications from the past (e.g. "23. September 2023") are interpreted correctly, a formulation such as “gestern” (yesterday) and other references to the past are not implemented.

There are even real errors: The phrase “vor einer Woche” - which means the period of one week in the past - is interpreted diametrically opposed: A week in the future is displayed. If you mean the following week, in German you would say “in einer Woche” or “in der nächsten Woche”. The same applies to “vor sieben Tagen”. Here, too, the current date plus 7 days is returned but what is meant is seven days back.

The following formulations should be implemented:
gestern (current day - 1)
vorgestern current day - 2)
vorvorgestern (current day - 3)
vor einem Tag (current day - 1)
vor n Tagen (current day - n) if n > 1

letzte Woche | in der letzten Woche (current week -1)
vorletzte Woche (current week -2)
vorvorletzte Woche (current week -3)
vor einer Woche (current week - 1)
vor n Wochen (current week - n) if n > 1

im letzten Monat | vor einem Monat (current month - 1)
im vorletzten Monat (current month - 2)
im vorvorletzen Monat (current month - 3)
vor einem Monat (current month - 1)
vor n Monaten (current month - n) if n > 1

im letzten Jahr | vor einem Jahr (current year - 1)
im vorletzten Jahr (current year - 2)
im vorvorletzen Jahr (current year - 3)
vor einem Jahr (current year - 1)
vor n Jahren (current year - n) if n > 1

There are also the following anomalies:
“23. September 2023” is recognized correctly but not "23.09.2023" or "23.9.2023" or "23.9.23" - all common dates in German.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by locating the German relative-time handling and numeric-date parsing in ovos-date-parser, then reproduce the listed phrases and date formats. Done means past day, week, month, and year expressions resolve backward rather than forward, while the listed German numeric dates are recognized.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.