Java implementation of the polarity propagation algorithm described on a paper