GithubHelp home page GithubHelp logo

cs685-narrative-analysis's Introduction

[CS685] Examining Medical Narratives of Eating Disorder Recovery on Reddit

Code Structure (tasks are described by Section 5)

  1. Narrative Detection
  • /narrative_detection/explore_data.ipynb contains the code to train the classification task
  1. Domain-Specific Sentiment Lexicons
  • /data-collection contains both code to crawl the data nd code for sentiment polarity
    • /embeddings/word2vec_word_embeddings.ipynb and ./word_types.ipynb are used to train the embeddings and compute scores respectively
  1. Instruction Prompting for Trigger and Factor Extraction
  • /clinical-extractions/ contains the code for the extraction of trigger and factors
    • ./chatgpt.py is the code to extract helpful and harmful factors
    • ./chatgpt_extract_trigger.py is the code to extract triggers
    • ./utils.py contains all the prompts used and experimented with
    • ./sample_selection_trigger_extraction.ipynb uses topic modeling to generate samples for evaluation and few-shot prompting. It also contains code for evaluation.
  1. Topic Modeling
  • /topic_modeling/ contains the code for the topic modeling experiments.
    • /data/input/custom_stopwords.txt contains custom stopwords.

    • /data/analysis/topic_label_*.txt contains the topic labels for k=* and top 10 keywords for each topic.

    • /data/positive_topic_dist.csv contains the topic distribution for positive posts.

    • /script/lmw_result.ipynb contains code for preprocessing, training and analyzing the topic modeling results.

    • /script/lmw.py contains helper code for training the LDA model.

  1. Power and Agency Analysis
  • /power_frames/power-frames-ORIGINAL is the original repo from https://github.com/maria-antoniak/power-frames with slight modifications.
  • /power_frames/power-frames is the modified power analysis with coreference resolution added.
  • Important scripts inside /power_frames/:
    • `compute_power.ipynb': taken from the original power-frames repo, but with our own personas defined
    • 'compare_power.ipynb': make charts and figures comparing different methods
    • 'find_missing_verbs.ipynb': parse data with spaCy and extract verbs
    • 'gpt_augment_lexicon.ipynb': prompt chatgpt to label verbs

cs685-narrative-analysis's People

Contributors

jelchou avatar anthonycampbell208 avatar chtmp223 avatar nguyentr17 avatar marisajh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.