An open API service indexing awesome lists of open source software.

https://github.com/rajtilak-2020/text-file-analysis

It is a Python script that processes text files to provide statistics such as line count, character count, word count, unique words, and special character count.
https://github.com/rajtilak-2020/text-file-analysis

analysis python python-script text-analysis

Last synced: 3 months ago
JSON representation

It is a Python script that processes text files to provide statistics such as line count, character count, word count, unique words, and special character count.

Awesome Lists containing this project

README

        

# Text Analyzer 📝

**Text Analyzer** is a Python script that processes text files to provide statistics such as line count, character count, word count, unique words, and special character count.

---

## 📜 Features

- **Line Count** 📄: Calculates the total number of lines in the text file.
- **Character Count** 🔤: Counts the total number of characters (excluding spaces and newlines).
- **Word Statistics** ✍️: Provides the total and unique word count.
- **Special Characters** ❗: Counts the occurrence of special characters like punctuation.

---

## 🔧 Usage

1. Clone the repository:
```bash
git clone https://github.com/rajtilak-2020/Text-Analyzer.git
```
2. Navigate to the project directory:
```bash
cd Text-Analyzer
```
3. Run the script with a text file as an argument:
```bash
python text_analyzer.py
```
Example:
```bash
python text_analyzer.py sample.txt
```

---

## 📂 Output

The script outputs the following statistics in JSON format:

- Total Lines
- Total Characters
- Total Words
- Unique Words
- Special Characters

Example:
```json
{
"total_lines": 10,
"total_characters": 200,
"total_words": 45,
"unique_words": 30,
"special_characters": 15
}
```

---

## ✨ Contributing

Contributions are welcome! If you have ideas for improving this script, feel free to fork the repo and submit a pull request. 🚀

---

## 🌟 Connect with Me

- **GitHub**: [@rajtilak-2020](https://github.com/rajtilak-2020)
- **LinkedIn**: [Connect with me](https://linkedin.com/in/krajtilak2020)
- **Twitter**: [Follow me](https://twitter.com/2020rajtilak)

---

## 📜 License

This project is licensed under the [MIT License](LICENSE).

---

## 💖 Show Your Support

If you like this project, give it a ⭐ on [GitHub](https://github.com/rajtilak-2020/Text-Analyzer)! 😊