We detect thinking the same way we do raindrops on roses and whiskers on kittens
It is easy, if one comes to Gilbert Ryle with materialist assumptions, to mistake what he is up to. He predicted this himself, when he said his book was likely to be read as advocating behaviorism, but was more accurately seen as a work of phenomenology.
In criticizing the idea of a "ghost in the machine," Ryle is not claiming that mind doesn't exist, but quite the opposite: mind is right out in the world, in front of us. In his discussion of mimicry, for instance, he writes, "[One person] mimicking [another] is thinking how he behaves" (The Concept of Mind, p. 248). Ryle is very clear here: there is not first the thought of how Joe or Jill behaves, and then a separate action of mimicry: no, the act of mimicry is itself an exhibition of intelligence, of thinking through the behavior of the one mimicked, even though it may not be accompanied by any verbal thoughts at all.
We don't "hypothesize" others have minds through some sort of torturous weighing of empirical evidence: we see their mental acts right in front of us, in their puzzling over a chess position, or working through a math problem, or figuring out how to break down a defender off the dribble. Someone stuck inside Cartesian dualism* is likely to protest: "Ah, but we may be wrong! The person might be just pretending to work a math problem, or unconscious and just going through the motions of making a chess move!"
Ryle's response to this is spot-on (I paraphrase): "So what? There is some other sort of judgment we make which is mistake free? We never think it is raining, but it was just someone using the sprinkler? Astronomers never think they detect a star, only to discover it was an optic artifact? We never have taken an image of a tree for a real tree, or a mirage for a lake?"
I once turned the corner of a staircase at the National Gallery in Washington, and came face-to-face with Rodin's "The Thinker." I had a startling, intense impression of thought going on before my eyes. (Believe me, I had seen it in photos many times before that day, and those photos did nothing to prepare me for the actual statue.) I assume I was mistaken, and the statue was not really contemplating anything: but this illustrates Ryle's point nicely: the fact that Rodin could so brilliantly create a visual symbol of thought demonstrates that we can indeed see thought in the real world. (The sculpted dog in the piazza at Metrotech Center sometimes tricks people into thinking they are looking at a real dog: that can only work because we often do see real dogs. No one could make a statue tricking us into thinking we are seeing the scent of roses, or a G-flat major chord!)
To close, I leave you with this brilliant bit of thinking:
* Which materialists are: they accept the ghost in the machine view of mind, and then argue the ghost doesn't exist.