Add support for NTCIR topic format

Extracts the MathSearchPatterns from a topics file.

Change-Id: I2bebc1ff37ef2cc61fe39047ffab904929e1ac86