Metadata-Version: 2.1
Name: quesans
Version: 0.0.1
Summary: Deep Learning based Questions Answering package
Home-page: https://github.com/DamithDR/QuestionAnswering
Author: Damith Premasiri
Author-email: damithpremasiri@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: transformers (==4.16.2)
Requires-Dist: tensorboard
Requires-Dist: datasets (==1.18.3)
Requires-Dist: numpy (==1.22.2)
Requires-Dist: pandas (==1.4.0)
Requires-Dist: tqdm (==4.62.3)
Requires-Dist: farasapy
Requires-Dist: PyArabic (~=0.6.14)


# QuestionAnswering : Qur'an Question Answering with Transformers

Transformers based approach for question answering in Qur'an which employs transfer-learning, ensemble-learning across multiple models.

## Installation
You first need to install Java for the evaluation script which uses `farasapy` and the desired version is Java8. 
Please refer [Oracle installation guide](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html) for more details on installing JDK for different platforms.

Then you need to install PyTorch. The recommended PyTorch version is 1.11.0
Please refer to [PyTorch installation page](https://pytorch.org/get-started/locally/#start-locally) for more details specifically for the platforms.

When PyTorch has been installed, you can install requirements from source by cloning the repository and running:

```bash
git clone https://github.com/DamithDR/QuestionAnswering.git
cd QuestionAnswering
pip install -r requirements.txt
```

## Experiment Results
You can easily run experiments using following command and altering the parameters as you wish

```bash
python -m examples.arabic.quran.quran_question_answering --n_fold=1 --transfer_learning=False --self_ensemble=False --models=camelmix,arabert
```

## Parameters
Please find the detailed descriptions of the parameters
```text
n_fold              : Number of executions expected before self ensemble
transfer_learning   : On/Off transfer learning
self_ensemble       : On/Off self ensembling
models              : comma seperated model tags
```

## Model Tags
```text
arabert             : aubmindlab/bert-base-arabertv2
mbertcased          : bert-base-multilingual-cased
mbertuncased        : bert-base-multilingual-uncased
camelmix            : CAMeL-Lab/bert-base-arabic-camelbert-mix
camelca             : CAMeL-Lab/bert-base-arabic-camelbert-ca
araelectradisc      : aubmindlab/araelectra-base-discriminator
araelectragen       : aubmindlab/araelectra-base-generator
```



