Giter Site home page Giter Site logo

mbfons / ai-dictionary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nhsx/ai-dictionary

0.0 0.0 0.0 458 KB

Prototype AI Dictionary from the NHS AI Lab

Home Page: https://nhsx.github.io/ai-dictionary/

License: MIT License

JavaScript 86.98% Python 9.21% CSS 3.81%

ai-dictionary's Introduction

node version 14 Validate terms.json

NHS AI Dictionary

What is it?

A simple dictionary of common AI terms with a health and care context, with basic search and navigation.

Term Management

The terms are currently stored in data/terms.json following the schema defined in data/terms.schema.json.

To add new terms, simply add a new item to the terms array following the structure below:

Field Type Description
title string The title of the term e.g. "Artificial Intelligence".
acronym string (optional) an acronym e.g. "AI"
description string The definition of the term.
slug string The short-name of the term for use in the URL and related terms e.g. "ai".
related array Array of slugs of related terms, e.g. "ai" or "machine-learning".

Take a look at the existing terms in the JSON file as an example of the structure above. You can also edit existing terms or remove them from the array.

Tests

  • Automated tests run to check valid JSON syntax on every push to this repo.
  • To run tests manually, using python3 from the main directory, execute:
    • pip install -r tests/requirements.txt
    • jsonschema --instance data/terms.json data/terms.schema.json
    • cd tests && python validate_json.py

Stack

The tool is primarily built using Next.js (v12) and Tailwind CSS (v3) on top of React (v17). There are also some other supporting tools such as Framer Motion, Headless UI and Heroicons.

There is currently no 'backend' for this project. A JSON file (data/terms.json) is used to house and manage the available terms.

Getting started

You will need:

  • node v14

It is recommended to use a node package manager like nvm to manage node versions.

Once the project has been cloned, ensure you have installed the required dependancies using the command below:

npm i

Now you have installed the required packages, you can start the development server using the following command:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Hot reloading is enabled on this project, so your changes should reflect in realtime when running the dev server without constantly refreshing the page.

Building

If you want to build and export the project locally, then run the commands below:

npm run build

If the build completes successfully, then you can export the project to static HTML files using the command:

npm run export 

Note: using the static export feature disables some of the features of Next.js as you can read here. Currently, none of these features are used on this project.

Deployment

Upon merging into main, the project is automatically deployed to Github Pages via a Githook Action found in .github/workflows/gh-pages-deploy.yml.

Licence

Unless stated otherwise, the codebase is released under the MIT Licence. This covers both the codebase and any sample code in the documentation.

The documentation including term definitions is © Crown copyright and available under the terms of the Open Government 3.0 licence.

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.