implement DocumentFrequency builder, remove mocha