0
Corpus = collections.namedtuple('Corpus', 'a, b, c, d')
閱讀語料庫中的所有文件,並保存數據,
def compute(counters, tokens, catergory)
...
counters.stats[tokens][catergory] = Corpus(a, b, c, d)
令牌和CATERGORY是collection.Counter()。在閱讀counters.stats中的a,b,c,d中的所有信息後,我在另一個函數中進行一些計算,併爲每個標記獲取'e'。如何將e添加到此函數的counters.stats中?
''這是[category](http://dictionary.reference.com/browse/category),而不是catergory。 ' ' –
2012-04-27 21:20:41