duckling/Duckling
Bartosz Nitka 3d18cf5ea9 Don't produce trivially empty Tokens
Summary:
We can detect certain kinds of contradictions sooner,
producing a token with an unresolvable Predicate is wasteful.
For a text like:
```
"Demain apres midi 14h 15 h 16h vendredi 14 a 15h"
```
it could produce 7000 tokens with empty predicates.
After this change it produces none and we get a 4x improvement in
time and 6x improvement in allocations.

Note I only covered `ruleIntersect*` here. I need to do this for
other instances as well.

Reviewed By: JonCoens

Differential Revision: D4871078

fbshipit-source-id: 9f0e7ad
2017-04-11 16:35:05 -07:00
..
AmountOfMoney Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Dimensions Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Distance Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Duration Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Email Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Engine Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Numeral Using hashmap look up instead of 'case of' 2017-04-11 11:04:20 -07:00
Ordinal using hashmap lookups 2017-04-05 12:20:10 -07:00
PhoneNumber Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Quantity Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Ranking Detect interval contradictions sooner 2017-04-10 16:35:27 -07:00
Regex Initial commit 2017-03-08 10:33:56 -08:00
Rules Rename Finance to AmountOfMoney 2017-03-16 14:49:44 -07:00
Temperature Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Testing Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Time Don't produce trivially empty Tokens 2017-04-11 16:35:05 -07:00
TimeGrain Initial commit 2017-03-08 10:33:56 -08:00
Url Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Volume Move tests to tests and exes to exe 2017-03-27 16:04:24 -07:00
Api.hs Make Show Dimension "law-abiding" 2017-03-16 16:34:16 -07:00
Core.hs Expose toName 2017-03-22 08:19:19 -07:00
Debug.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
Dimensions.hs Rename Finance to AmountOfMoney 2017-03-16 14:49:44 -07:00
Engine.hs Duckling monad for Engine 2017-03-31 14:19:40 -07:00
Lang.hs Initial commit 2017-03-08 10:33:56 -08:00
Resolve.hs Fix st build 2017-03-09 10:49:26 -08:00
Rules.hs Strip off TODO/FIXME 2017-03-10 12:04:16 -08:00
Stash.hs Initial commit 2017-03-08 10:33:56 -08:00
Types.hs Derive NFData for Entity 2017-04-06 15:34:43 -07:00