comtravo / ctparse

Parse natural language time expressions in python
https://www.comtravo.com
MIT License
131 stars 23 forks source link

Time expression "Montag 9. März bis Mittwoch 11. März" doesn't parse correctly #90

Closed gabrielelanaro closed 4 years ago

gabrielelanaro commented 4 years ago

This issue seems to be related to the fact that there are too many possibile matches and the correct parse doesn't make it to the top.

ctparse.ctparse('Montag 9. März bis Mittwoch 11. März')                                                                                                                                                                                                               
Out[6]: CTParse(None - 2020-03-11 X:X (X/X), (102, 108, 103, 134, 102, 108, 103, 'ruleDOM1', 'ruleNamedMonth', 'ruleDOMMonth', 'ruleLatentDOY', 'ruleNamedMonth', 'ruleDOM1', 'ruleDOMMonth', 'ruleLatentDOY', 'ruleNamedDOW', 'ruleDOWDate', 'ruleNamedDOW', 'ruleDOWDate', 'ruleBeforeTime'), 20.224422964079018)