Topic detection

Hi guys,
I’m trying to determine whether a piece of text is talking about a given topic. The idea is to give the model a long piece of text, and a subject/topic, and the model to classify whether this piece of text is talking about that topic.

Any hint on how to approach this problem? When searching the literature I find a lot about topic detection of a text with LDA and similar techniques, but nothing about this approach of “querying” for a topic in a text.

Thank you

Hi, I think that topic classification is fine, because if you can classify the topic of a text, you can know if the text is about history, science, sport, etc.
So, you could add a layer that doesn’t involve ML which do a comparison between an input topic and the labelled topic of the target text.

e.g.: The user asks if the targeted text is about politics and the extra layer compare the user’s input and the real text topic. If targeted_topic_text == politics then the user’s input is True.