make term statistics and term vectors accessible in scripts

closes #3772