Giter Site home page Giter Site logo

ielts-writing-checker's Introduction

IELTS Writing Checker

Check your essay based on the original IELTS rubric with AI.

showcase

Server Functions

The server is built using Quart, a Python ASGI web microframework. It also uses the Quart-CORS extension to handle Cross-Origin Resource Sharing (CORS), allowing the client to communicate with the server.

Main Functions

  • setup_prompt(trait, description): Sets up the prompt for the AI model. It takes a trait and its description as arguments and returns a string that instructs the AI to evaluate the essay based on the given trait.

  • retrieve_quotations(prompt, essay, trait): This function generates a task for the model to retrieve quotations from the essay that are relevant to the given trait. It returns a string that instructs the AI to list and evaluate relevant quotations.

  • score_trait(quotations, trait, scoring_criteria): Generates a task for the model to score the essay based on the given trait. It takes the quotations retrieved by the AI, the trait, and the scoring criteria as arguments, and returns a string that instructs the AI to score the trait based on the provided quotations and criteria.

  • send_prompt(client, model, messages): Async function that sends a prompt to the AI model and retrieves its response. It takes the Groq client, the model name, and the messages to send as arguments. It returns the AI's response as a string.

  • evaluate_trait(client, model, prompt, essay, trait, description, criteria): Async function that evaluates a single trait of the essay. It uses the send_prompt function to communicate with the model. It returns the score given by the AI for the trait.

  • evaluate_essay(api_key, model, prompt, essay, traits, descriptions, criteria_list): This is the asynchronous function that evaluates the entire essay. It uses the evaluate_trait function to evaluate each trait of the essay. It returns a dictionary where the keys are the traits and the values are the scores given by the AI.

Routes

  • @app.route('/api/evaluate', methods=['POST']): This is the main route of the server. It handles POST requests at the /api/evaluate endpoint. When a request is received, it retrieves the essay and topic from the request data, evaluates the essay using the evaluate_essay function, and returns the scores as a JSON object.

Client

Frontend made with Next.js.

ielts-writing-checker's People

Contributors

yc3t 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.