It is a very straightforward modification of GoogleAPIDemo. To
run, call
java -cp googleapi.jar GetSnippets [key] '"search string"'
It prints the first 5 snippets (or all of them if there are less
than 5). It is implemented with an easily a list of tags to be
removed from the output.
Below is a summary of what people tried which you can use in more
assignments. The bottom line here: a single query probably won't
work, you need to have several and a way to combine the results.
| "Touch the /word/" "Hold a /word/" "looked at /word/" "grabbed a /word/" "hit a /word/" "pile of /word/" | Can work for many physical objects, but will produce false negatives for many abstract objects. E.g. "hold the fundraiser" is much more frequent than "hold a spoon", though "fundraiser" is a less frequent word |
| "Hold the /word/ in hand" "in front of a /word/" | Useful only for limited subclasses of objects - small physical objects that will fit in your hand and larger objects in front of which something can be located. "In front of a snail" will produce 0 hits. |
| "Speak about /word/" | Does not do a good job in discriminating physical from abstract objects |
| "Speak of /word/" | Seems to be considerately more frequent for abstract objects, but there are exceptions, such as "speak of him". |
| "What I mean by /word/" "the concept of /word/" | Seems to work really well for many classes of abstract objects |
| "a /word/ of" | Not useful in general, as could be expected. Because "of" is a general way to introduce a noun complement, there are too many constructions with "of" - "a child of divorced parents", " a box of chocolates", "an evening of pleasure",... |
| "a /word/ full of" "a large /word/ of" | Works better than "a ... of ...", but there are still many counterexamples, such as "a box full of ..." |
| "one of that /word/" | Adding "that" strongly encourages a singular NP complement, and seems to be a good test for collections |
| "one of that /word/" | Adding "that" strongly encourages a singular NP complement, and seems to be a good test for collections |
| "members of /word/" | Works well for many, but not all collections - "members of the herd" has rather low hits |
| "part of a /word/" | Works for some collections, but too many other interfering possibilities - "part of the problem", "part of a house" |
| "the entire /word/" | Works only for some collections. Many physical counterexamples such as "the entire box". |