get phrase array (path from root) for each leaf