semvec/pypi-packages huggingface dataset:
mudes 0.4.0
Toxic Spans Prediction
Requires Python: >=3.6

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 
[![PyPI version](https://img.shields.io/pypi/v/mudes?color=%236ecfbd&label=pypi%20package&style=flat-square)](https://pypi.org/project/mudes/)
[![Downloads](https://pepy.tech/badge/mudes)](https://pepy.tech/project/mudes)
# MUDES - {Mu}ltilingual {De}tection of Offensive {S}pans

We provide state-of-the-art models to detect toxic spans in text. We have evaluated our models on  Toxic Spans task at SemEval 2021 (Task 5).

## Installation
You first need to install PyTorch. The recommended PyTorch version is 1.6.
Please refer to [PyTorch installation page](https://pytorch.org/get-started/locally/#start-locally) regarding the specific install command for your platform.

When PyTorch has been installed, you can install MUDES from pip. 

#### From pip

```bash
pip install mudes
```

## Pretrained MUDES Models

We will be keep releasing new models. Please keep in touch. We have evaluated the models on the trial set released for Toxic Spanstask at SemEval 2021.

| Models               | Average F1    |
|----------------------|:-------------:|
| en-base              | 0.6734        |
| en-large             | 0.6886        |
| multilingual-base    | 0.5953        |
| multilingual-large   | 0.6013        |

## Prediction
Following code can be used to predict toxic spans in text. Upon executing, it will download the relevant model and return the toxic spans.   

```python
from mudes.app.mudes_app import MUDESApp

app = MUDESApp("en-large", use_cuda=False)
print(app.predict_toxic_spans("You motherfucking cunt", spans=True))

```

## System Demonstration
An experimental demonstration interface called MUDES-UI has been released on [GitHub](https://github.com/TharinduDR/MUDES-UI) and can be checked out in [here](http://rgcl.wlv.ac.uk/mudes/).


## Citing & Authors
If you are using this repo, please consider citing these papers.

```bash
@inproceedings{ranasinghemudes,
 title={{MUDES: Multilingual Detection of Offensive Spans}}, 
 author={Tharindu Ranasinghe and Marcos Zampieri},  
 booktitle={Proceedings of NAACL},
 year={2021}
}
```

```bash
@inproceedings{ranasinghe2021semeval,
  title={{WLV-RIT at SemEval-2021 Task 5: A Neural Transformer Framework for Detecting Toxic Spans}},
  author = "Ranasinghe, Tharindu  and Sarkar, Diptanu and Zampieri, Marcos and Ororbia, Alex",
  booktitle={Proceedings of SemEval},
  year={2021}
}
```
statsflow 0.0.1
This Python package consist of various statistical modules and function that can be  very useful for data preprocessing,data transformation,EDA and seamlessly improves the performance of Ml-Pipeline
Requires Python: >=3.9
Keywords: statistics,plotting,probplot,data transformation

# StatsFLow Library

[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)                 
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)   

## Functionality of the StatsFLow
- This Python package consist of various statistical modules and function that can be  very
useful for data preprocessing,data transformation,EDA and seamlessly improves the performance of Ml-Pipeline.

## Usage

- Make sure you have Python installed in your system.
- Run Following command in the CMD.
```
  pip install statsflow
```
## Example for  probplot_transform() function

```
# importing the data  
df=pd.read_csv("data/UCI_Credit_Card.csv")
df.head()
 ```

```
#import probplot_transform function
from statsflow import probplot_transform

```

```
# apply the probplot_transform function

df['bill']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='default')




```
<img src="https://github.com/ragulslrk/img/blob/main/default.png">


# Apply the probplot_transform function with various transformation['log','box_cox','recip','sqrt','expo']

```
#Exponential transformation
df['bill_expo']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='expo')
```
<img src="https://github.com/ragulslrk/img/blob/main/expo.png">


```
#Square root transformation
df['bill_sqrt']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='sqrt')
```
<img src="https://github.com/ragulslrk/img/blob/main/sqrt.png">

```
# Box-cox  transformation
df['bill_box_cox']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='box_cox')
```
<img src="https://github.com/ragulslrk/img/blob/main/box-cox.png">

```
# Logarithmic Transformation
df['bill_log']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='log')
```
<img src="https://github.com/ragulslrk/img/blob/main/logarthimic.png">

```
#Reciprocal Transformation 
df['bill_log']=probplot_transform(feature=df['LIMIT_BAL'],trans_method='recip')

```
<img src="https://github.com/ragulslrk/img/blob/main/recip.png">


## Note 
-For Initial version i have only include the probplot_transform function.soon i will try to implement new statistical functions.

## Probplot Transform Function:
### Description:
This function used to interpret whether the given data follows normal distribution by using histogram and probplot. if the data not follows normal distribution then with the help of the trans_method param it can transform the data using Box-Cox,Logarithmic,Reciprocal,Square Root,Exponential Transformation.

## Args: 
[feature(pd.Series),trans_method('default','log','box_cox','recip','sqrt','expo')]