I was part of a company that "hunted" terrorist groups that did this. Start with sympathizers publicly posting on Twitter, find who they are connected to, and fan out and cross reference to the people who are either organizing violence or running drug operations for funding.
I assume most countries with designs in foreign politics do much the same.
No, they were a competitor that pivoted away from government contracts to more commercial applications because there was too much red tape (palantir had some features that were interior according to our contacts but basically was already entrenched in the space by that point).
It has been a long while since I worked with them- the basic idea was that you could identify how people related to each other via their public posts, identify communities by topic, then identify how people influenced each other.
Some topics were harder to automate- if we took as an example b the keyword "abortion" you'll find multiple opposed groups. Searching for terrorists was somewhat similar- their public mouthpieces would use certain words, and their detractors would use the same words in opposition.
I won't go into too much further detail because while the company closed in 2022 I really respected the owners and I suspect they're going to find a way to bring the idea of the company back in a new form.
I assume most countries with designs in foreign politics do much the same.