AmyOlex / Chrono

Parsing time normalizations from text.
GNU General Public License v3.0
15 stars 4 forks source link

"one-time daily" phrases have 2 matching period/interval terms #65

Closed AmyOlex closed 6 years ago

AmyOlex commented 6 years ago

Ok, found a bigger problem that will take some time to figure out. The phrases “one-time daily” and similar have 2 matching period/interval terms in them. “Daily” and “time”. Currently, the method hasPeriodInterval() only allows for one matching term, and the method buildPeriodInterval() only will build one term per phrase. Thus, we are missing all the “daily” terms, which is a big problem. The "time" terms are not actually marked as a period, so these types of phrases can ignore the "time" terms. Maybe we can generate a rule for this.

AmyOlex commented 6 years ago

I think I fixed this, but it could still be buggy with unknown and new input. I added on an additional parsing routine to par down any phrases that had more than one matching period.interval term.