All datasets are in the election_platform_data folder.
The model code used to generate the model is in the model folder.
The ui folder contains the code to run the ui, run ui.py directly to get the URL of the web version of the ui.
data_cleaning.py has the code for data cleaning.
data_selection.ipynb is the code to integrate the data.
p_and_c.csv is all the data used to train progressivism and conservatism.
r_and_l.csv is all the data used to train regulationism and liberalism.
translation.ipynb is the code used to translate non-English text.
Change_DataType.py is the code used to standardize the format of the data within the dataset.
validation and train folders are the training records automatically generated by the system.
PolitiTrend leverages natural language processing techniques to predict the political stance of text messages. Inspired by ideology tests, it classifies text into economic (regulationism, liberalism) and political-cultural (progressivism, conservatism) spheres.
Data sourced from Manifesto Project, categorized into four political stances. We implemented data pre-processing steps like lemmatization, stopword, and punctuation removal.
Our models demonstrate high accuracy but face challenges like misclassification, misuse of softmax outputs, and handling neutral statements. We discuss strategies to overcome these.
Feifan Li:
Responsible for Collecting and preprocessing the PolitiTrend dataset.
Responsible for categorizing these labels into four categories
Responsible for fine-tuning the ‘TFBertForSequenceClassification’ BERT model
Responsible for training the ‘GPT2’ model used for classification
Responsible for Qualitative Analysis of Model performance
Responsible for Gradio implementation
Responsible for the final report
Ge Jin:
Responsible for categorizing these labels into four categories
Responsible for constructing the baseline model and selecting the best parameters
Responsible for training the ‘GPT2’ model used for classification
Responsible for Gradio implementation
Responsible for Quantitative Analysis of Model performance
Responsible for the final report
Permission granted for posting the final report and source code.




