<jupyter_start><jupyter_text>Reproducing results of the paper _Before Name-calling: Dynamics and Triggers of Ad Hominem Fallacies in Web Argumentation_
There are three models which are used in the paper:
* `CNN` and `Stacked Bi-LSTM` model for classification of comments without context
* `SSASE` model for classification with context<jupyter_code># mounting Google Drive
from google.colab import drive
drive.mount('/content/gdrive')
%%shell
cd /content/gdrive/'My Drive'/
rm -rf Ad-hominem-fallacies
git clone https://github.com/utkarsh512/Ad-hominem-fallacies.git
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
pip install virtualenv
virtualenv env --python=python3
source env/bin/activate
pip install lda scipy==1.1.0 nltk==3.2.5
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
wget https://public.ukp.informatik.tu-darmstadt.de/ih/RedditChangeMyView2017/en-top100k.embeddings.pkl.gz
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
tar -xvf sampled-threads-ah-delta-context3.tar.bz2 -C data/
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
pip install lda
python classification_experiments.py --model cnn
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
pip install lda
python classification_experiments.py --model bilstm
%%shell
cd /content/gdrive/'My Drive'/Ad-hominem-fallacies/experiments
pip install lda
python classification_experiments.py --model ssase<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1065359477124183, 'fraction_numerical': 0.01241830065359477, 'mean_word_length': 5.003921568627451, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '509656', 'license': 'Apache-2.0', 'n_tokens_mistral': 542, 'n_tokens_neox': 519, 'n_words': 127, 'path': 'unittest.ipynb', 'repo_name': 'utkarsh512/Ad-hominem-fallacies', 'size': '1530'}