Closed anka-213 closed 1 year ago
Thanks for the work, good catch!
Funny that this 1/5th of WordNet takes longer to load than just using the full WordNet! :-P
(Well, also the reason of using this subset is that not all terms in the full WordNet have a linearisation in all languages, so using this subset prevents linearisations like "the [cat_8_N] sat on the [mat_6_N]"
.)
When a long list of explicitly included/excluded constants are imported, the performance is
O(n * m)
, wheren
is the number of excluded or included constants andm
is the total number of constants in the imported module.This patch uses a
Data.Set
to speed up the check toO(log(n) * m)
.For example, this file would take several minutes to load, now it takes less than a second: