GithubHelp home page GithubHelp logo

mirza-glitch / simple-english-dictionary-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 11.21 MB

Node.js-based English dictionary API. Simple search options, clear JSON responses. Can be self-hosted and scalable.

Home Page: https://meanings.onrender.com/

License: MIT License

JavaScript 47.02% HTML 52.98%
definitions dictionary english-dictionary english-learning dictionary-api definition-api

simple-english-dictionary-api's Introduction

Simple English Dictionary API

The Simple English Dictionary API is a user-friendly tool that offers straightforward definitions for words. It is also customizable, allowing for self-hosting to meet specific requirements. With over more than 121k words, the API contains vast amount of data.

This project was inspired by simple-english-dictionary on GitHub. The output files were obtained from tusharlock10's dictionary repo and uploaded to Dropbox.

Features

  • Provides simple English definitions for words
  • Can be hosted on a platform as an API or self-hosted
  • Supports GET requests with parameters for word lookup
  • Returns responses in JSON format

Usage Disclaimer

Please note that this project is intended for educational purposes only. The Simple English Dictionary API should not be used for commercial purposes without prior permission from the author.

Usage

The data can be accessed in various formats(is self hosting), including:

  • Two big chunks of json data separated into two files in "meaningsJson/" directory
  • A single JSON file called "processed/meanings.json" that contains all the words present in those two json files
  • You can also opt to replace this files with files from simple-english-dictionary repository.

However, if you want to change the json schema, you may also need to update how the API works with input as well.

Getting Started

Prerequisites

To use the Simple English Dictionary API, you'll need:

  • An internet connection (if using the hosted version)
  • Node.js installed (if self-hosting)

Installation

Hosted Version

No installation is required for the hosted version. Simply make GET requests to the API endpoint with the appropriate parameters.

API Endpoint: https://meanings.onrender.com/api/:word

Self-Hosted Version

  1. Clone the repository:
git clone https://github.com/Mirza-Glitch/simple-english-dictionary-api.git
  1. cd:
cd simple-english-dictionary-api
  1. Install dependencies:
npm install
  1. Run the express server:
npm start
  1. Make GET requests to http://localhost:3000/api/:word1/:word2 with the appropriate parameters.

  2. login as admin at http://localhost:3000/login with "admin" as username and password (use this to add, edit and delete dictionary data from API and more...).

  3. Change admin password and username from admin dashboard.

Usage

Make GET requests to the API endpoint with the following parameters:

  • word (required): The word to look up

Example request:

https://meanings.onrender.com/api/b

Example response:

[
  {
    "WORD": "B",
    "MEANINGS": [
      {
        "partsOfSpeech": "Noun",
        "definition": "the 2nd letter of the Roman alphabet",
        "relatedWords": [
          "Letter",
          "Letter of the alphabet",
          "Alphabetic character"
        ],
        "exampleSentence": []
      },
      {
        "partsOfSpeech": "Noun",
        "definition": "the blood group whose red cells carry the B antigen",
        "relatedWords": ["Blood group", "Blood type"],
        "exampleSentence": []
      }
    ],
    "ANTONYMS": [],
    "SYNONYMS": [
      "Bel",
      "Vitamin b complex",
      "B complex",
      "Atomic number 5",
      "Barn"
    ]
  }
]

You can also add another parameter for second word like:

https://meanings.onrender.com/api/a/b

This will fetch data for word 'a' and also for 'b'

You can also visit the official website for documentation

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgements

This project was created by Mirza-Glitch.

simple-english-dictionary-api's People

Contributors

mirza-glitch avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

faizalaaa joeczar

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.