Bosala algorithme pona ko classer ensemble ya bilamba donnée.
Etape 1: Limbola ba catégories pona bilamba, pona ensemble oyo epesami ba catégories ekoki kozala: Top wear, Bottom Wear, and Accessories Etape 2: Kosala dictionnaire ya pamba na ba clés lokola ba catégories pe valeur lokola liste oyo ekozala na bilamba oyo ezali ya yo na catégorie oyo etali yango. ``` Clothes_Categorized = {"Top Wear":[], "Bottom Wear":[], "Accessories":[]} ``` Etape 3: Kozongela na nzela ya eloko moko na moko na ensemble epesami 'Bilamba' Etape 4: Mpo na eloko mokomoko, koyeba lolenge nini ekɔti na yango na kotalaka bizaleli ya eloko yango. Etape 5: Soki eloko yango ezali kolata ya likoló (kazaka ya mbula, chandail, veste), na nsima bakisa yango na liste oyo ekokani na yango ya diksionɛrɛ. ``` soki elamba_item na ["raincoat", "sweater", "veste"]: Clothes_Categorized["Top Wear"].append(cloth_item) ``` Etape 6: Soki eloko ezali kolata na nse (pantalon ya jogging), na nsima, bakisá yango na liste oyo ekokani na yango ya diksionɛrɛ yango. ``` elif cloth_item na ["jogging pants"]: Clothes_Categorized["Bottom Wear"].append(cloth_item) ``` Etape 7: Soki eloko ezali accessoire (parapluie), sima bakisa yango na liste correspondante ya diksionere. ``` else: Clothes_Categorized["Accessories"].append(cloth_item) ``` Etape 8: Zongela matambe 4 kino 7, mpo na eloko moko na moko na ensemble ya Bilamba Etape 9: Diksionɛrɛ Clothes_Categorized ezali sikoyo na biloko nyonso ya bilamba oyo ekabolami na biteni Etape 10: Nsuka