semvec/pypi-packages huggingface dataset:
araugment 1.0.0
Augment Arabic data for deep learning tasks
License: MIT
Requires Python: >=3.6
Keywords: arabic,arabic nlp,nlp

# araugment
### Version 1.0.0

Augment Arabic data for deep learning tasks

## There are two methods in this library 
- back_translate: Translate text to a foreign language then translate back to original language to augment data
- markov: This method uses Markov chains to string together n new sequences of words based on previous sequences.

Installation
====
```
pip install araugment
```
***
  
  
Usage
=====
### Back Translate
```python
from araugment import back_translate
text = "بلغت العربية بفضل القرآن من الاتساع مدىً لا تكاد تعرفه أي لغة أخرى من لغات الدنيا"

#default value for original is "ar" which stands for Arabic
print(back_translate(text, original="ar", target="en"))
-> 'اللغة العربية بفضل القرآن من التوسع لا تحدد تقريبا بأي لغة أخرى'

```

### Markov Chains
```python
from araugment import markov
text = pd.read_csv('test.tsv', sep="\t", encoding='utf-8')
doc = text.loc[text.Target == "Neutral", 'Text'].tolist()
print(markov(doc, 5))
-> ['الخاص مليان سنين دون فاءده اتصلوا علي العملاء بلاغ رقم ومتاكده بلاغي مو اول واحد',
 'السلام عليكم عندي مشكله لي اسبوع رافعه طلب و لم يتم حل المشكله و البلاغ الحين ضمن البلاغات المغلقه',
 'و الله دخلته كذا بس مع هيك تعودنا نمد السلام',
 'سواق يمني جده توصيل مشاوير الحويه الطايف مكه جده وضواحيهابسعار مخفضه لتواصل خاص او واتساب',
 'ازمه كورونا يارب رحمتك بس']

```
***

License
====
araugment is licensed under the MIT License. The terms are as follows:  

```
MIT License  

Copyright (c) 2021 ashaheedq  

Permission is hereby granted, free of charge, to any person obtaining a copy  
of this software and associated documentation files (the "Software"), to deal  
in the Software without restriction, including without limitation the rights  
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell  
copies of the Software, and to permit persons to whom the Software is  
furnished to do so, subject to the following conditions:  

The above copyright notice and this permission notice shall be included in all  
copies or substantial portions of the Software.  

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  
SOFTWARE.  
```
abeec 0.3
abeec: a library to perform approximate bayesian computation
License: MIT
Requires Python: >=3.0

# abeec 🐝 --- an ABC sampler
----------------------------------------------------------------

`abeec` is a sampler to perform Approximate Bayesian Computation (ABC) --- i.e., likelihood free posterior inference! It is based on the algorithm presented in [Ishida et al. (2015)](https://arxiv.org/abs/1504.06129).

**Author**: Nestor Espinoza (nespinoza@stsci.edu)

## Statement of need
While for Cosmological applications an ABC sampler has already been published by the team of Ishida et al (`cosmoabc` --- [check their repository!](https://github.com/COINtoolbox/CosmoABC)), 
there was a need to develop a more general scheme to allow some flexibility to the sampler. For instance, doing arbitrary prior distributions (e.g., with priors that might be correlated) 
was not straightforward to implement, as well as have external functions for distances and simulators that could all benefit from a common parallelization scheme. On top of that, I wanted 
a simple sampler that used the most basic `python` libraries (e.g., `numpy` and `scipy`) at its core. That's where `abeec` comes into place.

## Using the library
To perform ABC on a given dataset, you need three ingredients:

1. A `prior` from which to draw points.
2. A `distance` to compute distances from simulated datasets to your dataset.
3. And a `simulator`, to simulate datasets to compare against your dataset.

In `abeec`, it is expected the user will provide **_classes_** defining the `prior`, the `distance` and the `simulator`. All the sampler does it take those and apply the iterative importance 
sampling scheme outlined in [Ishida et al. (2015)](https://arxiv.org/abs/1504.06129), giving back a sample from the posterior. Once those classes are written, one might simply run the 
sampler as:

        import abeec
        from your_script import prior, distance, simulator

        samples = abeec.sample(prior, distance, simulator)

The best is to check the examples under `examples`.

## Installation
Installation is as simple as:

        python setup.py install

Or via PyPi:

        pip install abeec

## Licence and attribution

Read the `LICENCE` file for licencing details on how to use the code. If you make use of this code, please cite [Ishida et al. (2015)](https://arxiv.org/abs/1504.06129) and link back 
to this repository.