Skip to content

sekhansen/text_algorithms_econ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Text Algorithms in Economics

Companion notebooks to ``Text Algorithms in Economics'' by Elliott Ash and Stephen Hansen. If you reuse in teaching or research, please cite the published article in the Annual Review of Economics (2023).

Notebooks content outline

All notebooks contain a button that allows the user to execute the notebook in Google Colab: Open In Colab

Notebook 1: Simple dictionary examples with regular expressions

  • Summary: This notebook illustrates how a simple count of negative and positive terms can generate a sentiment index that correlates with GDP growth.
  • Data: Minutes from the Monetary Policy Committee at the Bank of England.

Notebook 2: Preprocessing and document-term matrix creation

  • Summary: This notebook illustrates how to apply multiple preprocessing steps to clean text data and build a document-term matrix.
  • Data: Minutes from the Monetary Policy Committee at the Bank of England.

Notebook 3: Dimensionality reduction with LDA

  • Summary: This notebook illustrates how to reduce the dimension of the document-term matrix with one particular method; Latent Dirichlet Allocation (LDA).
  • Data: USA State of the Union Addresses and Minutes from the Monetary Policy Committee at the Bank of England.

Notebook 4: Word2Vec

  • Summary: This notebook illustrates how to estimate word embeddings using the word2vec algorithm.
  • Data: Bank of England Inflation Reports and Minutes from the Monetary Policy Committee at the Bank of England.

Notebook 5: Large language models for feature generation

  • Summary: This notebook illustrates multiple strategies to generate embedded representations of text sequences using BERT. It then compares the quality of these representations by using them for a regression task.
  • Data: 10-K reports for selected firms.

Notebook 6: Finetuning a large language model

  • Summary: This notebook illustrates how to finetune a large language model for a particular classification task.
  • Data: 10-K reports for selected firms.

Notebook 7: GPT demonstration

  • Summary: This notebook shows how to interact with GPT using OpenAI's API.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published