How to use LLMs for Text Analysis

07/24/2023
by   Petter Törnberg, et al.
0

This guide introduces Large Language Models (LLM) as a highly versatile text analysis method within the social sciences. As LLMs are easy-to-use, cheap, fast, and applicable on a broad range of text analysis tasks, ranging from text annotation and classification to sentiment analysis and critical discourse analysis, many scholars believe that LLMs will transform how we do text analysis. This how-to guide is aimed at students and researchers with limited programming experience, and offers a simple introduction to how LLMs can be used for text analysis in your own research project, as well as advice on best practices. We will go through each of the steps of analyzing textual data with LLMs using Python: installing the software, setting up the API, loading the data, developing an analysis prompt, analyzing the text, and validating the results. As an illustrative example, we will use the challenging task of identifying populism in political texts, and show how LLMs move beyond the existing state-of-the-art.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/07/2023

Applying BERT and ChatGPT for Sentiment Analysis of Lyme Disease in Scientific Literature

This chapter presents a practical guide for conducting Sentiment Analysi...
research
12/27/2019

Language Independent Sentiment Analysis

Social media platforms and online forums generate rapid and increasing a...
research
03/24/2021

Exploiting the Unique Expression for Improved Sentiment Analysis in Software Engineering Text

Sentiment analysis on software engineering (SE) texts has been widely us...
research
07/14/2020

A Framework for Capturing and Analyzing Unstructured and Semi-structured Data for a Knowledge Management System

Mainstream knowledge management researchers generally agree that knowled...
research
07/19/2023

Comparing with Python: Text Analysis in Stata

Text analysis is the process of constructing structured data from unstru...
research
07/21/2016

A Perspective on Sentiment Analysis

Sentiment Analysis (SA) is indeed a fascinating area of research which h...
research
12/14/2021

TASSY – A Text Annotation Survey System

We present a free and open-source tool for creating web-based surveys th...

Please sign up or login with your details

Forgot password? Click here to reset