PerSent


NamePerSent JSON
Version 1.3.3 PyPI version JSON
download
home_pagehttps://github.com/RezaGooner/PerSent
SummaryPersian Sentiment Analysis Toolkit
upload_time2025-08-22 19:53:03
maintainerNone
docs_urlNone
authorRezaGooner
requires_python>=3.8
licenseNone
keywords persian sentiment analysis nlp
VCS
bugtrack_url
requirements hazm gensim scikit-learn pandas tqdm joblib
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PerSent (Persian Sentiment Analyzer) 

[![Persian](https://img.shields.io/badge/Persian-فارسی-blue.svg)](README.fa.md)

![PerSent Logo](https://github.com/user-attachments/assets/6bb1633b-6ed3-47fa-aae2-f97886dc4e22)

## Introduction
PerSent is a practical Python library designed for Persian sentiment analysis. The name stands for "Persian Sentiment Analyzer". Currently in its early testing phase, the library provides basic functionality and is available on [PyPI](https://pypi.org/project/PerSent/). Install it using:

```bash
pip install PerSent
```

Current capabilities include:

- Sentiment analysis of opinions/comments

- Emotion analysis of texts (happiness, sadness, anger, surprise, fear, disgust, calmness)

- Analysis of product/service reviews (recommended/not recommended/no idea)

- Both single-text and batch CSV processing

- Output displayed in terminal or saved to CSV with summary statistics

Initial repository that evolved into this library:
[Click here](https://github.com/RezaGooner/Sentiment-Survey-Analyzer)

We welcome user testing and feedback to improve the library. If you encounter bugs or have suggestions, please:

- [Contribute](#contribution)

For installation issues due to dependency conflicts (especially with mingw-w64), consider using online platforms like DeepNote.com.

## Structure
### Comment Analysis Functions

```train(train_csv, test_size=0.2, vector_size=100, window=5)```

| Parameter     | Data Type | Default Value | Description                                                                 | Optional/Required |
|--------------|-----------|---------------|-----------------------------------------------------------------------------|-------------------|
| `train_csv`  | str       | -             | Path to CSV file containing training data with `body` and `recommendation_status` columns | Required          |
| `test_size`  | float     | 0.2           | Proportion of test data (between 0.0 and 1.0)                               | Optional          |
| `vector_size`| int       | 100           | Output vector dimension for Word2Vec model (embedding size)                 | Optional          |
| `window`     | int       | 5             | Context window size for Word2Vec model                                      | Optional          |

recommendation_status must be one of:

- no_idea

- recommended

- not_recommended

Null/NaN values are converted to no_idea, affecting model accuracy.

- Returns test accuracy score.

---

  ```analyzeText(text)```
  
| Parameter | Data Type | Description                          | Optional/Required |
|-----------|-----------|--------------------------------------|-------------------|
| `text`    | str       | The Persian text to be analyzed      | Required          |

The core function that analyzes a text and returns one of:
"not_recommended", "recommended", or "no_idea".

---

```saveModel()```

```loadModel()```
  
  Model persistence functions. Models are saved in the model directory.

---

```analyzeCSV(input_csv, output_path, summary_path=None, text_column=0)```

| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |
|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|
| `input_csv`    | str             | -             | Path to input CSV file containing comments to analyze                       | Required          |
| `output_path`  | str             | -             | Path where analyzed results CSV will be saved                               | Required          |
| `summary_path` | str or None     | None          | Optional path to save summary statistics CSV                                | Optional          |
| `text_column`  | int or str      | 0             | Column index (int) or name (str) containing the text to analyze             | Optional          |
  

Batch processes comments from a CSV file. For single-column files, text_column isn't needed. Otherwise specify column name/index (0-based, negative indices supported). Output contains:

1- Original text

2- Recommendation status
Optional summary_path generates statistics:

- Total count

- Recommended count

- Not recommended count

- No idea count

- Model accuracy (not implemented in current version)

Returns a DataFrame and saves results.

---

### Emotion Analysis Functions

```loadLex(csv_file, word_col=0, emotion_col=1, weight_col=2)```

| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |
|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|
| `csv_file`     | str             | -             | Path to CSV lexicon file                                                    | Required          |
| `word_col`     | int or str      | 0             | Column index (int) or name (str) containing words                           | Optional          |
| `emotion_col`  | int or str      | 1             | Column index (int) or name (str) containing emotion labels                  | Optional          |
| `weight_col`   | int or str      | 2             | Column index (int) or name (str) containing weight values                   | Optional          |

Loads a CSV with three columns:

1- Keywords

2- Emotion (happiness, sadness, anger, fear, disgust, calmness)

3- Emotion weight (defaults to 1 if unspecified, affecting accuracy)

Column indices are optional.

---

```train(train_csv, text_col='text', emotion_col='sentiment', weight_col='weight')```

| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |
|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|
| `train_csv`    | str             | -             | Path to training CSV file                                                   | Required          |
| `text_col`     | str or int      | 'text'        | Column name/index containing text data                                      | Optional          |
| `emotion_col`  | str or int      | 'emotion'     | Column name/index containing emotion labels                                 | Optional          |
| `weight_col`   | str or int      | 'weight'      | Column name/index containing weight values                                  | Optional          |

Trains the emotion model using a CSV with specified column names (optional).

---

```saveModel(model_name='weighted_sentiment_model')```

| Parameter     | Type  | Default Value               | Description                                                                 | Optional/Required |
|--------------|-------|-----------------------------|-----------------------------------------------------------------------------|-------------------|
| `model_name` | str   | 'weighted_sentiment_model'  | Base filename for saving model (without extension)                          | Optional          |


```loadModel(model_name='weighted_sentiment_model')```

| Parameter     | Type  | Default Value               | Description                                                                 | Optional/Required |
|--------------|-------|-----------------------------|-----------------------------------------------------------------------------|-------------------|
| `model_name` | str   | 'weighted_sentiment_model'  | Base filename of model to load (without extension)                         | Optional          |


Model persistence functions (saved in model directory).

---

```analyzeText(text)```

| Parameter | Type | Description                          | Optional/Required |
|-----------|------|--------------------------------------|-------------------|
| `text`    | str  | Persian text to analyze              | Required          |

Analyzes a single text, returning percentage scores for each emotion.

---

```analyzeCSV(input_csv, output_csv, text_col='text', output_col='sentiment_analysis')```

| Parameter           | Type          | Default Value          | Description                                                                 | Optional/Required |
|---------------------|---------------|------------------------|-----------------------------------------------------------------------------|-------------------|
| `input_csv`         | str           | -                      | Path to input CSV file containing text to analyze                           | Required          |
| `output_csv`        | str           | -                      | Path to save analyzed results                                               | Required          |
| `text_col`          | str/int       | 'text'                 | Column name/index containing text to analyze                                | Optional          |
| `output_col`        | str           | 'sentiment_analysis'   | Column name for output results                                              | Optional          |

Batch processes texts from CSV. Returns True on success. Requires:

- input_csv path

- output_csv path
Optional column names.

---

## Installation
Install via pip:

```bash
pip install PerSent
```

For specific versions:

```bash
pip install PerSent==<VERSION_NUMBER>
```

## Usage
- Comment Analysis

Basic single-text analysis:

```bash
from PerSent import CommentAnalyzer

analyzer = CommentAnalyzer()

'''
Training (if you have data):
Requires CSV with comments and recommendation status columns
Status must be: recommended/not_recommended/no_idea
'''
analyzer.train("train.csv")

# Load pre-trained model
analyzer.loadModel()

# Predict
text = "کیفیت عالی داشت" # "Excellent quality"
result = analyzer.analyzeText(text)
print(f"Sentiment: {result}")  # Output: Sentiment: recommended
```

The included pre-trained model has ~70% accuracy. For better results, you can train with larger datasets. I've prepared a split dataset (due to size):

[Download Here](https://github.com/RezaGooner/Sentiment-Survey-Analyzer/tree/main/Dataset/big_train)

---

Batch CSV processing:

```bash
from PerSent import CommentAnalyzer
analyzer = CommentAnalyzer()
analyzer.loadModel()

# Basic usage (single-column CSV)
analyzer.analyzeCSV(
    input_csv="comments.csv",
    output_path="results.csv"
)

# Alternative usage patterns:
# 1. Using column index (0-based)
analyzer.analyzeCSV("comments.csv", "results.csv", None, 0)

# 2. Negative indices (count from end)
analyzer.analyzeCSV("comments.csv", "results.csv", None, -1)

# 3. Column name
analyzer.analyzeCSV("comments.csv", "results.csv", None, "نظرات") # "Comments" column

# 4. With summary (single-column)
analyzer.analyzeCSV("comments.csv", "results.csv", "summary.csv")

# 5. With summary and column specification
analyzer.analyzeCSV("comments.csv", "results.csv", "summary.csv", 2)
```

- Emotion Analysis

Single text analysis with pre-trained model:

```bash
from PerSent import SentimentAnalyzer

analyzer = SentimentAnalyzer()
analyzer.loadModel()

sample_text = "امتحانم رو خراب کردم. احساس می‌کنم یک شکست خورده‌ی تمام عیارم."
# "I failed my exam. I feel like a complete failure."

result = analyzer.analyzeText(sample_text)
for emotion, score in sorted(result.items(), key=lambda x: x[1], reverse=True):
    print(f"{emotion}: {score:.2f}%")
```

output :

```bash
غم: 36.00%                     #Sadness
عصبانیت: 36.00%                 #anger
ترس: 28.00%                    #fear
شادی: 0.00%                     #happiness
تنفر: 0.00%                      #disgust
شگفتی: 0.00%                    #surprise
آرامش: 0.00%                    #calmness
```

To train your own model:

``` bash
analyzer.train('emotion_dataset.csv')
```

Required CSV columns:

1- Keywords

2- Emotion (happiness, sadness, anger, disgust, fear, calmness)

3- Emotion weight

Model persistence:

```bash
analyzer.saveModel("custom_model_name")
analyzer.loadModel("custom_model_name")
```

Batch CSV processing:

```bash
analyzer.analyzeCSV("input.csv", "output.csv")
```

## Contribution
As mentioned, this library needs community collaboration. Please share suggestions, bugs, or feedback via:

- [Fork Repository & Pull Request](https://github.com/RezaGooner/PerSent/fork)

- [Create Issue](https://github.com/RezaGooner/PerSent/issues/new)

- Email: ```RezaAsadiProgrammer@gmail.com```

- Telegram: ```@RezaGooner```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RezaGooner/PerSent",
    "name": "PerSent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "persian sentiment analysis nlp",
    "author": "RezaGooner",
    "author_email": "RezaAsadiProgrammer@Gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ba/68/007ca72522c50568e3209c21b01c7cad62754fefa591029b73b6f3f793bf/persent-1.3.3.tar.gz",
    "platform": null,
    "description": "# PerSent (Persian Sentiment Analyzer) \r\n\r\n[![Persian](https://img.shields.io/badge/Persian-\u0641\u0627\u0631\u0633\u06cc-blue.svg)](README.fa.md)\r\n\r\n![PerSent Logo](https://github.com/user-attachments/assets/6bb1633b-6ed3-47fa-aae2-f97886dc4e22)\r\n\r\n## Introduction\r\nPerSent is a practical Python library designed for Persian sentiment analysis. The name stands for \"Persian Sentiment Analyzer\". Currently in its early testing phase, the library provides basic functionality and is available on [PyPI](https://pypi.org/project/PerSent/). Install it using:\r\n\r\n```bash\r\npip install PerSent\r\n```\r\n\r\nCurrent capabilities include:\r\n\r\n- Sentiment analysis of opinions/comments\r\n\r\n- Emotion analysis of texts (happiness, sadness, anger, surprise, fear, disgust, calmness)\r\n\r\n- Analysis of product/service reviews (recommended/not recommended/no idea)\r\n\r\n- Both single-text and batch CSV processing\r\n\r\n- Output displayed in terminal or saved to CSV with summary statistics\r\n\r\nInitial repository that evolved into this library:\r\n[Click here](https://github.com/RezaGooner/Sentiment-Survey-Analyzer)\r\n\r\nWe welcome user testing and feedback to improve the library. If you encounter bugs or have suggestions, please:\r\n\r\n- [Contribute](#contribution)\r\n\r\nFor installation issues due to dependency conflicts (especially with mingw-w64), consider using online platforms like DeepNote.com.\r\n\r\n## Structure\r\n### Comment Analysis Functions\r\n\r\n```train(train_csv, test_size=0.2, vector_size=100, window=5)```\r\n\r\n| Parameter     | Data Type | Default Value | Description                                                                 | Optional/Required |\r\n|--------------|-----------|---------------|-----------------------------------------------------------------------------|-------------------|\r\n| `train_csv`  | str       | -             | Path to CSV file containing training data with `body` and `recommendation_status` columns | Required          |\r\n| `test_size`  | float     | 0.2           | Proportion of test data (between 0.0 and 1.0)                               | Optional          |\r\n| `vector_size`| int       | 100           | Output vector dimension for Word2Vec model (embedding size)                 | Optional          |\r\n| `window`     | int       | 5             | Context window size for Word2Vec model                                      | Optional          |\r\n\r\nrecommendation_status must be one of:\r\n\r\n- no_idea\r\n\r\n- recommended\r\n\r\n- not_recommended\r\n\r\nNull/NaN values are converted to no_idea, affecting model accuracy.\r\n\r\n- Returns test accuracy score.\r\n\r\n---\r\n\r\n  ```analyzeText(text)```\r\n  \r\n| Parameter | Data Type | Description                          | Optional/Required |\r\n|-----------|-----------|--------------------------------------|-------------------|\r\n| `text`    | str       | The Persian text to be analyzed      | Required          |\r\n\r\nThe core function that analyzes a text and returns one of:\r\n\"not_recommended\", \"recommended\", or \"no_idea\".\r\n\r\n---\r\n\r\n```saveModel()```\r\n\r\n```loadModel()```\r\n  \r\n  Model persistence functions. Models are saved in the model directory.\r\n\r\n---\r\n\r\n```analyzeCSV(input_csv, output_path, summary_path=None, text_column=0)```\r\n\r\n| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |\r\n|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|\r\n| `input_csv`    | str             | -             | Path to input CSV file containing comments to analyze                       | Required          |\r\n| `output_path`  | str             | -             | Path where analyzed results CSV will be saved                               | Required          |\r\n| `summary_path` | str or None     | None          | Optional path to save summary statistics CSV                                | Optional          |\r\n| `text_column`  | int or str      | 0             | Column index (int) or name (str) containing the text to analyze             | Optional          |\r\n  \r\n\r\nBatch processes comments from a CSV file. For single-column files, text_column isn't needed. Otherwise specify column name/index (0-based, negative indices supported). Output contains:\r\n\r\n1- Original text\r\n\r\n2- Recommendation status\r\nOptional summary_path generates statistics:\r\n\r\n- Total count\r\n\r\n- Recommended count\r\n\r\n- Not recommended count\r\n\r\n- No idea count\r\n\r\n- Model accuracy (not implemented in current version)\r\n\r\nReturns a DataFrame and saves results.\r\n\r\n---\r\n\r\n### Emotion Analysis Functions\r\n\r\n```loadLex(csv_file, word_col=0, emotion_col=1, weight_col=2)```\r\n\r\n| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |\r\n|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|\r\n| `csv_file`     | str             | -             | Path to CSV lexicon file                                                    | Required          |\r\n| `word_col`     | int or str      | 0             | Column index (int) or name (str) containing words                           | Optional          |\r\n| `emotion_col`  | int or str      | 1             | Column index (int) or name (str) containing emotion labels                  | Optional          |\r\n| `weight_col`   | int or str      | 2             | Column index (int) or name (str) containing weight values                   | Optional          |\r\n\r\nLoads a CSV with three columns:\r\n\r\n1- Keywords\r\n\r\n2- Emotion (happiness, sadness, anger, fear, disgust, calmness)\r\n\r\n3- Emotion weight (defaults to 1 if unspecified, affecting accuracy)\r\n\r\nColumn indices are optional.\r\n\r\n---\r\n\r\n```train(train_csv, text_col='text', emotion_col='sentiment', weight_col='weight')```\r\n\r\n| Parameter      | Data Type       | Default Value | Description                                                                 | Optional/Required |\r\n|----------------|-----------------|---------------|-----------------------------------------------------------------------------|-------------------|\r\n| `train_csv`    | str             | -             | Path to training CSV file                                                   | Required          |\r\n| `text_col`     | str or int      | 'text'        | Column name/index containing text data                                      | Optional          |\r\n| `emotion_col`  | str or int      | 'emotion'     | Column name/index containing emotion labels                                 | Optional          |\r\n| `weight_col`   | str or int      | 'weight'      | Column name/index containing weight values                                  | Optional          |\r\n\r\nTrains the emotion model using a CSV with specified column names (optional).\r\n\r\n---\r\n\r\n```saveModel(model_name='weighted_sentiment_model')```\r\n\r\n| Parameter     | Type  | Default Value               | Description                                                                 | Optional/Required |\r\n|--------------|-------|-----------------------------|-----------------------------------------------------------------------------|-------------------|\r\n| `model_name` | str   | 'weighted_sentiment_model'  | Base filename for saving model (without extension)                          | Optional          |\r\n\r\n\r\n```loadModel(model_name='weighted_sentiment_model')```\r\n\r\n| Parameter     | Type  | Default Value               | Description                                                                 | Optional/Required |\r\n|--------------|-------|-----------------------------|-----------------------------------------------------------------------------|-------------------|\r\n| `model_name` | str   | 'weighted_sentiment_model'  | Base filename of model to load (without extension)                         | Optional          |\r\n\r\n\r\nModel persistence functions (saved in model directory).\r\n\r\n---\r\n\r\n```analyzeText(text)```\r\n\r\n| Parameter | Type | Description                          | Optional/Required |\r\n|-----------|------|--------------------------------------|-------------------|\r\n| `text`    | str  | Persian text to analyze              | Required          |\r\n\r\nAnalyzes a single text, returning percentage scores for each emotion.\r\n\r\n---\r\n\r\n```analyzeCSV(input_csv, output_csv, text_col='text', output_col='sentiment_analysis')```\r\n\r\n| Parameter           | Type          | Default Value          | Description                                                                 | Optional/Required |\r\n|---------------------|---------------|------------------------|-----------------------------------------------------------------------------|-------------------|\r\n| `input_csv`         | str           | -                      | Path to input CSV file containing text to analyze                           | Required          |\r\n| `output_csv`        | str           | -                      | Path to save analyzed results                                               | Required          |\r\n| `text_col`          | str/int       | 'text'                 | Column name/index containing text to analyze                                | Optional          |\r\n| `output_col`        | str           | 'sentiment_analysis'   | Column name for output results                                              | Optional          |\r\n\r\nBatch processes texts from CSV. Returns True on success. Requires:\r\n\r\n- input_csv path\r\n\r\n- output_csv path\r\nOptional column names.\r\n\r\n---\r\n\r\n## Installation\r\nInstall via pip:\r\n\r\n```bash\r\npip install PerSent\r\n```\r\n\r\nFor specific versions:\r\n\r\n```bash\r\npip install PerSent==<VERSION_NUMBER>\r\n```\r\n\r\n## Usage\r\n- Comment Analysis\r\n\r\nBasic single-text analysis:\r\n\r\n```bash\r\nfrom PerSent import CommentAnalyzer\r\n\r\nanalyzer = CommentAnalyzer()\r\n\r\n'''\r\nTraining (if you have data):\r\nRequires CSV with comments and recommendation status columns\r\nStatus must be: recommended/not_recommended/no_idea\r\n'''\r\nanalyzer.train(\"train.csv\")\r\n\r\n# Load pre-trained model\r\nanalyzer.loadModel()\r\n\r\n# Predict\r\ntext = \"\u06a9\u06cc\u0641\u06cc\u062a \u0639\u0627\u0644\u06cc \u062f\u0627\u0634\u062a\" # \"Excellent quality\"\r\nresult = analyzer.analyzeText(text)\r\nprint(f\"Sentiment: {result}\")  # Output: Sentiment: recommended\r\n```\r\n\r\nThe included pre-trained model has ~70% accuracy. For better results, you can train with larger datasets. I've prepared a split dataset (due to size):\r\n\r\n[Download Here](https://github.com/RezaGooner/Sentiment-Survey-Analyzer/tree/main/Dataset/big_train)\r\n\r\n---\r\n\r\nBatch CSV processing:\r\n\r\n```bash\r\nfrom PerSent import CommentAnalyzer\r\nanalyzer = CommentAnalyzer()\r\nanalyzer.loadModel()\r\n\r\n# Basic usage (single-column CSV)\r\nanalyzer.analyzeCSV(\r\n    input_csv=\"comments.csv\",\r\n    output_path=\"results.csv\"\r\n)\r\n\r\n# Alternative usage patterns:\r\n# 1. Using column index (0-based)\r\nanalyzer.analyzeCSV(\"comments.csv\", \"results.csv\", None, 0)\r\n\r\n# 2. Negative indices (count from end)\r\nanalyzer.analyzeCSV(\"comments.csv\", \"results.csv\", None, -1)\r\n\r\n# 3. Column name\r\nanalyzer.analyzeCSV(\"comments.csv\", \"results.csv\", None, \"\u0646\u0638\u0631\u0627\u062a\") # \"Comments\" column\r\n\r\n# 4. With summary (single-column)\r\nanalyzer.analyzeCSV(\"comments.csv\", \"results.csv\", \"summary.csv\")\r\n\r\n# 5. With summary and column specification\r\nanalyzer.analyzeCSV(\"comments.csv\", \"results.csv\", \"summary.csv\", 2)\r\n```\r\n\r\n- Emotion Analysis\r\n\r\nSingle text analysis with pre-trained model:\r\n\r\n```bash\r\nfrom PerSent import SentimentAnalyzer\r\n\r\nanalyzer = SentimentAnalyzer()\r\nanalyzer.loadModel()\r\n\r\nsample_text = \"\u0627\u0645\u062a\u062d\u0627\u0646\u0645 \u0631\u0648 \u062e\u0631\u0627\u0628 \u06a9\u0631\u062f\u0645. \u0627\u062d\u0633\u0627\u0633 \u0645\u06cc\u200c\u06a9\u0646\u0645 \u06cc\u06a9 \u0634\u06a9\u0633\u062a \u062e\u0648\u0631\u062f\u0647\u200c\u06cc \u062a\u0645\u0627\u0645 \u0639\u06cc\u0627\u0631\u0645.\"\r\n# \"I failed my exam. I feel like a complete failure.\"\r\n\r\nresult = analyzer.analyzeText(sample_text)\r\nfor emotion, score in sorted(result.items(), key=lambda x: x[1], reverse=True):\r\n    print(f\"{emotion}: {score:.2f}%\")\r\n```\r\n\r\noutput :\r\n\r\n```bash\r\n\u063a\u0645: 36.00%                     #Sadness\r\n\u0639\u0635\u0628\u0627\u0646\u06cc\u062a: 36.00%                 #anger\r\n\u062a\u0631\u0633: 28.00%                    #fear\r\n\u0634\u0627\u062f\u06cc: 0.00%                     #happiness\r\n\u062a\u0646\u0641\u0631: 0.00%                      #disgust\r\n\u0634\u06af\u0641\u062a\u06cc: 0.00%                    #surprise\r\n\u0622\u0631\u0627\u0645\u0634: 0.00%                    #calmness\r\n```\r\n\r\nTo train your own model:\r\n\r\n``` bash\r\nanalyzer.train('emotion_dataset.csv')\r\n```\r\n\r\nRequired CSV columns:\r\n\r\n1- Keywords\r\n\r\n2- Emotion (happiness, sadness, anger, disgust, fear, calmness)\r\n\r\n3- Emotion weight\r\n\r\nModel persistence:\r\n\r\n```bash\r\nanalyzer.saveModel(\"custom_model_name\")\r\nanalyzer.loadModel(\"custom_model_name\")\r\n```\r\n\r\nBatch CSV processing:\r\n\r\n```bash\r\nanalyzer.analyzeCSV(\"input.csv\", \"output.csv\")\r\n```\r\n\r\n## Contribution\r\nAs mentioned, this library needs community collaboration. Please share suggestions, bugs, or feedback via:\r\n\r\n- [Fork Repository & Pull Request](https://github.com/RezaGooner/PerSent/fork)\r\n\r\n- [Create Issue](https://github.com/RezaGooner/PerSent/issues/new)\r\n\r\n- Email: ```RezaAsadiProgrammer@gmail.com```\r\n\r\n- Telegram: ```@RezaGooner```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Persian Sentiment Analysis Toolkit",
    "version": "1.3.3",
    "project_urls": {
        "Homepage": "https://github.com/RezaGooner/PerSent"
    },
    "split_keywords": [
        "persian",
        "sentiment",
        "analysis",
        "nlp"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b3990a91ebb6b402cda02fb47155957c40422ed93b74690457ddb820dd61b176",
                "md5": "5920ad8d425671cc634b6018e7ba722e",
                "sha256": "c1d41111d0ccf0b2246bd4e49b87ae777b40066bdbda1c22053232bc7334310b"
            },
            "downloads": -1,
            "filename": "persent-1.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5920ad8d425671cc634b6018e7ba722e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27227138,
            "upload_time": "2025-08-22T19:52:54",
            "upload_time_iso_8601": "2025-08-22T19:52:54.683087Z",
            "url": "https://files.pythonhosted.org/packages/b3/99/0a91ebb6b402cda02fb47155957c40422ed93b74690457ddb820dd61b176/persent-1.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ba68007ca72522c50568e3209c21b01c7cad62754fefa591029b73b6f3f793bf",
                "md5": "f0e7176fc8282527715769a5c378fb4b",
                "sha256": "acb17d73167f491e253d013697e84a2bb1da97f935650b5c160aaa911f3d5934"
            },
            "downloads": -1,
            "filename": "persent-1.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f0e7176fc8282527715769a5c378fb4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27222412,
            "upload_time": "2025-08-22T19:53:03",
            "upload_time_iso_8601": "2025-08-22T19:53:03.337188Z",
            "url": "https://files.pythonhosted.org/packages/ba/68/007ca72522c50568e3209c21b01c7cad62754fefa591029b73b6f3f793bf/persent-1.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 19:53:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RezaGooner",
    "github_project": "PerSent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "hazm",
            "specs": [
                [
                    ">=",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "gensim",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    ">=",
                    "4.62.0"
                ]
            ]
        },
        {
            "name": "joblib",
            "specs": [
                [
                    ">=",
                    "1.1.0"
                ]
            ]
        }
    ],
    "lcname": "persent"
}
        
Elapsed time: 1.65435s