cosmel.repo.repo module

class cosmel.repo.repo.Repo(repo_root)[source]

Bases: object

The product repository class.

Parameters:repo_root (str) – the path to the folder containing data files.
infix_set

the infix word set.

Type:HeadSet
head_set

the head word set.

Type:InfixSet
brand_set

the brand set.

Type:BrandSet
bname_to_brand

the dictionary maps brand name to brand object.

Type:BName2Brand
product_set

the product set.

Type:ProductSet
id_to_product

the dictionary maps ID to product.

Type:Id2Product
brand_pname_to_product

the dictionary maps brand object and product name to product object.

Type:BrandPName2Product
bname_pname_to_product

the dictionary maps brand name and product name to product object.

Type:BrandPName2Product
pname_to_product_list

the dictionary maps product name to product object list.

Type:PName2ProductList
brand_head_to_product_list

the dictionary maps brand object and head word to product object list.

Type:BrandHead2ProductList
bname_head_to_product_list

the dictionary maps brand name and head word to product object list.

Type:BNameHead2ProductList
path

the root path of the repo.

Type:str