def getMeta(self, fileName):
"""Return the meta data for a given fileName e.g year, url, MOH, borough, bID. """
splitReport = fileName.split('.')
bID = splitReport[2]
year = splitReport[1]
url = self.getUrl(bID)
try:
region = mapping[bID][1]
mohRegion = mapping[bID][0]
except:
# TODO there is a problem with mappings e.g Acton.1915.b19783905.txt. Region cannot be found
print(fileName)
return (None, None, None, None, None)
return year, region, bID, url, mohRegion
smell_datamine_multiprocessing.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录