Use edge weights to choose the right linker based on input language names.