semvec/pypi-packages huggingface dataset:
prsaw2 0.42
Stands for Python random api wrapper version 2.
Requires Python: >=3.6
Keywords: python,api,rsa

# prsaw2
Simple python API wrapper for the Random Stuff API.

- Easy to use
- Wraps the entire API
- Supports both async and sync
- Supports v2, v3 and v4 version of API

- **[PyPi Package](https://pypi.org/project/prsaw2)**
- **[Documentation](https://flampt.gitbook.io/prsaw2)**

## Installation
Installation can be done easily using the python package manager `pip`
```bash
pip install prsaw2
```

## Quickstart
Firstly make sure to [get the API key from here](https://api.pgamerx.com/register)

Here are few examples to get you started.

### Getting AI response
```py
import prsaw2

client = prsaw2.Client(key='api-key-here')

response = client.get_ai_response("Hi there")
client.close()  # Not necessary
print(response)
```

### Getting random joke
```py
import prsaw2

client = prsaw2.Client(key='api-key-here')

response = client.get_joke(type="any")
client.close()  # Not necessary
print(response.joke)
```

### Getting random image
```py
import prsaw2

client = prsaw2.Client(key='api-key-here')

response = client.get_image(type="any")
client.close()
print(response)
```

## Async Support
The library also supports async usage.
```py
import prsaw2
import asyncio

client = prsaw2.AsyncClient(key="api-key-here")

async def coro():
  response = await client.get_ai_response("Hello world")
  await client.close()  
  print(response)

loop = asyncio.get_event_loop()
loop.run_until_complete(coro())
```
extract-wiki-words 0.1.1
Script to extract words from Wikipedia dump files and create dictionaries.

# extract_wiki_words - Extract words from Wikipedia dumps and create dictionaries
This script can extract words from Wikipedia XML dumps and create dictionaries.

Install `extract_wiki_words` on your system using : 

```
pip install extract-wiki-words
```

Usage of the script to create a dictionary from a Wikipedia dump (https://dumps.wikimedia.org):

```
extract_wiki_words frwiki-20210520-pages-articles-multistream.xml
```
xinaprocessor 0.41
Xina processing library

Xina Processor
----------------
.. image:: ./imgs/logo.png
   :width: 400
   :alt: Xina AI

Xina Processor is an open source library for cleaning Arabic text. It includes various cleaning functions as well as modules for streaming file and folder cleaning.

Installation
==============

=====
PIP
=====

If you use `pip`, you can install xinaprocessor with:

.. code:: bash

   pip install xinaprocessor

==============
From source
==============

You can directly clone this repo and install the library. First clone the repo with:

.. code:: bash

   git clone https://github.com/xina-ai/xinaprocessor.git

Then cd to the directory and install the library with:

.. code:: bash

   pip install -e .

Documentation
================

Documentation is still in process here: https://xina-ai.github.io/xinaprocessor/


Getting Started
================

.. code:: python

   from xinaprocessor import cleaners 



To clean text

.. code:: python

   Text = "نص عربي!"
   Cleaner = cleaners.TextCleaner(text=Text)
   Cleaner.keep_arabic_only()



To clean text File

.. code:: python

   # Creating File MyData.txt
   FilePath = "MyData.txt"
   with open(FilePath, "w") as f:
      f.write("Aالسطر الأول\nالسطر الثاني!")
   # Creating FileCleaner object
   Cleaner = cleaners.FileCleaner(filepath=FilePath)
   Cleaner.remove_english_text().remove_arabic_numbers().remove_punctuations()
   # To access the resulted data
   CleanedData = Cleaner.lines # the result will look like ['السطر الأول', 'السطر الثاني']
   CleanedText = Cleaner.text # the result will look like 'السطر الأول\nالسطر الثاني'
   # To save the proccessed/cleaned text to a file 
   Cleaner.save2file('CleanedData.txt', encoding='utf-8')

To clean large text File

.. code:: python

   # This Cleaner is used for large text files, the cleaned texts will be saved to CleanedFile.txt file
   FilePath = "MyData.txt"
   CleanedPath = "CleanedFile.txt"
   Cleaner = cleaners.FileStreamCleaner(filepath=FilePath, savepath=CleanedPath)
   Cleaner.remove_hashtags().remove_honorific_signs().drop_empty_lines().clean()