Show me an example of this and I'll resolve it.
Generally speaking, if a standard preposition occurs between a verb and a known noun, then the next noun is noun2.
Well, just as an example, there's that one I asked you about offline a couple of days ago. GET BLAH FROM POCKET resulted in s1 = pocket and s2 = pocket. It would help if we knew what the standard prepositions were.
Based on what you said here, I did a bit of experimenting and worked out that if I use a test like :if (preposition_is "from" && noun2_is "pocket") {}, that seems to fix it. Am I on the right track?