Use resolvePos + outputPos functions from tern.js