Skip to main content

A package which retrieves meaning and other informations about italian words.

Project description

Build Status codecov PyPI version Python PRS

ItalianDictionary

This package searches for word meanings on dizionario-italiano.

Install

pip install italian-dictionary

Usage

import italian_dictionary

# Use this to get only the meaning 
definition = italian_dictionary.get_definition('cane', limit=3, all_data=False) 

#Use this to get all datas of a word (all_data default is True)
datas = italian_dictionary.get_definition('albero')

Complete data response

This function will return a dictionary like this:

{
'sillabe': ['al', 'be', 'ro'],
'lemma': 'àlbero', 
'pronuncia': ' /ˈalbero/', 
'grammatica': ['sostantivo maschile'], 
'definizione': ['pianta con fusto alto, legnoso, provvisto di rami nella parte superiore', 
               "MARINERIA --  palo che regge i pennoni con le vele e tutta l'attrezzatura", 
               'MECCANICA --  parte rotante, generalmente cilindrica, che, in una macchina, ha la funzione di trasmettere potenza meccanica da un organo a un altro'], 
'locuzioni': ["linea d'asse o d'alberi di una nave", 
             'ad albero che cade dàgli dàgli', 
             'svasare un albero', 
             'albero portaelica', 
             'albero a calcese', 
             'albero castalio', 
             'albero matricino', 
             'alberi a mezzovento', 
             'albero optronico', 
             'albero pizzuto', 
             'andare agli alberi pizzuti', 
             'alberi rinterzati', 
             'albero del sego'] 
}

Tests

To run tests you need pytest When in project folder: python -m pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

italian_dictionary-1.5.tar.gz (4.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page