--- pipeline_tag: text-classification library_name: generic metrics: - accuracy tags: - reverse-dictionary widget: - text: "جایی دارای کلاس‌های متعدد با امکانات آموزشی که در آن کودکان، نوجوانان، و جوانان زیر نظر معلمان آموزش‌های لازم را بر اساس برنامه درسی فرا می‌گیرند. محل درس دادن و علم آموختن." example_title: "مدرسه" - text: "بخش سخت و محکم در دهان جانوران که عمل جویدن را انجام می‌دهد" example_title: "دندان" - text: "زبانی از شاخۀ زبان‌های هندوایرانی که در ایران ، افغانستان و تاجیکستان رایج است." example_title: "فارسی" - text: "حالتی توأم با آسایش و آرامش که بر اثر از کار بازماندن حواس ظاهر در انسان و حیوان پدید آید" example_title: "خواب" - text: "مجموعه‌ای از نوشته‌ها یا تصاویر بر روی ورق‌های نازک، به صورت خطی یا چاپی، صحافی شده، و دارای جلد" example_title: "کتاب" --- # Persian Reverse Dictionary ![Picture](pic1.png) This project aims to create a Persian reverse dictionary model that suggests a word based on our input explanations. This model is based on Transformer encoders and uses fast text embedding. ## Dataset The dataset used in this work is from [this link](https://www.kaggle.com/malekzadeharman/persian-reverse-dictionary-dataset). This dataset contains 855,217 data from Amid, Moein, and Dehkhoda dictionaries plus Farsnet and Persian Wikipedia. ## Overall | Metric | Value | |--------|-------| | Top-10 accuracy | 16.72% | | Top-100 accuracy | 33.89% | | Top-10 Synonyms accuracy | 42.19% | | Top-100 Synonyms accuracy | 62.72% | ## How to use 1. Clone the repository. 2. Install the required libraries. 3. Import the `PreTrainedPipeline` class from the script. 4. Instantiate the pipeline object with the path to the directory where the saved model and other required files are located. 5. Call the pipeline object on an input sentence. Here's an example usage: ```python from pipeline import PreTrainedPipeline pipeline = PreTrainedPipeline("path/to/directory") result = pipeline("وسیله حمل و نقل پرنده.") print(result) ```