Extracting formal specifications from natural language regulatory documents