This is done by autotldr[1] which is powered by smmry[2]. Smmry is pretty neat actually !
Try for example https://en.wikipedia.org/wiki/Functional_programming/ as an input to smmry - you don't get the idea
It would probably not be very hard to build a mediawiki smmrly extension that does just that.