{"id":87786,"date":"2023-06-26T10:35:45","date_gmt":"2023-06-26T05:05:45","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=87786"},"modified":"2026-06-03T16:02:43","modified_gmt":"2026-06-03T10:32:43","slug":"swift-sentiment-analysis-app","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/","title":{"rendered":"Swift Sentiment Analysis App &#8211; Where Words Speak Louder Than Actions!"},"content":{"rendered":"<p>Sentiment Analysis is a popular field in Machine Learning that involves the identification and extraction of subjective information from text. It is used to determine the emotional tone of a piece of content, whether it is positive, negative, or neutral.<\/p>\n<p>In this project, we will create an iOS app that performs sentiment analysis on user-entered text using SwiftUI and Core ML. The app will allow users to enter a sentence or phrase and determine whether it is positive, negative, or neutral.<\/p>\n<h3>About Swift Sentiment Analysis App<\/h3>\n<p>The objective of this project is to teach you how to create a Sentiment Analysis iOS app using SwiftUI and Core ML. By the end of this project, you will be able to:<\/p>\n<ul>\n<li>Create an iOS app that performs Sentiment Analysis using SwiftUI and Core ML.<\/li>\n<li>Train your own machine learning model using Xcode playground.<\/li>\n<li>Use the trained model to predict whether a given text is positive, negative, or neutral.<\/li>\n<\/ul>\n<h3>Prerequisites for Sentiment Analysis App using Swift<\/h3>\n<p>To follow along with this project, you will need the following:<\/p>\n<ul>\n<li>Xcode 12 or higher.<\/li>\n<li>Basic knowledge of SwiftUI and Core ML.<\/li>\n<li>An Apple Developer account (to deploy the app to a device).<\/li>\n<li>Dataset for Training the ML Model. It can be downloaded from here.<\/li>\n<\/ul>\n<h3>Download Swift Sentiment Analysis App Project<\/h3>\n<p>Please download the source code of the Swift Sentiment Analysis App Project from the following link: <a href=\"https:\/\/drive.google.com\/file\/d\/1w6VvQRVNQOs3Ig5-2x9dCSz5NGCOk-yL\/view?usp=drive_link\"><strong>Swift<\/strong> <strong>Sen<\/strong><strong>timent Analysis App Project Code<\/strong><\/a>.<\/p>\n<h3>Steps to Create Sentiment Analysis App using Swift<\/h3>\n<p>Following are the steps for developing the Swift Sentiment Analysis App Project:<\/p>\n<p><strong>Step 1:<\/strong> Create a Sentiment Analysis model using Xcode playground and dataset.<br \/>\n<strong>Step 2:<\/strong> Create a new SwiftUI project in Xcode.<br \/>\n<strong>Step 3:<\/strong> Import the ML model into the project<br \/>\n<strong>Step 4:<\/strong> Create the app UI and functionality<br \/>\n<strong>Step 5:<\/strong> Test the app on a simulator or a physical iOS device.<\/p>\n<h4>Step 1: Create a Sentiment Analysis model using Xcode playground and dataset.<\/h4>\n<p><strong>a.<\/strong> Open Xcode and select &#8220;Create a new Xcode playground.&#8221;<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/create-new-xcode-1-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87981 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/create-new-xcode-1-scaled.webp\" alt=\"create new xcode\" width=\"2560\" height=\"1556\" \/><\/a><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/xcode-playground.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87957 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/xcode-playground.webp\" alt=\"xcode playground\" width=\"1909\" height=\"1540\" \/><\/a><\/p>\n<p><strong>b.<\/strong> Choose a name and a location to save the playground<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/location-to-save-playground.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87958 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/location-to-save-playground.webp\" alt=\"location to save playground\" width=\"1909\" height=\"1524\" \/><\/a><\/p>\n<p>Now you will see something like this<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/swift-sentiment-analysis-output-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87959 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/swift-sentiment-analysis-output-scaled.webp\" alt=\"swift sentiment analysis output\" width=\"2560\" height=\"1495\" \/><\/a><\/p>\n<p><strong>c.<\/strong> In the first cell, import the necessary libraries:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/Importing the required libraries\r\nimport Cocoa\r\nimport CreateML\r\nimport Foundation\r\n<\/pre>\n<p><strong>d.<\/strong> Provide the path for the dataset and output model.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Setting the input and output file paths\r\nlet inputFilePath = \"\/Users\/amanbind\/Desktop\/Model\/tweet2.csv\"\r\nlet outputFilePath = \"\/Users\/amanbind\/Desktop\/Model\/SentimentAnalysisClassifier.mlmodel\"\r\n<\/pre>\n<p><strong>e.<\/strong> Load the data into a DataFrame and split it into training and testing data<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Reading the data from the csv file\r\nlet data = try MLDataTable(contentsOf: URL(fileURLWithPath: inputFilePath))\r\n\r\n\r\n\/\/ Splitting the data into training and testing data\r\nlet (trainingData, testingData) = data.randomSplit(by: 0.8, seed: 5)\r\n<\/pre>\n<p><strong>f.<\/strong> In the third cell, create a sentiment analysis model using the data and set the metadata of the model.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Creating the model\r\nlet sentimentClassifier = try MLTextClassifier(trainingData: trainingData, textColumn: \"Text\", labelColumn: \"sentiment\")\r\n\r\n\r\n\/\/ Setting the model's metadata\r\nlet metadata = MLModelMetadata(author: \"TechVidvan\", shortDescription: \"A model trained to classify the emotion of a sentence\", version: \"1.0\")\r\n<\/pre>\n<p><strong>g.<\/strong> Testing the accuracy of the trained model<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Testing the model\r\nlet evaluationMetrics = sentimentClassifier.evaluation(on: testingData, textColumn: \"Text\", labelColumn: \"sentiment\")\r\nlet evaluationAccuracy = (1.0 - evaluationMetrics.classificationError) * 100\r\n<\/pre>\n<p><strong>h.<\/strong> Save the model to your local machine:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Saving the model\r\ntry sentimentClassifier.write(to: URL(fileURLWithPath: outputFilePath), metadata: metadata)\r\n<\/pre>\n<p><strong>i.<\/strong> Run the playground file. It will train the model and generate the ML model file in the specified folder<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/run-the-playground-file-1-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87961 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/run-the-playground-file-1-scaled.webp\" alt=\"run the playground file\" width=\"2560\" height=\"1555\" \/><\/a><\/p>\n<p>The training accuracy of our model after 16 training iterations is 99.93% and our Testing accuracy is 82.0%<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/sentiment-analysis-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87962 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/sentiment-analysis-output.webp\" alt=\"sentiment analysis output\" width=\"1840\" height=\"872\" \/><\/a><\/p>\n<h4>Step 2: Create a new SwiftUI project in Xcode.<\/h4>\n<p><strong>a.<\/strong> Open Xcode and Click on the \u201cCreate a new Xcode Project\u201d option.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/welcome-to-xcode.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87963 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/welcome-to-xcode.webp\" alt=\"welcome to xcode\" width=\"1603\" height=\"953\" \/><\/a><\/p>\n<p><strong>b.<\/strong> Now select platform as \u201ciOS\u201d and application type as \u201cApp\u201d.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/select-platform-1.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87965 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/select-platform-1.webp\" alt=\"select platform\" width=\"1472\" height=\"1045\" \/><\/a><\/p>\n<p><strong>c.<\/strong> Now, Enter the name of the app and organization identifier, and select SwiftUI interface for building the UI of the app. Also, select Swift as the language for creating the app.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/enter-name-of-app-3.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87982 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/enter-name-of-app-3.webp\" alt=\"enter name of app\" width=\"1456\" height=\"1034\" \/><\/a><\/p>\n<p><strong>d.<\/strong> Select the folder where you want to save the app and click on Create.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/select-the-folder.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87970 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/select-the-folder.webp\" alt=\"select the folder\" width=\"1610\" height=\"1040\" \/><\/a><\/p>\n<p><strong>e.<\/strong> Now your project is ready for development, and you will see something like below.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/project-is-ready-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87971 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/project-is-ready-scaled.webp\" alt=\"project is ready\" width=\"2560\" height=\"1552\" \/><\/a><\/p>\n<h4>Step 3: Import the ML model into the project<\/h4>\n<p>Drag and drop the ML model file into the project navigator in Xcode<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/import-the-ml-model-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87972 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/import-the-ml-model-scaled.webp\" alt=\"import the ml model\" width=\"2560\" height=\"1557\" \/><\/a><\/p>\n<h4>Step 4: Create the app UI and functionality<\/h4>\n<p>In the project navigator, select ContentView.swift<br \/>\n<strong>a.<\/strong> Add the necessary imports and variables: At the top of <strong>ContentView.swift<\/strong>, add the following<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import SwiftUI\r\nimport CoreML\r\n<\/pre>\n<p><strong>b.<\/strong> Inside the ContentView struct, add two <strong>@State<\/strong> variables to store the user-entered text and the sentiment prediction:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">@State private var userInput = \"\"\r\n@State private var sentimentPrediction = \"\"\r\n<\/pre>\n<p><strong>c.<\/strong> Create the UI elements: Inside the body of the <strong>ContentView<\/strong> struct, create a <strong>VStack<\/strong> that contains a Text view, a TextField view, a Button view, and a Text view to display the sentiment prediction:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">VStack {\r\n    Text(\"Sentiment Analysis\")\r\n        .font(.largeTitle)\r\n        .fontWeight(.bold)\r\n        .padding(.top, 50)\r\n    Spacer()\r\n    VStack {\r\n        TextField(\"Enter your text here\", text: $userInput)\r\n            .padding()\r\n            .background(Color.white)\r\n            .cornerRadius(10)\r\n            .shadow(radius: 10)\r\n        Button(action: {\r\n            self.analyzeButton()\r\n        }) {\r\n            Text(\"Analyze\")\r\n                .fontWeight(.bold)\r\n                .foregroundColor(.white)\r\n                .padding(.vertical, 10)\r\n                .padding(.horizontal, 30)\r\n                .background(Color.indigo)\r\n                .cornerRadius(50)\r\n        }\r\n        .padding()\r\n        Text(sentimentPrediction)\r\n            .padding()\r\n            .font(Font(UIFont(name: \"Arial\", size: 100)!))\r\n        \r\n    }\r\n    .padding(.horizontal, 30)\r\n    .cornerRadius(20)\r\n    .padding()\r\n    Spacer()\r\n}\r\n<\/pre>\n<p><strong>d.<\/strong> In the Button view, call the <strong>analyzeButton()<\/strong> function when the button is tapped:<br \/>\nless<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Button(action: {\r\n                    self.analyzeButton()\r\n                }) {\r\n                    Text(\"Analyze\")\r\n                        .fontWeight(.bold)\r\n                        .foregroundColor(.white)\r\n                        .padding(.vertical, 10)\r\n                        .padding(.horizontal, 30)\r\n                        .background(Color.indigo)\r\n                        .cornerRadius(50)\r\n                }\r\n                .padding()\r\n<\/pre>\n<p><strong>e.<\/strong> Create the <strong>analyzeButton()<\/strong> function: Inside the ContentView struct, create the <strong>analyzeButton()<\/strong> function that will use the ML model to analyze the user-entered text:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">private func analyzeButton() {\r\n        let model = try! SentimentAnalysisClassifier(configuration: MLModelConfiguration())\r\n        let input = SentimentAnalysisClassifierInput(text: userInput)\r\n        \r\n        guard let output = try? model.prediction(input: input) else {\r\n            return\r\n        }\r\n        \r\n        sentimentPrediction = output.label\r\n    }\r\n<\/pre>\n<p><strong>Now the full code will look like this.<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import SwiftUI\r\nimport CoreML\r\nstruct ContentView: View {\r\n    @State private var userInput = \"\"\r\n    @State private var sentimentPrediction = \"\"\r\n    \r\n    var body: some View {\r\n        VStack {\r\n            Text(\"Sentiment Analysis\")\r\n                .font(.largeTitle)\r\n                .fontWeight(.bold)\r\n                .padding(.top, 50)\r\n            Spacer()\r\n            VStack {\r\n                TextField(\"Enter your text here\", text: $userInput)\r\n                    .padding()\r\n                    .background(Color.white)\r\n                    .cornerRadius(10)\r\n                    .shadow(radius: 10)\r\n                Button(action: {\r\n                    self.analyzeButton()\r\n                }) {\r\n                    Text(\"Analyze\")\r\n                        .fontWeight(.bold)\r\n                        .foregroundColor(.white)\r\n                        .padding(.vertical, 10)\r\n                        .padding(.horizontal, 30)\r\n                        .background(Color.indigo)\r\n                        .cornerRadius(50)\r\n                }\r\n                .padding()\r\n                Text(sentimentPrediction)\r\n                    .padding()\r\n                    .font(Font(UIFont(name: \"Arial\", size: 100)!))\r\n                \r\n            }\r\n            .padding(.horizontal, 30)\r\n            .cornerRadius(20)\r\n            .padding()\r\n            Spacer()\r\n        }\r\n    }\r\n    \r\n    private func analyzeButton() {\r\n        let model = try! SentimentAnalysisClassifier(configuration: MLModelConfiguration())\r\n        let input = SentimentAnalysisClassifierInput(text: userInput)\r\n        \r\n        guard let output = try? model.prediction(input: input) else {\r\n            return\r\n        }\r\n\r\n\r\n        if output.label == \"Positive\" {\r\n            sentimentPrediction = \"\ud83d\ude42\"\r\n        }\r\n        else if output.label == \"Negative\" {\r\n            sentimentPrediction = \"\u2639\ufe0f\"\r\n        }\r\n        else if output.label == \"Neutre\" {\r\n            sentimentPrediction = \"\ud83d\ude10\"\r\n        }\r\n\r\n\r\n\r\n\r\n    }\r\n}\r\nstruct ContentView_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        ContentView()\r\n    }\r\n}\r\n<\/pre>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/swift-sentiment-analysis-app-output-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87973 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/swift-sentiment-analysis-app-output-scaled.webp\" alt=\"swift sentiment analysis app output\" width=\"2560\" height=\"1502\" \/><\/a><\/p>\n<h4>Step 5: Test the app on a simulator or a physical iOS device.<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87977\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/sentiment-analysis-swift-output.webp\" alt=\"create new xcode\" width=\"800\" height=\"813\" \/><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/sentiment-analysis-app-output-2.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-87976 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/06\/sentiment-analysis-app-output-2.webp\" alt=\"sentiment analysis app output\" width=\"800\" height=\"873\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Congratulations, you have successfully created a Sentiment Analysis iOS app using SwiftUI and Core ML! You have learned how to train a machine learning model using Xcode playground and how to use the model to predict whether a given text is positive or negative. You can now customize the app according to your needs, such as adding more features, improving the user interface, or integrating it with other APIs. Keep exploring the exciting world of Machine Learning and iOS development!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sentiment Analysis is a popular field in Machine Learning that involves the identification and extraction of subjective information from text. It is used to determine the emotional tone of a piece of content, whether&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":87955,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5053],"tags":[5046,5047,5048,5049,5050,5051,5052],"class_list":["post-87786","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swift-tutorials","tag-sentiment-analysis-app","tag-sentiment-analysis-app-project","tag-swift-project-for-practice","tag-swift-project-ideas","tag-swift-projects","tag-swift-sentiment-analysis-app","tag-swift-sentiment-analysis-app-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Swift Sentiment Analysis App - Where Words Speak Louder Than Actions! - TechVidvan<\/title>\n<meta name=\"description\" content=\"Gain valuable insights and understand emotions with the Swift Sentiment Analysis App. Analyze sentiment in text data with accuracy and ease.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift Sentiment Analysis App - Where Words Speak Louder Than Actions! - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Gain valuable insights and understand emotions with the Swift Sentiment Analysis App. Analyze sentiment in text data with accuracy and ease.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-26T05:05:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T10:32:43+00:00\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift Sentiment Analysis App - Where Words Speak Louder Than Actions! - TechVidvan","description":"Gain valuable insights and understand emotions with the Swift Sentiment Analysis App. Analyze sentiment in text data with accuracy and ease.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/","og_locale":"en_US","og_type":"article","og_title":"Swift Sentiment Analysis App - Where Words Speak Louder Than Actions! - TechVidvan","og_description":"Gain valuable insights and understand emotions with the Swift Sentiment Analysis App. Analyze sentiment in text data with accuracy and ease.","og_url":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2023-06-26T05:05:45+00:00","article_modified_time":"2026-06-03T10:32:43+00:00","author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Swift Sentiment Analysis App &#8211; Where Words Speak Louder Than Actions!","datePublished":"2023-06-26T05:05:45+00:00","dateModified":"2026-06-03T10:32:43+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/"},"wordCount":795,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#primaryimage"},"thumbnailUrl":"","keywords":["sentiment analysis app","sentiment analysis app project","swift project for practice","swift project ideas","swift projects","swift sentiment analysis app","swift sentiment analysis app project"],"articleSection":["Swift Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/","url":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/","name":"Swift Sentiment Analysis App - Where Words Speak Louder Than Actions! - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#primaryimage"},"thumbnailUrl":"","datePublished":"2023-06-26T05:05:45+00:00","dateModified":"2026-06-03T10:32:43+00:00","description":"Gain valuable insights and understand emotions with the Swift Sentiment Analysis App. Analyze sentiment in text data with accuracy and ease.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/swift-sentiment-analysis-app\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Swift Sentiment Analysis App &#8211; Where Words Speak Louder Than Actions!"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=87786"}],"version-history":[{"count":2,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87786\/revisions"}],"predecessor-version":[{"id":448163,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87786\/revisions\/448163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=87786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=87786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=87786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}