Well, end of a lunch hour of coding. I the basic scope operations working via TDD. This lets me say "only do this analysis on content" or "look at only the first word of each paragraph". It uses either a keyword (content, lookup, project) or XPath.
To the first word would be `/file[is-content()/para/word[position()=1]`. You wouldn't actually use that, but you could analyze each paragraph separately (`/file[is-content()/para`).