Update readme
#3
by
alighadami77
- opened
README.md
CHANGED
|
@@ -18,4 +18,39 @@ widget:
|
|
| 18 |
example_title: "کتاب"
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# Persian Reverse Dictionary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
example_title: "کتاب"
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# Persian Reverse Dictionary
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
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.
|
| 25 |
+
|
| 26 |
+
## Dataset
|
| 27 |
+
|
| 28 |
+
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.
|
| 29 |
+
|
| 30 |
+
## Overall
|
| 31 |
+
|
| 32 |
+
| Metric | Value |
|
| 33 |
+
|--------|-------|
|
| 34 |
+
| Top-10 accuracy | 16.72% |
|
| 35 |
+
| Top-100 accuracy | 33.89% |
|
| 36 |
+
| Top-10 Synonyms accuracy | 42.19% |
|
| 37 |
+
| Top-100 Synonyms accuracy | 62.72% |
|
| 38 |
+
|
| 39 |
+
## How to use
|
| 40 |
+
|
| 41 |
+
1. Clone the repository.
|
| 42 |
+
2. Install the required libraries.
|
| 43 |
+
3. Import the `PreTrainedPipeline` class from the script.
|
| 44 |
+
4. Instantiate the pipeline object with the path to the directory where the saved model and other required files are located.
|
| 45 |
+
5. Call the pipeline object on an input sentence.
|
| 46 |
+
|
| 47 |
+
Here's an example usage:
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
from my_pipeline import PreTrainedPipeline
|
| 51 |
+
|
| 52 |
+
pipeline = PreTrainedPipeline("path/to/directory")
|
| 53 |
+
|
| 54 |
+
result = pipeline("وسیله حمل و نقل پرنده.")
|
| 55 |
+
|
| 56 |
+
print(result)
|