Inner product matrix algorithms for transfer and adaptation of language representations