本文整理汇总了Python中feature_extractor.FeatureExtractor.process方法的典型用法代码示例。如果您正苦于以下问题:Python FeatureExtractor.process方法的具体用法?Python FeatureExtractor.process怎么用?Python FeatureExtractor.process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feature_extractor.FeatureExtractor
的用法示例。
在下文中一共展示了FeatureExtractor.process方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: processDir
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import process [as 别名]
def processDir(corpusName, mailCorpus, maildir):
mailIterator = mailCorpus.getFilesList(maildir)
mailStorage = MailStorage(corpusName)
featureExtractor = FeatureExtractor()
progress = ProgressDisplay(len(mailIterator), 'Processing emails')
# Output files are named 1 to numMails
index = 1
for mail in mailIterator:
processed = processMail(maildir, mail, mailCorpus)
features = featureExtractor.process(processed)
mailStorage.store(features, str(index))
index += 1
progress.update()