added parser and experimental support for polarity detection