# Google ngram wizardry: is there a NOT(word) operator or similar

Let's say we'd like to assess the relative frequency of `the same way` versus `in the same way`.

This wouldn't yield a true frequency comparison: `(the same way),(in the same way)` because `(the same way)` would return true when it encountered "...in the same way..."

Is there something like `(-in the same way)` -- meaning 'the same way' not immediately preceded by 'in'?

• the same way,the same way-in the same way ... Or you could express it as a proportion: in the same way/the same way Mar 15, 2015 at 13:06
• So this query `the same way-in the same way` would subtract the {in the same way} subset from the {the same way} set?
– TimR
Mar 15, 2015 at 13:19
• @TRomano - Yes, you can do some elementary "algebra" in Ngrams. Have a look.
– J.R. Mod
Mar 15, 2015 at 19:40
• In this case, actually, you have to bracket the terms as (the same way)-(in the same way). There are limits on the number of tokens you can treat. Mar 15, 2015 at 22:31