mldictionary
v0.2.6
> >> from mldictionary import English
> >> english_dictionary = English ()
> >> snake_means = english_dictionary . get_meanings ( 'snake' )
> >> len ( snake_means )
4
> >> snake_means
[ 'a reptile with a long body and no legs: ' ...]
...$ pip install mldictionaryMldictionalary正式支持3.9+。
> >> from mldictionary import Portuguese
> >> portuguese_dictionary = Portuguese ()
> >> vida_means = portuguese_dictionary . get_meanings ( 'vida' )
> >> vida_means
[ 'Conjunto dos hábitos e costumes de alguém; maneira de viver: tinha uma vida de milionário.' ...]
>> > from mldictionary import Spanish
>> > spanish_dictionary = Spanish ()
>> > coche_means = spanish_dictionary . get_meanings ( 'coche' )
>> > coche_means
[ 'Automóvil destinado al transporte de personas y con capacidad no superior a siete plazas.' ...] from mldictionary import Dictionary
class MyOwnDictionary ( Dictionary ):
url = 'somedictionary.com'
language = 'language name'
target_tag = 'tag_where_means_is'
target_attr = { 'attr' : 'attr_value' }
replaces = { 'something' , 'another thing' }
> >> myowndictionary = MyOwnDictionary ()
> >> myowndictionary . get_meanings ( 'other language word' )有关更多详细信息,请参阅Wiki
此外,它还有一篇关于LinkedIn的有见地的文章