helpful-review-predictor


Namehelpful-review-predictor JSON
Version 5 PyPI version JSON
download
home_page
SummaryPredicting helpfulness of reviews
upload_time2024-02-16 12:33:46
maintainer
docs_urlNone
authorMojtaba Maleki
requires_python
license
keywords python webdevelopment amazon ecommerce online shop review comment machine learning review analysis helpful review predictor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Helpful Review Predictor



The Helpful Review Predictor is a Python package that predicts the helpfulness of reviews using machine learning techniques. It takes textual reviews as input and provides a binary classification indicating whether the review is likely to be helpful or not. if the output is 1, then the review is helpful. But if the output is 0, it means that the review is not helpful.



## Features



- Preprocesses textual reviews, including lowercasing, punctuation removal, contractions expansion, and lemmatization.

- Uses TF-IDF vectorization to convert text data into numerical feature vectors.

- Handles class imbalance using Random Over Sampling.

- Supports training and evaluation of multiple classifiers, including Gaussian Naive Bayes, Logistic Regression, and Decision Trees.

- Performs hyperparameter tuning using Grid Search and Stratified K-Fold Cross Validation.

- Provides visualization tools for comparing different classifiers and evaluating model performance.

- Saves the best model and TF-IDF vectorizer for future use.



## Installation



You can install the Helpful Review Predictor package using pip:



```bash

pip install helpful-review-predictor

```



## Usage



```python

from helpful_review_predictor import predict_helpfulness



review = "I purchased this product a few weeks ago and have been thoroughly impressed with its performance..."

prediction = predict_helpfulness(review)

print("Predicted helpfulness:", prediction)

```



## Requirements

+ scikit-learn

+ numpy

+ scipy

+ joblib

+ textblob

+ nltk

+ imbalanced-learn


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "helpful-review-predictor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,webdevelopment,amazon,ecommerce,online shop,review,comment,machine learning,review analysis,helpful review predictor",
    "author": "Mojtaba Maleki",
    "author_email": "mojtaba.maleki.138022@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4c/31/cb40ee3b7382a0e9fe6ede08cbb096b291cf59b36928b74da3ffee590f72/helpful_review_predictor-5.tar.gz",
    "platform": null,
    "description": "# Helpful Review Predictor\r\n\r\n\r\n\r\nThe Helpful Review Predictor is a Python package that predicts the helpfulness of reviews using machine learning techniques. It takes textual reviews as input and provides a binary classification indicating whether the review is likely to be helpful or not. if the output is 1, then the review is helpful. But if the output is 0, it means that the review is not helpful.\r\n\r\n\r\n\r\n## Features\r\n\r\n\r\n\r\n- Preprocesses textual reviews, including lowercasing, punctuation removal, contractions expansion, and lemmatization.\r\n\r\n- Uses TF-IDF vectorization to convert text data into numerical feature vectors.\r\n\r\n- Handles class imbalance using Random Over Sampling.\r\n\r\n- Supports training and evaluation of multiple classifiers, including Gaussian Naive Bayes, Logistic Regression, and Decision Trees.\r\n\r\n- Performs hyperparameter tuning using Grid Search and Stratified K-Fold Cross Validation.\r\n\r\n- Provides visualization tools for comparing different classifiers and evaluating model performance.\r\n\r\n- Saves the best model and TF-IDF vectorizer for future use.\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\nYou can install the Helpful Review Predictor package using pip:\r\n\r\n\r\n\r\n```bash\r\n\r\npip install helpful-review-predictor\r\n\r\n```\r\n\r\n\r\n\r\n## Usage\r\n\r\n\r\n\r\n```python\r\n\r\nfrom helpful_review_predictor import predict_helpfulness\r\n\r\n\r\n\r\nreview = \"I purchased this product a few weeks ago and have been thoroughly impressed with its performance...\"\r\n\r\nprediction = predict_helpfulness(review)\r\n\r\nprint(\"Predicted helpfulness:\", prediction)\r\n\r\n```\r\n\r\n\r\n\r\n## Requirements\r\n\r\n+ scikit-learn\r\n\r\n+ numpy\r\n\r\n+ scipy\r\n\r\n+ joblib\r\n\r\n+ textblob\r\n\r\n+ nltk\r\n\r\n+ imbalanced-learn\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Predicting helpfulness of reviews",
    "version": "5",
    "project_urls": null,
    "split_keywords": [
        "python",
        "webdevelopment",
        "amazon",
        "ecommerce",
        "online shop",
        "review",
        "comment",
        "machine learning",
        "review analysis",
        "helpful review predictor"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96e1a8ccc75c632211656fe4643657ee14d9751b50add60e06171234dab6c1f2",
                "md5": "f1d618281d3ff858e81a6a012573b7c6",
                "sha256": "9b45004eb911c7857bcacf904ae29d6cecb1dff30a27482a5642ee6ab791639f"
            },
            "downloads": -1,
            "filename": "helpful_review_predictor-5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f1d618281d3ff858e81a6a012573b7c6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2157748,
            "upload_time": "2024-02-16T12:33:43",
            "upload_time_iso_8601": "2024-02-16T12:33:43.613126Z",
            "url": "https://files.pythonhosted.org/packages/96/e1/a8ccc75c632211656fe4643657ee14d9751b50add60e06171234dab6c1f2/helpful_review_predictor-5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c31cb40ee3b7382a0e9fe6ede08cbb096b291cf59b36928b74da3ffee590f72",
                "md5": "5c6a71a63f1e599bced2df114ebebfba",
                "sha256": "d0001eacae326605371e9df0de68cc8a2e92aba464b2dfe8e55d228441d4fe30"
            },
            "downloads": -1,
            "filename": "helpful_review_predictor-5.tar.gz",
            "has_sig": false,
            "md5_digest": "5c6a71a63f1e599bced2df114ebebfba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2147074,
            "upload_time": "2024-02-16T12:33:46",
            "upload_time_iso_8601": "2024-02-16T12:33:46.970583Z",
            "url": "https://files.pythonhosted.org/packages/4c/31/cb40ee3b7382a0e9fe6ede08cbb096b291cf59b36928b74da3ffee590f72/helpful_review_predictor-5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-16 12:33:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "helpful-review-predictor"
}
        
Elapsed time: 0.46201s