/spanish_inflections

Identify and change gender and number of adjetives and nouns in spanish

Primary LanguagePythonMIT LicenseMIT

spanish_inflections

Identify and change the gender and number of adjetives and nouns in spanish.

How it works?

This is a Python script that relies in a big list of spanish words and its EAGLES tags taken from the Freeling project to find information about the gender and number alternatives of adjetives and nouns.

How to use?

Adjetives

from spanish_inflections import search_adjetive
adjetive = "grandes"
adjetive_details = search_adjetive(adjetive)
print(adjetive_details)

# OUTPUT
'''
{'original': 'grandes',
 'FS': 'grande',
 'FP': 'grandes',
 'MS': 'grande',
 'MP': 'grandes'}
'''

Nouns

from spanish_inflections import search_noun
noun = "perro"
noun_details = search_noun(noun)
print(noun_details)

# OUTPUT
'''
{'original': 'perro', 'MS': 'perro', 'MP': 'perros'}
'''

For more details check examples.ipynb

References