Metadata-Version: 2.3
Name: nlpfileio
Version: 0.1.1
Summary: An open-source Python library for CLI and NLP tasks
License: MIT
Keywords: cli,nlp,text,utilities
Author: Fatemeh Ahmadzadeh
Author-email: ahmadzade920@gmail.com
Requires-Python: >=3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click
Requires-Dist: click-config-file
Requires-Dist: click-help-colors
Requires-Dist: click-params
Requires-Dist: colorama
Requires-Dist: commonmark
Requires-Dist: pandas
Requires-Dist: pyfiglet
Requires-Dist: rich
Requires-Dist: setuptools
Requires-Dist: spacy
Requires-Dist: textblob
Description-Content-Type: text/markdown

# nlpfileio



**An open-source Python CLI tool for NLP tasks**

`nlpfileio` is a command-line interface library that simplifies natural language processing (NLP) tasks such as removing stopwords, normalizing text, stemming, and sentiment analysis.  
It is built with [Click](https://click.palletsprojects.com/) and provides an interactive, colorful CLI with configuration support.

---

## ✨ Features

- 📝 **Stopword Removal** — Remove stopwords using spaCy or TextBlob.  
- 🔄 **Text Normalization** — Clean and normalize sentences.  
- 🌱 **Stemming** — Perform stemming on sentences.  
- 😊 **Sentiment Analysis** — Get polarity & subjectivity for each sentence.  
- ⚙️ **Configurable** — Supports `config.ini` for default settings.  
- 🎨 **Interactive CLI** — Colorful, user-friendly prompts.  

---

## 📦 Installation

Install from PyPI (after publishing):

```bash
pip install nlpfileio
```
Then, download the required NLP resources (must be done once before first use):
``` bash
nlpfileio-download
```
Or install from source:

```bash
git clone https://github.com/Ahmadzadeh920/nlpcli-pakage-library.git
cd nlpcli-pakage-library
pip install .
```
---
## ⚡ Usage

The CLI tool is available as nlpfileio once installed.


Note: Before using nlpfileio for the first time, you must download the necessary NLP models and resources. Run:

```bash
  nlpfileio-download

```

Run it with an input file (.csv or .txt):
```bash
nlpfileio input.txt
```

---
## 🛠 Commands
### 1. Remove Stopwords
```bash
nlpfileio input.txt remove_stop_words
```
Removes stopwords and shows an example. Optionally save results.

### 2. Normalize Sentences

```bash
nlpfileio input.txt normalize
```
Normalizes text and saves to normalized_sentences.txt if desired.

### 3. Stem Sentences
```bash
nlpfileio input.txt stem
```
Applies stemming. Example and optional file export included.

### 4. Sentiment Analysis
```bash
nlpfileio input.txt sentiment
```
Computes sentiment for each sentence:

```bash
Sentence: I love open-source projects.
Polarity: 0.500, Subjectivity: 0.600
```
Exports results to sentiments_sentences.txt if selected.

---

## 📂 Project Structure
```bash

nlpfileio/
├── src/nlpclinlpfileio/
│   ├── cli.py          # CLI entry point
│   ├── services.py     # Core NLP functions
│   ├── config.ini      # Default configuration
│   └── __init__.py
├── tests/              # Unit tests
├── README.md           # Documentation
├── pyproject.toml      # Project metadata
└── poetry.lock

```
---

## ⚙️ Configuration

Default options can be stored in config.ini, automatically loaded by the CLI.

Example:
```bash
[settings]
language = en
output_format = txt
```

---

## 🧪 Development

Clone and install dependencies:

```bash

poetry install

```

Run tests:

```bash
poetry run pytest
```

---
## 🚀 Roadmap

Planned features and improvements:

- [ ] **Lemmatization** — Add support for lemmatizing words.  
- [ ] **Language Detection** — Automatically detect the language of input text.  
- [ ] **Additional Input Formats** — Support JSON, Excel, and other file types.  
- [ ] **Enhanced Visualization** — Use `rich` for better CLI output formatting.  


---
## 📜 License
This project is licensed under the MIT License

----

## 👩‍💻 Author

**Fatemeh Ahmadzadeh**  
- 📧 Email: [ahmadzade920@gmail.com](mailto:ahmadzade920@gmail.com)  
- 🌐 GitHub: [@Ahmadzadeh920](ahmadzadeh920.github.io)  
- 💼 LinkedIn: [Fatemeh Ahmadzadeh](https://www.linkedin.com/in/f-ahmadz/)  












