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。
美国英国英国翻译常数的来源如下:
使用以下列表的修改版本: