{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "3WxeSU4SfLpb",
        "outputId": "f1701333-41aa-44d9-d8e1-b3c806763f53"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Sentiment(polarity=0.7, subjectivity=0.6000000000000001)\n"
          ]
        }
      ],
      "source": [
        "from textblob import TextBlob\n",
        "\n",
        "text = \"GFG is a good company and always value their employees.\"\n",
        "blob = TextBlob(text)\n",
        "sentiment = blob.sentiment\n",
        "print(sentiment)"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "text = \"I hate bugs in my code.\"\n",
        "blob = TextBlob(text)\n",
        "sentiment = blob.sentiment\n",
        "print(sentiment)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "7RH6EmVmfMmV",
        "outputId": "dae2e53b-e611-4c55-a4d6-1afd1bcf168e"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Sentiment(polarity=-0.8, subjectivity=0.9)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "text = \"The sun rises in the east.\"\n",
        "blob = TextBlob(text)\n",
        "sentiment = blob.sentiment\n",
        "print(sentiment)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "SLoe9ap8fMon",
        "outputId": "b24b046e-7fc5-48a8-adf1-dba7a380357b"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Sentiment(polarity=0.0, subjectivity=0.0)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "text = \"I enjoy coding, but debugging can be frustrating.\"\n",
        "blob = TextBlob(text)\n",
        "sentiment = blob.sentiment\n",
        "print(sentiment)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "X-ZjIMnzfMrH",
        "outputId": "873caf9e-fd40-4701-d61b-358a7b7e2f5b"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Sentiment(polarity=0.0, subjectivity=0.7)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "DUuV--AlfMtm"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}