A dog swims in a pool near a person.
A dog swimming in a pool with a person
Near a person and with a person could have similar meanings.
exists e1 x1 x2 x3.(in(e1,x2) & near(x2,x3) & n_person(x3) & n_pool(x2) & Actor(e1,x1) & v_swim(e1) & n_dog(x1))
exists x1 x2 x3 x4.(a_topic(x1) & in(x1,x3) & with(x3,x4) & n_person(x4) & n_pool(x3) & n_swimming(x1) & of(x1,x2) & n_dog(x2))