Added function to calcuate symbols. Returns defaultdict of symbols.