Skip to content

The E2BWordBank package provides a comprehensive English-to-Bangla word database for easy integration into react and angular applications.

License

Notifications You must be signed in to change notification settings

faisalcse1/E2B_Word_Bank_npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E2B_Word_Bank

npm version
The E2BWordBank package provides a comprehensive English-to-Bangla word database for easy integration into react and angular applications.


Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. API Documentation
  5. Contributing
  6. License

Features

  • Retrieve the entire word list.
  • Search for words by English term.
  • Search for words by Bangla term.
  • Find words starting with specific English or Bangla terms.

Installation

Install the package using npm:

npm install e2b_word_bank

Usage

Importing the e2b_word_bank

import {
  getAllWords,
  findWordByEnglish,
  findWordByBangla,
  findWordsByEnglishStartWith,
  findWordsByBanglaStartWith
} from 'e2b_word_bank';

API Documentation

1. getAllWords()

Retrieve the entire word list.

Returns:

  • Array<Object>: The full list of words, where each item contains English and Bangla fields.

Example:

const allWords = getAllWords();
console.log(allWords);
/*
[
  { sl: 1, en: 'A', bn: 'ইংরেজী বর্ণমালার প্রথম বর্ণ' },
  { sl: 2, en: 'A Bad Egg', bn: 'ফালতু লোক' },
  ...
]
*/

2. findWordByEnglish(term)

Finds the first item in the word list where the en field matches the given English term (case-insensitive).

Parameters:

  • term: string - The English term to search for.

Returns:

  • Object|null: The first matching item, or null if no match is found.

Example:

const match = findWordByEnglish('A');
console.log(match);
/*
{ sl: 1, en: 'A', bn: 'ইংরেজী বর্ণমালার প্রথম বর্ণ' }
*/

3. findWordByBangla(term)

Finds the first item in the word list where the bn field matches the given Bangla term.

Parameters:

  • term: string - The Bangla term to search for.

Returns:

  • Object|null: The first matching item, or null if no match is found.

Example:

const match = findWordByBangla('লোক');
console.log(match);
/*
{ sl: 2, en: 'A Bad Egg', bn: 'ফালতু লোক' }
*/

4. findWordsByEnglishStartWith(term)

Finds all items in the word list where the en field starts with the given term (case-insensitive).

Parameters:

  • term: string - The English term to search for.

Returns:

  • Array<Object>: A list of matching items.

Example:

const matches = findWordsByEnglishStartWith('A');
console.log(matches);
/*
[
  { sl: 1, en: 'A', bn: 'ইংরেজী বর্ণমালার প্রথম বর্ণ' },
  { sl: 2, en: 'A Bad Egg', bn: 'ফালতু লোক' },
  ...
]
*/

5. findWordsByBanglaStartWith(term)

Finds all items in the word list where the bn field starts with the given Bangla term.

Parameters:

  • term: string - The Bangla term to search for.

Returns:

  • Array<Object>: A list of matching items.

Example:

const matches = findWordsByBanglaStartWith('ইংরেজী');
console.log(matches);
/*
[
  { sl: 1, en: 'A', bn: 'ইংরেজী বর্ণমালার প্রথম বর্ণ' }
]
*/

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on the GitHub repository.


License

This project is licensed under the MIT License. See the LICENSE file for details.

About

The E2BWordBank package provides a comprehensive English-to-Bangla word database for easy integration into react and angular applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published