def setUp(self): self._categories = { 'bathroom': ['bathroom', 'bath'], 'bedroom': ['bedroom'], 'living room': [ 'living room', 'reception', 'reception room', 'receptions room', 'reception area', 'reception space' ], 'property': ['apartment', 'maisonette', 'house', 'accommodation', 'home'], 'garden': ['garden', 'yard'], 'location': ['location'] } self._noun_categories = programfiles.NounCategories(self._categories)
def setUp(self): self._categories = { 'bathroom': ['bathroom', 'bath'], 'bedroom': ['bedroom'], 'living room': [ 'living room', 'reception', 'reception room', 'receptions room', 'reception area', 'reception space' ], 'property': ['apartment', 'maisonette', 'house', 'accommodation', 'home'], 'garden': ['garden', 'yard'], 'location': ['location'] } self._noun_categories = programfiles.NounCategories(self._categories) self._pdata = programfiles.ExtractPropertyData('properties.txt', self._noun_categories) self._pos_tags = ['JJ', 'CD'] self._pdata.extract(self._pos_tags, penalty=0.5)