NALP: Natural Adversarial Language Processing
Welcome to NALP.
Have you ever wanted to create natural text from raw sources? If yes, NALP is for you! This package is an innovative way of dealing with natural language processing and adversarial learning. From bottom to top, from embeddings to neural networks, we will foster all research related to this new trend.
Use NALP if you need a library or wish to:
- Create your embeddings;
- Design or use pre-loaded state-of-art neural networks;
- Mix-and-match different strategies to solve your problem;
- Because it is cool to play with text.
Read the docs at nalp.readthedocs.io.
NALP 3.0.0 requires Python 3.11+ and is tested on Python 3.11 through 3.13.
Package guidelines
- The very first information you need is in the very next section.
- Installing is also easy if you wish to read the code and bump yourself into, follow along.
- Note that there might be some additional steps in order to use our solutions.
- If there is a problem, please do not hesitate, call us.
Getting started: 60 seconds with NALP
First of all. We have examples. Yes, they are commented. Just browse to examples/, chose your subpackage, and follow the example. We have high-level examples for most tasks we could think of.
Alternatively, if you wish to learn even more, please take a minute:
NALP is based on the following structure, and you should pay attention to its tree:
- nalp
- core
- corpus
- dataset
- encoder
- model
- corpus
- audio
- sentence
- text
- datasets
- image
- language_modeling
- encoders
- integer
- word2vec
- models
- discriminators
- conv
- embedded_text
- linear
- lstm
- text
- generators
- bi_lstm
- conv
- gru
- gumbel_lstm
- gumbel_rmc
- linear
- lstm
- rmc
- rnn
- stacked_rnn
- layers
- gumbel_softmax
- multi_head_attention
- relational_memory_cell
- dcgan
- gan
- gsgan
- maligan
- relgan
- seqgan
- wgan
- utils
- constants
- loader
- logging
- preprocess
Core
The core is the core. Essentially, it is the parent of everything. You should find parent classes defining the basis of our structure. They should provide variables and methods that will help to construct other modules.
Corpus
Every pipeline has its first step, right? The corpus package serves as a basic class to load raw text, audio and sentences.
Datasets
Because we need data, right? Datasets are composed of classes and methods that allow preparing data for further neural networks.
Encoders
Text or Numbers? Encodings are used to make embeddings. Embeddings are used to feed into neural networks. Remember that networks cannot read raw text; therefore, you might want to pre-encode your data using well-known encoders.
Models
Each neural network architecture is defined in this package. From naïve RNNs to BiLSTMs, from GANs to TextGANs, you can use whatever suits your needs.
Utils
This is a utility package. Common things shared across the application should be implemented here. It is better to implement once and use it as you wish than re-implementing the same thing over and over again.
Installation
NALP is published on PyPI. Add it to a project managed by uv with:
uv add nalp
For a consumer installation in an existing Python environment, pip is also supported:
pip install nalp
Development
Clone the repository, then use the locked uv environment for all project tasks:
git clone https://github.com/gugarosa/nalp.git
cd nalp
uv sync --locked
uv run pytest
uv run pre-commit run --all-files
uv build
Releases are built and published to PyPI by the release workflow.
Environment configuration
Note that sometimes, there is a need for additional implementation. If needed, from here, you will be the one to know all of its details.
Ubuntu
No specific additional commands needed.
Windows
No specific additional commands needed.
MacOS
No specific additional commands needed.
Support
We know that we do our best, but it is inevitable to acknowledge that we make mistakes. If you ever need to report a bug, report a problem, talk to us, please do so! We will be available at our bests at this repository or gustavo.rosa@unesp.br.
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 nalp-3.0.0.tar.gz.
File metadata
- Download URL: nalp-3.0.0.tar.gz
- Upload date:
- Size: 37.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c82002e3669acebcb35eff15c48a3bfd1c6522d78665252cd1666938e12d032e
|
|
| MD5 |
72103bc6062b79110ed4bd4c2125e36f
|
|
| BLAKE2b-256 |
3562555131e1cddef0b1ba06a62e1397b070a44d27d8d4b4bcd1fefecce0cd9d
|
File details
Details for the file nalp-3.0.0-py3-none-any.whl.
File metadata
- Download URL: nalp-3.0.0-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92cf60d770b88700b190c62d2cdb62226a23206f7cca8b9bbc82accc14a0c65d
|
|
| MD5 |
2e031ba50c737264034e3a6bd080cc63
|
|
| BLAKE2b-256 |
f88876c2f09dd711df6cb229d560017002502389c44628f73624487ec2b374b2
|