Detect expressions in a paragraph
Paste text in English, Spanish, French or German. The model finds the time expressions in it:
candidate spans are classified in your browser, the ones that resolve to a real IR are kept, and each is
shrunk to its tightest core. Resolved dates use the :now anchor below.
How it works
The model classifies one expression at a time, so detection is
plain JS around it: generate candidate spans anchored on trigger and unit words in en·es·fr·de (last,
próximo, prochain, nächsten, month and weekday names…), classify each
(memoized, ~1 ms per span on the encoder), drop the ones that don't materialize to a valid IR, resolve
overlaps by preferring the longest span, then shrink each to the shortest sub-span with the same materialized IR.
It runs 100% client-side. Code on GitHub.