I think theoretically it should be possible to analyze sample content through Lua, but it would be very slow compared to being done natively. Also, people could have problems with it not being super precise, maybe…
I made a similar feature request some time ago: