WildHack 2021
Nuclear Foxes Team
This repo contains our project for the Wildberries Hackathon 2021.
Task 2: Searching tags
Implement an algorithm of recommendation hints, which reduces the search for the desired products in the system.
Prerequirements
Natasha- for
Navecsetup we use this model python-telegram-bot
Project structure
embeddings_prep.pyis used for lemmatizing text words and mapping to their embedding representation. We useNatashalibrary.popularity.pyis used for mapping words to their popularity.bot.pyis used for launching bot.metrics.pyis our small file to separate the cosine similarity metric we use from the rest of the project.
Launch order
pip install requirements.txtin order to install all the required libraries.- Launch
popularity.pyto createpopularity.pklcontaining information about possible tags' relative 'popularity'. - Launch
embeddings_prep.pyto createembeddings.pklcontaining information about possible tags' embeddings. - Launch
bot.pyand input your bot token to launch Telegram bot with your token which would allow you to get tags for you queries based on results of previous steps.
However, this repo also contains our pretrained version of the solution (the required for bot.py .pkl files) so it can be used out-of-box by installing required dependances, setuping Navec and simply running bot.py. Still, feel free to go into both embeddings_prep.py and popularity.py to try to tune some parameters.