Skip to main content Accessibility help
×
Hostname: page-component-89b8bd64d-n8gtw Total loading time: 0 Render date: 2026-05-11T10:10:23.651Z Has data issue: false hasContentIssue false

Text Analysis in Python for Social Scientists

Prediction and Classification

Published online by Cambridge University Press:  15 February 2022

Dirk Hovy
Affiliation:
Università Commerciale Luigi Bocconi, Milan

Summary

Text contains a wealth of information about about a wide variety of sociocultural constructs. Automated prediction methods can infer these quantities (sentiment analysis is probably the most well-known application). However, there is virtually no limit to the kinds of things we can predict from text: power, trust, misogyny, are all signaled in language. These algorithms easily scale to corpus sizes infeasible for manual analysis. Prediction algorithms have become steadily more powerful, especially with the advent of neural network methods. However, applying these techniques usually requires profound programming knowledge and machine learning expertise. As a result, many social scientists do not apply them. This Element provides the working social scientist with an overview of the most common methods for text classification, an intuition of their applicability, and Python code to execute them. It covers both the ethical foundations of such work as well as the emerging potential of neural network methods.
Get access

Information

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Element purchase

Temporarily unavailable

Save element to Kindle

To save this element to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Text Analysis in Python for Social Scientists
  • Dirk Hovy, Università Commerciale Luigi Bocconi, Milan
  • Online ISBN: 9781108960885
Available formats
×

Save element to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Text Analysis in Python for Social Scientists
  • Dirk Hovy, Università Commerciale Luigi Bocconi, Milan
  • Online ISBN: 9781108960885
Available formats
×

Save element to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Text Analysis in Python for Social Scientists
  • Dirk Hovy, Università Commerciale Luigi Bocconi, Milan
  • Online ISBN: 9781108960885
Available formats
×