wolof is a python library for the Wolof language
Project description
Library, built on PyTorch and Transformers, for developing state-of-the-art deep learning models on a wide variety of linguistic tasks in wolof.
Your Library for Wolof Language
Wolof is a language spoken in Senegal in neighboring countries, many works are written in Wolof or the need to have a tool that allows us to know better this language.
Wolof library allows us to do several specific tasks in Wolof languages such as text classification, translation, automatic speech recognition.
Why Wolof library ?:
- simple and easy to use
- customizable
- clean code
Installation
Requirements
- Python >= 3.6
- Torch
- Transformers
With pip
wolof can be installed using pip as follows:
pip install wolof
From source
pip install git+https://github.com/abdouaziz/wolof.git
Usage
from wolof.asr import Speech2Text
asr = Speech2Text(model_name="abdouaziiz/wav2vec2-xls-r-300m-wolof")
audio_file = "audio.wav"
prediction = asr.predict(audio_file)
Pipeline
The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of the complex code from the library,offering a simple API dedicated to several tasks Masked Language Modeling, Sentiment Analysis .
bert-base-wolof is pretrained bert-base model on wolof language . sora-wolof is pretrained roberta model on wolof language .
Models in Wolof library
| Model name | Number of layers | Attention Heads | Embedding Dimension | Total Parameters |
|---|---|---|---|---|
bert-base-wolof |
6 | 12 | 514 | 56931622 M |
soraberta-base |
6 | 12 | 514 | 83 M |
Using Soraberta or BERT-base-wolof
>>> from wolof import Pipeline
>>> unmasker = Pipeline(task='fill-mask', model_name='abdouaziiz/bert-base-wolof')
>>> unmasker("kuy yoot du [MASK].")
[{'sequence': '[CLS] kuy yoot du seqet. [SEP]',
'score': 0.09505125880241394,
'token': 13578},
{'sequence': '[CLS] kuy yoot du daw. [SEP]',
'score': 0.08882280439138412,
'token': 679},
{'sequence': '[CLS] kuy yoot du yoot. [SEP]',
'score': 0.057790059596300125,
'token': 5117},
{'sequence': '[CLS] kuy yoot du seqat. [SEP]',
'score': 0.05671025067567825,
'token': 4992},
{'sequence': '[CLS] kuy yoot du yaqu. [SEP]',
'score': 0.0469999685883522,
'token': 1735}]
for task we can have the following values: 'fill-mask', 'sentiment-analysis'
You can checkout examples in examples/
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wolof-0.0.3.tar.gz.
File metadata
- Download URL: wolof-0.0.3.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82344813bf85b74d35f9bfbb9d2f632e1219311cfb70606ebad3df9303d3dcc9
|
|
| MD5 |
83f3c7663d5b6b83bd7e2d3cfa58afb2
|
|
| BLAKE2b-256 |
32fc80d2245d5a9daac53d59e06a59c1ef73786954ae2dc40c0847b4d3cea706
|
File details
Details for the file wolof-0.0.3-py3-none-any.whl.
File metadata
- Download URL: wolof-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
985a597b7bb77e249c7dea175718ec294c6f51138089f2bea8acc32f9d742a84
|
|
| MD5 |
259431a736c589902d8b1fc7f26871f9
|
|
| BLAKE2b-256 |
a0ce9a24e2c602cf6e61f21e8ff7edf942531929e7e51b23aaee61a575a398b4
|