Persian Reverse Dictionary
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. 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
- Clone the repository.
- Install the required libraries.
- Import the
PreTrainedPipeline
class from the script. - Instantiate the pipeline object with the path to the directory where the saved model and other required files are located.
- Call the pipeline object on an input sentence.
Here's an example usage:
from pipeline import PreTrainedPipeline
pipeline = PreTrainedPipeline("path/to/directory")
result = pipeline("وسیله حمل و نقل پرنده.")
print(result)
Inference API (serverless) does not yet support generic models for this pipeline type.