add some word rank function and fix some bug