breame
v0.1.0 Initial Release
( br itish e nglish and am erican e nglish)
Breame是一個輕巧的Python包裝,並帶有許多實用工具,可幫助檢測具有英語和美國英語雙重拼寫的單詞。
Breame也可以用來檢測和提供對英語英語,美國英語和普通英語含義不同的單詞的定義。
此外,Breame還包括一些工具來檢測和定義特定於英國英語或美國英語的單詞和短語,即英語英語或美國英語中的“ Mailman”。
pip install breame檢查是否存在一個單詞的美國和英國英語拼寫:
from breame . spelling import american_spelling_exists , british_spelling_exists
american_spelling_exists ( "color" )
>> > True
british_spelling_exists ( "colour" )
>> > True獲取英國英語拼寫的美國英語單詞,反之亦然:
from breame . spelling import get_american_spelling , get_british_spelling
get_american_spelling ( "colour" )
>> > 'color'
get_british_spelling ( "color" )
>> > 'colour' from breame . meanings import different_meanings_exist , get_meaning_definitions
different_meanings_exist ( "football" )
>> > True
get_meaning_definitions ( "football" )
>> > { 'American English' : 'American football' ,
'British English' : '(usually) Association football (US: soccer). Less frequently applies to n Rugby football (espec. Rugby union in English private schools).' }美國人:
from breame . terminology import is_american_english_term , get_american_term_definition
is_american_english_term ( "bleachers" )
>> > True
get_american_term_definition ( "bleachers" )
>> > 'are the raised open air tiered rows of seats (stands) found at sports fields or at other spectator events'英國:
from breame . terminology import is_british_english_term , get_british_term_definition
is_british_english_term ( "wellies" )
>> > True
get_british_term_definition ( "wellies" )
>> > 'Wellington boots, waterproof rubber boots named after the Duke of Wellington.' 如果您想為軟件包做出貢獻或添加到用於拼寫,含義或術語的數據常數,請隨時提交PR或提出問題。所使用的數據絕不是詳盡的列表。
整個軟件包中使用的一些數據常數的統計信息
get_british_spelling()get_american_spelling() 該包裝的靈感來自JavaScript圖書館,由@hyperrereality和 @jessp01的美國英國英語翻譯。在其包裝中定義的所有數據常數都非常感謝整個Breame。
美國英國英國翻譯常數的來源如下:
使用以下列表的修改版本: