Predicting Formality of Written Texts Using Machine Learning Algorithms
CSEF · 2017 Computational Systems & Analysis Fourth Award
Overview
Objectives/Goals My project goal was to create a program that could automatically classify a given text document with >80% accuracy into three levels of Formality: Formal, Casual and Semi-Formal. Methods/Materials Python program, Natural Language Tool Kit (NLTK) Library, 8 kinds of machine learning algorithms, 2 kinds of feature extraction methods, and 130 pieces of documents as labeled data. 10 experiments were conducted. The classifiers were trained using 100 labeled documents. The model was tested using 30 documents and accuracy was measured against the correct labels. Results 5 of the 8 classifiers were able to successfully predict the levels of formality with an average accuracy of 88.6%. Bag-of-Words feature extraction method was found more accurate (92.28%) than Part-of-Speech feature extraction method (84.5%). Conclusions/Discussion In conclusion, the project achieved its goal and successfully demonstrated a working program that used machine learning algorithms to predict levels of formality of any given text with >80% accuracy.
Summary statement
My project goal was to analyze the levels of formality of a given text with >80% accuracy using machine learning algorithms and natural language processing.
Help received
I created this program by myself with guidance from my parents.
Awards (1)
Competition history
- CSEF 2017
Resources
Related projects
CSEF · 2014
A Machine Learning Model for Automated Semantic Short Essay Assessment through Random Forest Based Ensembles and NLP
CSEF · 2015
Improving the Accuracy of Sentiment Classification: A Novel Synthesis of Computational and Analytical Methods
ISEF · 2021
Language Recognition With Machine Learning
CSEF · 2017
Using Stylometry Combined with an In-Class Writing Sample to Detect Plagiarism
CSEF · 2016
A Sense of Stylometry
CSEF · 2018
Analyzing Gender-Based Violence and Aggressive Behavior through Social Media Data
CSEF · 2013
Misspelled! Creating an Accurate Computerized Spell Correcting Algorithm
CSEF · 2002
Artificial Intelligence in a Nutshell
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects