Coreferene resolution with Java