ChordReviewsVis


NameChordReviewsVis JSON
Version 0.2.7 PyPI version JSON
download
home_pagehttps://github.com/felix-funes/ChordReviewsVis
SummaryProcess reviews data, apply text preprocessing, and generate a chord plot visualization showing word co-occurrence patterns and sentiment analysis.
upload_time2024-06-22 12:03:00
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords customer reviews sentiment analysis chord plot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ChordReviewsVis Package

## Overview
`ChordReviewsVis` is a Python package designed to process and visualize review data by generating chord plots. These visualizations illustrate word co-occurrence patterns and sentiment analysis, providing insights into the textual data.

This package was developed by Félix José Funes as part of his master's dissertation at Universidade Nova de Lisboa, which was supervised by Prof. Nuno António, PhD.

## Installation
To install `ChordReviewsVis`, use pip:
```
pip install ChordReviewsVis
```

## Usage
First, import the necessary libraries and the `ChordReviews` function:
```
import pandas as pd
from ChordReviewsVis import ChordReviews
```

Prepare your DataFrame with a text column containing review data. Then call the `ChordReviews` function:
```
# Example DataFrame
df = pd.read_csv("filepath")

# Generate chord plot
ChordReviews(df, 'review')
```

Some datasets that can be used for this purpose are:

* [IMDB Movie Reviews](https://www.kaggle.com/datasets/atulanandjha/imdb-50k-movie-reviews-test-your-bert)
* [Women's E-Commerce Clothing Reviews](https://www.kaggle.com/datasets/nicapotato/womens-ecommerce-clothing-reviews)
* [Amazon Fine Food Reviews](https://www.kaggle.com/datasets/snap/amazon-fine-food-reviews)

## Function Parameters
- **df** (pandas.DataFrame): DataFrame containing review data.
- **text_column** (str): Name of the column containing the text data.
- **size** (int, optional): Size of the output chord plot. Default is 300.
- **stopwords_to_add** (list, optional): Additional stopwords to include in the stop words set. Default is an empty list.
- **stemming** (bool, optional): Whether to apply stemming to words. Default is False.
- **lemmatization** (bool, optional): Whether to apply lemmatization to words. Default is True.
- **words_to_replace** (dict, optional): A dictionary where keys are words to be replaced and values are the replacements. Default is an empty dictionary.
- **label_text_font_size** (int, optional): Font size for the labels in the chord plot. Default is 12.

## Returns
- **hv.Chord**: A chord plot visualization of word co-occurrence patterns and sentiment analysis.

## Example
```
import pandas as pd
from ChordReviewsVis import ChordReviews

# Example DataFrame
df = pd.read_csv("https://github.com/felix-funes/ChordReviewsVis/raw/main/Test%20Dataset%20-%20IMDB%20Movie%20Reviews.csv")

# Generate chord plot
chord_plot = ChordReviews(df, 'review')

# Display the plot
chord_plot.show()
```

[![chord plot example](https://raw.githubusercontent.com/felix-funes/ChordReviewsVis/875cd8a879bd8935be2176978b9aace2d7680f01/Sample%20Chord%20Plot%20-%20IMDB%20Dataset.svg)]

## Dependencies
Ensure you have the following libraries installed:
- pandas
- numpy
- nltk
- BeautifulSoup
- re
- holoviews

These can be installed via pip:
```
pip install pandas numpy nltk beautifulsoup4 re holoviews
```

## License
This project is licensed under the MIT License.

## Contact
For any issues or inquiries, please contact the package maintainer at felixfunes96 [at] gmail [dot] com.

---

By using this package, you agree to the terms outlined in the LICENSE file included in the repository.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/felix-funes/ChordReviewsVis",
    "name": "ChordReviewsVis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "customer reviews, sentiment analysis, chord plot",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/47/9f/f4612634a047a930c9b01259ca72232053336365f31a8e900fbe00cfbd46/chordreviewsvis-0.2.7.tar.gz",
    "platform": null,
    "description": "# ChordReviewsVis Package\r\n\r\n## Overview\r\n`ChordReviewsVis` is a Python package designed to process and visualize review data by generating chord plots. These visualizations illustrate word co-occurrence patterns and sentiment analysis, providing insights into the textual data.\r\n\r\nThis package was developed by F\u00c3\u00a9lix Jos\u00c3\u00a9 Funes as part of his master's dissertation at Universidade Nova de Lisboa, which was supervised by Prof. Nuno Ant\u00c3\u00b3nio, PhD.\r\n\r\n## Installation\r\nTo install `ChordReviewsVis`, use pip:\r\n```\r\npip install ChordReviewsVis\r\n```\r\n\r\n## Usage\r\nFirst, import the necessary libraries and the `ChordReviews` function:\r\n```\r\nimport pandas as pd\r\nfrom ChordReviewsVis import ChordReviews\r\n```\r\n\r\nPrepare your DataFrame with a text column containing review data. Then call the `ChordReviews` function:\r\n```\r\n# Example DataFrame\r\ndf = pd.read_csv(\"filepath\")\r\n\r\n# Generate chord plot\r\nChordReviews(df, 'review')\r\n```\r\n\r\nSome datasets that can be used for this purpose are:\r\n\r\n* [IMDB Movie Reviews](https://www.kaggle.com/datasets/atulanandjha/imdb-50k-movie-reviews-test-your-bert)\r\n* [Women's E-Commerce Clothing Reviews](https://www.kaggle.com/datasets/nicapotato/womens-ecommerce-clothing-reviews)\r\n* [Amazon Fine Food Reviews](https://www.kaggle.com/datasets/snap/amazon-fine-food-reviews)\r\n\r\n## Function Parameters\r\n- **df** (pandas.DataFrame): DataFrame containing review data.\r\n- **text_column** (str): Name of the column containing the text data.\r\n- **size** (int, optional): Size of the output chord plot. Default is 300.\r\n- **stopwords_to_add** (list, optional): Additional stopwords to include in the stop words set. Default is an empty list.\r\n- **stemming** (bool, optional): Whether to apply stemming to words. Default is False.\r\n- **lemmatization** (bool, optional): Whether to apply lemmatization to words. Default is True.\r\n- **words_to_replace** (dict, optional): A dictionary where keys are words to be replaced and values are the replacements. Default is an empty dictionary.\r\n- **label_text_font_size** (int, optional): Font size for the labels in the chord plot. Default is 12.\r\n\r\n## Returns\r\n- **hv.Chord**: A chord plot visualization of word co-occurrence patterns and sentiment analysis.\r\n\r\n## Example\r\n```\r\nimport pandas as pd\r\nfrom ChordReviewsVis import ChordReviews\r\n\r\n# Example DataFrame\r\ndf = pd.read_csv(\"https://github.com/felix-funes/ChordReviewsVis/raw/main/Test%20Dataset%20-%20IMDB%20Movie%20Reviews.csv\")\r\n\r\n# Generate chord plot\r\nchord_plot = ChordReviews(df, 'review')\r\n\r\n# Display the plot\r\nchord_plot.show()\r\n```\r\n\r\n[![chord plot example](https://raw.githubusercontent.com/felix-funes/ChordReviewsVis/875cd8a879bd8935be2176978b9aace2d7680f01/Sample%20Chord%20Plot%20-%20IMDB%20Dataset.svg)]\r\n\r\n## Dependencies\r\nEnsure you have the following libraries installed:\r\n- pandas\r\n- numpy\r\n- nltk\r\n- BeautifulSoup\r\n- re\r\n- holoviews\r\n\r\nThese can be installed via pip:\r\n```\r\npip install pandas numpy nltk beautifulsoup4 re holoviews\r\n```\r\n\r\n## License\r\nThis project is licensed under the MIT License.\r\n\r\n## Contact\r\nFor any issues or inquiries, please contact the package maintainer at felixfunes96 [at] gmail [dot] com.\r\n\r\n---\r\n\r\nBy using this package, you agree to the terms outlined in the LICENSE file included in the repository.\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Process reviews data, apply text preprocessing, and generate a chord plot visualization showing word co-occurrence patterns and sentiment analysis.",
    "version": "0.2.7",
    "project_urls": {
        "GitHub": "https://github.com/felix-funes/ChordReviewsVis",
        "Homepage": "https://github.com/felix-funes/ChordReviewsVis"
    },
    "split_keywords": [
        "customer reviews",
        " sentiment analysis",
        " chord plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01284e2702ccef55ce9e59d63eb870af44d0ee92e0106dec39dbf5d45b36973c",
                "md5": "1505cbffbf8a2154e8540a37e1bc5dd4",
                "sha256": "9a705b9b1ff7c77c87521e2f5cfe08dfa7ad5b9facb584b9217126fb22336b36"
            },
            "downloads": -1,
            "filename": "ChordReviewsVis-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1505cbffbf8a2154e8540a37e1bc5dd4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7350,
            "upload_time": "2024-06-22T12:02:58",
            "upload_time_iso_8601": "2024-06-22T12:02:58.542307Z",
            "url": "https://files.pythonhosted.org/packages/01/28/4e2702ccef55ce9e59d63eb870af44d0ee92e0106dec39dbf5d45b36973c/ChordReviewsVis-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "479ff4612634a047a930c9b01259ca72232053336365f31a8e900fbe00cfbd46",
                "md5": "a287066d9c977ffde9a74f45203d26e0",
                "sha256": "5c556aa0e29474ce9f2bacf52d2a9025e183a6c4de1ea1ea13e873dea57db316"
            },
            "downloads": -1,
            "filename": "chordreviewsvis-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "a287066d9c977ffde9a74f45203d26e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6893,
            "upload_time": "2024-06-22T12:03:00",
            "upload_time_iso_8601": "2024-06-22T12:03:00.181242Z",
            "url": "https://files.pythonhosted.org/packages/47/9f/f4612634a047a930c9b01259ca72232053336365f31a8e900fbe00cfbd46/chordreviewsvis-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-22 12:03:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "felix-funes",
    "github_project": "ChordReviewsVis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "chordreviewsvis"
}
        
Elapsed time: 0.64811s