improved mapper with temp file for the stanford parser