私は次のコードを持っていました:
corpus= CategorizedPlaintextCorpusReader(loc,'(?!\.svn).*\.txt', cat_pattern=r'(Shakespeare|Milton)/.*')
cfd=nltk.ConditionalFreqDist ((genre,word)
for genre in corpus.categories()
for word in corpus.words(categories = genre))
genres=['Shakespeare','Milton']
pronouns=['I','you','he','she', 'it','we','they']
cfd.tabulate (conditions=genres,samples=pronouns)
さて、いくつかの非常に奇妙な理由で、次のエラーが発生します: "category = re.match(self._pattern、file_id).group(1)AttributeError:'NoneType'オブジェクトには属性'group'がありません"
誰もがそれが何であるかについての考えを持っていますか?