brumalis
v1.0.2
Published
Globalization Made Easy
Downloads
54
Maintainers
Readme
Brumalis
Globalization Made Easy
Brumalis is an Inhouse AI
, ML
, and GeoData
package developed inhouse for the website fulminata. It is a complete package which includes :-
- Language Detection, using
n-grams
andnaive bayes
- Whole Bunch of Data
- Phone Number By Country (If you want to Contact your user using Twilio or something)
- Currency By Country (If you want to add Payments with
Stripe
or something) - Gender Detection using
naive bayes
andK-Means
- Native Language by country (If you want to greet your users authentically)
Installation
npm i brumalis
(for npm)
yarn add brumalis
(for yarn)
Write that and you're ready to go !
Get Started
Brumalis is supported in both the import
and require
syntaxes.
To Add Brumalis, write
const brumalis = require("brumalis");
// or
import * as brumalis from "brumalis";
Some Examples
Separate First Name and Last Name
const brumalis = require("brumalis");
console.log("First Name = " + brumalis.getFirstName("Tom Brady") +
", Last Name = " + brumalis.getLastName("Tom Brady"));
Output
First Name = tom, Last Name = brady
Get Native Text
const brumalis = require("brumalis");
console.log(brumalis.getNativeTextFromLanguageCode("AM"));
Output
አማርኛ
Identify Language
const brumalis = require("brumalis");
console.log(brumalis.identifyLanguageFromText("je vole vers les nuages"));
Output
{
Status: 'OK',
response: {
maxScore: 0.652,
percentage: 65,
langDetected: 'french',
},
}
Identify Gender
const brumalis = require("brumalis");
console.log(brumalis.getGender("Bob","EN"));
Output
male
Docs
getFirstName(fullName)
: Returns First Name when Given Full Name
getLastName(fullName)
: Returns Last Name when Given Full Name
getGender(firstName,lang = "EN")
: firstName
is the firstName of the Person we want to get the Gender of, lang
is the language that person speaks. lang
is set to english as default.
getCountryCode(country)
: Returns the 2 letter Country Code
getCurrencyFromCountryCode(countryCode)
: Returns the country from the 2 letter Country Code
getNativeTextFromLanguageCode(langCode)
: Returns the Native Text from the 2 letter Language Code
getPhoneCodeFromCountryCode(countryCode)
: Returns the Phone Code from the 2 letter Country Code
getCountryFromCountryCode(countryCode)
: Returns the Country from the 2 letter Country Code
Why Brumalis ?
- I'm Asian so you know it's going to work
- Performance. No 3rd Party Libraries. Renders Package in 0.05s
- Everything in one place. Globalization in one package
- Easy to read source code. Only one index file. Easily editable and modifiable
- I'm out of Reasons PLEASE INSTALL IT
License
You bet it's MIT
Creator
That's me, Lakshya Jain, a 13 year old Asian kid from India. So you know this is gonna be great lmao.
Well, That's Pretty Much it! Hoped you like it. I developed this for myself initially while working on fulminata, but I decided to make it an NPM package.So the source is garbage, pls don't checkout my github