List off topic posts for easy moderation

Is there a way to analyse chains of posts whether they are off-topic with respect to the theme/thread and first post ?
I think of “this topic resembles…” which indicates there is a db of similarity existing.
There might be an evaluation of flags made by users in the past.
There might be an evaluation of moderated moves in the past.
see also
https://meta.discourse.org/search?q=off%20topic%20NLP&expanded=true
There might be a KI or NLP to work the posts and identify hits and misses of the theme. This could help moderation and clean the forum.