{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0COUNTRY_KEYITEM_DESCBARCODEBEM_CLASS_KEYBEM_CLASS_DESC_FRprediction
00FRA150ML SECHE VERNIS VITRY35388925260341964DIVERS MAQUILLAGEmaquillage des ongles
11FRA15COM.SOMMEIL TRIPLE ACTI.PURE37010568034431964DIVERS MAQUILLAGEmaquillage
22FRA2 EPONG.DEMAQUILLER N°42 SANOD37015095804261964DIVERS MAQUILLAGEautres produits maquillage
33FRA200ML DIFF PFUM FIGUE CDP35517801640331964DIVERS MAQUILLAGEmaquillage
44FRA2PCS EPONGE DEMAQUILLANTE32765582202531964DIVERS MAQUILLAGEautres produits maquillage
\n", "
" ], "text/plain": [ " Unnamed: 0 COUNTRY_KEY ITEM_DESC BARCODE \\\n", "0 0 FRA 150ML SECHE VERNIS VITRY 3538892526034 \n", "1 1 FRA 15COM.SOMMEIL TRIPLE ACTI.PURE 3701056803443 \n", "2 2 FRA 2 EPONG.DEMAQUILLER N°42 SANOD 3701509580426 \n", "3 3 FRA 200ML DIFF PFUM FIGUE CDP 3551780164033 \n", "4 4 FRA 2PCS EPONGE DEMAQUILLANTE 3276558220253 \n", "\n", " BEM_CLASS_KEY BEM_CLASS_DESC_FR prediction \n", "0 1964 DIVERS MAQUILLAGE maquillage des ongles \n", "1 1964 DIVERS MAQUILLAGE maquillage \n", "2 1964 DIVERS MAQUILLAGE autres produits maquillage \n", "3 1964 DIVERS MAQUILLAGE maquillage \n", "4 1964 DIVERS MAQUILLAGE autres produits maquillage " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "df = pd.read_csv(\"dataset/data_maquillage.csv\")\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from traning_zone.classe_prediction.prediction_classe import *" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\coulibab\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\spacy\\util.py:887: UserWarning: [W095] Model 'fr_pipeline' (0.0.0) was trained with spaCy v3.6 and may not be 100% compatible with the current version (3.5.3). If you see errors or degraded performance, download a newer compatible model or retrain your custom model with the current spaCy version. For more details and available updates, run: python -m spacy validate\n", " warnings.warn(warn_msg)\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
item_descclassehyper classe
0KID KITTY FEMME BETY NAILMATIdouches{'Confiserie': 0.10790520906448364, 'Soins Che...
\n", "
" ], "text/plain": [ " item_desc classe \\\n", "0 KID KITTY FEMME BETY NAILMATI douches \n", "\n", " hyper classe \n", "0 {'Confiserie': 0.10790520906448364, 'Soins Che... " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#X = df.ITEM_DESC\n", "X = pd.DataFrame({\"X\" : [\"KID KITTY FEMME BETY NAILMATI\"]})\n", "X = X.X\n", "pred = PredictionV(X)\n", "data = pred.prediction(\"spacy_lm\")\n", "data" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.3" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }