| <!DOCTYPE html>
|
| <html lang="en">
|
|
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| <title>Essay Scoring</title>
|
| <style>
|
|
|
| * {
|
| box-sizing: border-box;
|
| margin: 0;
|
| padding: 0;
|
| }
|
|
|
|
|
| body {
|
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| background-color: #f8f8f8;
|
| color: #333;
|
| line-height: 1.6;
|
| padding: 20px;
|
| }
|
|
|
| .container {
|
| max-width: 800px;
|
| margin: 0 auto;
|
| background-color: #fff;
|
| padding: 20px;
|
| border-radius: 10px;
|
| box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
| }
|
|
|
| h1 {
|
| text-align: center;
|
| margin-bottom: 20px;
|
| color: #333;
|
| }
|
|
|
| form {
|
| background-color: #f9f9f9;
|
| padding: 20px;
|
| border-radius: 8px;
|
| box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
| margin-bottom: 20px;
|
| }
|
|
|
| label {
|
| display: block;
|
| margin-bottom: 10px;
|
| font-weight: bold;
|
| color: #555;
|
| }
|
|
|
| pre {
|
| font-size: 15px;
|
| }
|
|
|
| textarea {
|
| width: 100%;
|
| height: 150px;
|
| resize: vertical;
|
| margin-bottom: 15px;
|
| padding: 10px;
|
| border: 1px solid #ccc;
|
| border-radius: 5px;
|
| font-size: 16px;
|
| line-height: 1.6;
|
| }
|
|
|
| input[type="submit"] {
|
| background-color: #4CAF50;
|
| color: white;
|
| padding: 10px 20px;
|
| border: none;
|
| border-radius: 5px;
|
| cursor: pointer;
|
| font-size: 16px;
|
| transition: background-color 0.3s ease;
|
| display: block;
|
| width: 100%;
|
| }
|
|
|
| input[type="submit"]:hover {
|
| background-color: #45a049;
|
| }
|
|
|
| .results {
|
| background-color: #f9f9f9;
|
| padding: 20px;
|
| border-radius: 8px;
|
| box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
| margin-top: 20px;
|
| }
|
|
|
| h2 {
|
| color: #333;
|
| margin-bottom: 15px;
|
| }
|
|
|
| .score {
|
| margin-bottom: 20px;
|
| }
|
|
|
| .score strong {
|
| color: #4CAF50;
|
| }
|
|
|
| .evaluation {
|
| font-style: italic;
|
| color: #777;
|
| }
|
|
|
|
|
| .predictions {
|
| margin-bottom: 20px;
|
| }
|
|
|
| .predictions p {
|
| margin-bottom: 10px;
|
| color: #666;
|
| }
|
|
|
| .prediction-model {
|
| margin-bottom: 15px;
|
| }
|
|
|
| .prediction-model h3 {
|
| margin-bottom: 10px;
|
| color: #333;
|
| }
|
|
|
| .prediction-model ul {
|
| list-style-type: none;
|
| padding: 0;
|
| }
|
|
|
| .prediction-model li {
|
| margin-bottom: 5px;
|
| color: #666;
|
| }
|
|
|
| .prediction-model strong {
|
| color: #4CAF50;
|
| }
|
| </style>
|
| </head>
|
|
|
| <body>
|
| <div class="container">
|
| <h1>Automated Essay Grading System</h1>
|
| <form id="essayForm" method="post">
|
| <label for="essay"><pre>Should a government be allowed to limit the number of children a family can have?
|
| Enter your essay:</pre></label><br>
|
| <textarea id="essay" name="essay" required>{{ essay }}</textarea><br>
|
| <input type="submit" value="Submit">
|
| </form>
|
|
|
| <div id="results" class="results">
|
| {% if essay %}
|
| <div class="predictions">
|
| <h2>Predictions</h2>
|
| <div class="prediction-model">
|
| <h3>Model One Predictions</h3>
|
| <p><em>Predictions done using BERT and CELA Dataset</em></p>
|
| <ul>
|
| {% if grammar_score is not none %}
|
| <li><strong>Grammar Score:</strong> {{ grammar_score }}/8 : Calculates the grammar quality of the essay.</li>
|
| {% endif %}
|
| {% if lexical_score is not none %}
|
| <li><strong>Lexical Score:</strong> {{ lexical_score }}/8 : Evaluates the richness and appropriateness of vocabulary used.</li>
|
| {% endif %}
|
| {% if global_organization_score is not none %}
|
| <li><strong>Global Organization Score:</strong> {{ global_organization_score }}/8 : Assesses the overall structure and coherence of the essay.</li>
|
| {% endif %}
|
| {% if local_organization_score is not none %}
|
| <li><strong>Local Organization Score:</strong> {{ local_organization_score }}/8 : Analyzes the flow and cohesion within paragraphs and sentences.</li>
|
| {% endif %}
|
| {% if supporting_ideas_score is not none %}
|
| <li><strong>Supporting Ideas Score:</strong> {{ supporting_ideas_score }}/8 : Rates the effectiveness of supporting arguments or evidence.</li>
|
| {% endif %}
|
| {% if holistic_score is not none %}
|
| <li><strong>Holistic Score:</strong> {{ holistic_score }}/5 : Provides an overall assessment of the essay's quality considering various linguistic aspects.</li>
|
| {% endif %}
|
| </ul>
|
| </div>
|
| <div class="prediction-model">
|
| <h3>Model Two Predictions</h3>
|
| <p><em>Predictions done using BERT, self-made programmed functions, and Self-made Dataset using CELA</em></p>
|
| <ul>
|
| {% if grammar_score2 is not none %}
|
| <li><strong>Grammar Score:</strong> {{ grammar_score2 }}/10 : Analyzes the grammatical correctness of the essay, using a self-programmed model.</li>
|
| {% endif %}
|
| {% if spelling_score is not none %}
|
| <li><strong>Spelling Score:</strong> {{ spelling_score }}/10 : Rates the accuracy of spelling throughout the essay, using a self-programmed model.</li>
|
| {% endif %}
|
| {% if word_diversity_score is not none %}
|
| <li><strong>Word Diversity Score:</strong> {{ word_diversity_score }}/10 : Evaluates the diversity and richness of vocabulary usage, using a self-programmed model.</li>
|
| {% endif %}
|
| {% if essay_quality_score is not none %}
|
| <li><strong>Essay Quality Score:</strong> {{ essay_quality_score }}/10 : Provides an overall quality score based on various linguistic features and models, using the BERT model.</li>
|
| {% endif %}
|
| </ul>
|
| </div>
|
| </div>
|
| {% endif %}
|
|
|
|
|
| <div class="feedback">
|
| <h2>Feedback</h2>
|
| <ul>
|
|
|
| {% if grammar_score is not none %}
|
| <li>
|
| {% if grammar_score >= 7 %}
|
| Grammar: Excellent use of grammar throughout the essay, demonstrating strong command of language.
|
| {% elif grammar_score >= 5 %}
|
| Grammar: Good grasp of grammar with minor errors, overall well-written.
|
| {% elif grammar_score >= 3 %}
|
| Grammar: Some grammatical errors detract from clarity, improvements needed.
|
| {% else %}
|
| Grammar: Numerous and significant grammatical errors impact comprehension, substantial revisions required.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
|
|
|
|
| {% if lexical_score is not none %}
|
| <li>
|
| {% if lexical_score >= 7 %}
|
| Lexical: Impressive vocabulary usage, effectively enhances the essay's richness and depth.
|
| {% elif lexical_score >= 5 %}
|
| Lexical: Strong vocabulary employed, contributing to the essay's overall quality.
|
| {% elif lexical_score >= 3 %}
|
| Lexical: Adequate range of vocabulary, but could benefit from more varied expression.
|
| {% else %}
|
| Lexical: Limited vocabulary restricts expression and weakens the essay's impact.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
|
|
|
|
|
|
| {% if global_organization_score is not none %}
|
| <li>
|
| {% if global_organization_score >= 7 %}
|
| Global Organization: The essay exhibits a well-structured and coherent layout, effectively guiding the reader through clear transitions and logical progression of ideas.
|
| {% elif global_organization_score >= 5 %}
|
| Global Organization: Overall, the essay is mostly organized, with discernible structure and logical flow of ideas, though some areas could benefit from further coherence.
|
| {% elif global_organization_score >= 3 %}
|
| Global Organization: The essay demonstrates a need for better organization, with segments lacking clear transitions or coherence, leading to occasional confusion for the reader.
|
| {% else %}
|
| Global Organization: There is a noticeable lack of structure and coherence throughout the essay, resulting in difficulties in following the flow of ideas and understanding the overall argument.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
|
|
|
|
| {% if local_organization_score is not none %}
|
| <li>
|
| {% if local_organization_score >= 7 %}
|
| Local Organization: The essay demonstrates a smooth flow between paragraphs and sentences, effectively guiding the reader through cohesive transitions and maintaining coherence.
|
| {% elif local_organization_score >= 5 %}
|
| Local Organization: Overall, the essay exhibits a reasonable flow between paragraphs and sentences, though improvements could enhance the coherence and fluidity of the argument.
|
| {% elif local_organization_score >= 3 %}
|
| Local Organization: The flow between paragraphs and sentences is somewhat choppy, making it challenging for the reader to follow the progression of ideas consistently.
|
| {% else %}
|
| Local Organization: There are significant issues with the essay's internal structure, with paragraphs and sentences lacking clear transitions and making the argument difficult to follow.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
|
|
|
|
| {% if supporting_ideas_score is not none %}
|
| <li>
|
| {% if supporting_ideas_score >= 7 %}
|
| Supporting Ideas: Strong and compelling supporting arguments or evidence that bolster the essay's main points and strengthen the overall argument.
|
| {% elif supporting_ideas_score >= 5 %}
|
| Supporting Ideas: Adequate supporting evidence, though the essay could benefit from further elaboration or stronger examples to enhance the argument.
|
| {% elif supporting_ideas_score >= 3 %}
|
| Supporting Ideas: Limited or weak supporting evidence that does not fully strengthen the essay's main points, requiring more substantial support.
|
| {% else %}
|
| Supporting Ideas: The essay lacks sufficient or relevant supporting ideas, making the argument feel unsupported or underdeveloped.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
|
|
|
|
| {% if holistic_score is not none %}
|
| <li>
|
| {% if holistic_score >= 4 %}
|
| Holistic: An outstanding essay with well-developed ideas, clear structure, and impressive language use.
|
| {% elif holistic_score >= 3 %}
|
| Holistic: A solid essay, though minor improvements could be made in terms of organization and supporting ideas.
|
| {% elif holistic_score >= 2 %}
|
| Holistic: The essay demonstrates some effort, but it requires significant revisions in grammar, structure, and supporting arguments.
|
| {% else %}
|
| Holistic: The essay needs substantial improvements, with weaknesses in grammar, organization, and overall development.
|
| {% endif %}
|
| </li>
|
| {% endif %}
|
| </ul>
|
| </div>
|
| </div>
|
|
|
| </body>
|
| </html>
|
|
|