コード例 #1
0
ファイル: product.py プロジェクト: qelper/record_linkage
 def __init__(self, p_json):
     p_json = p_json.lower()
     p_dict = json.loads(p_json)
     self.product_name = p_dict.get("product_name", "")
     self.manufacturer = p_dict.get("manufacturer", "")
     self.model = p_dict.get("model", "")
     self.family = p_dict.get("family", "")
     self.announce_date = p_dict.get("announce_date", "")
     self.tokens = tokenize_and_normalize(self.product_name)
コード例 #2
0
ファイル: listing.py プロジェクト: qelper/record_linkage
 def __init__(self, l_json):
   l_json = l_json.lower()
   self.l_dict = json.loads(l_json)
   self.title = self.l_dict.get('title', '')
   self.manufacturer = self.l_dict.get('manufacturer', '')
   self.currency = self.l_dict.get('currency', '')
   self.price = self.l_dict.get('price', '')
   self.tokens = tokenize_and_normalize(self.title)
   #TODO: add complex tokens separately i.e. different combinations
   self.possible_products = []