caching for Marcin's phrase table