Package: breame
Breame(BritishEnglish andAmericanEnglish Language Tools)Breame is a lightweight Python package with a number of utility tools to aid in the detection of words that have dual spellings in British and American English.Breame can also be used to detect and provide definitions for words that have different meanings in both British English and American English.Additionally, Breame includes some tooling to detect and define words and phrases that are specific to British English or American English i.e. "strop" in British English or "mailman" in American English.InstallpipinstallbreameDocumentationQuick StartSpelling Detection and ConversionCheck American and British English Spelling for words exists:frombreame.spellingimportamerican_spelling_exists,british_spelling_existsamerican_spelling_exists("color")>>>Truebritish_spelling_exists("colour")>>>TrueGet British English spelling of American English word and vice versa:frombreame.spellingimportget_american_spelling,get_british_spellingget_american_spelling("colour")>>>'color'get_british_spelling("color")>>>'colour'Detect different word meanings in British and American Englishfrombreame.meaningsimportdifferent_meanings_exist,get_meaning_definitionsdifferent_meanings_exist("football")>>>Trueget_meaning_definitions("football")>>>{'American English':'American football','British English':'(usually) Association football (US: soccer). Less frequently applies to\nRugby football (espec. Rugby union in English private schools).'}Detect whether a word is a term or short phrase specific to American English or British EnglishAmerican:frombreame.terminologyimportis_american_english_term,get_american_term_definitionis_american_english_term("bleachers")>>>Trueget_american_term_definition("bleachers")>>>'are the raised open air tiered rows of seats (stands) found at sports fields or at other spectator events'British:frombreame.terminologyimportis_british_english_term,get_british_term_definitionis_british_english_term("wellies")>>>Trueget_british_term_definition("wellies")>>>'Wellington boots, waterproof rubber boots named after the Duke of Wellington.'ContributionsIf you would like to contribute to the package or add to the data constants used for spelling, meanings, or terminology please don't hesitate to submit a PR or raise an issue. The data used is by no means an exhaustive list.Data StatsStats for some of the data constants used throughout the package>=690words with multiple meanings covered in British, American, and Common English.>=321American English specific words or phrases.>=605British English specific words or phrases.>=1730British English spellings for American English words.get_british_spelling()>=1706American English spellings for British English words.get_american_spelling()AcknowledgementsThis package was inspired by the javascript libraryAmerican British English Translatorby@hyperrealityand@jessp01. All of the data constants defined in their package are gratefully used throughout breame.The sources forAmerican British English Translatorconstants are below:Uses modified versions of the following lists:List of words having different meanings in American and British English: A-LList of words having different meanings in American and British English: M-ZGlossary of American terms not widely used in the United KingdomGlossary of British terms not widely used in the United StatesComprehensive list of American and British spelling differences