Skip to main content

A morphological dictionary tool.

Project description

# Morpho-Syntactic "MoSyn" API


### Description
This API has been created by the Universidad Autónoma de Guadalajara(UAG) Big Data Research Group as a Natural Language Processing tool. It provides a python library with functions that help to perform morphological anaysis on texts written in Spanish.

- Quick overview on what morphological analysis is in the following video: [El análisis morfológico de una oración](

Additional information about the creation of the morphological dictionary can be found in the following Article:
* P.J. Castro Pérez, A.A. García Fuentes, M. E. Huerta Arreola, R. Dávila Pérez. (2016). Machine Readable Dictionary for Mexican Spanish. En Tecnologías Modernas para la Industria y la Educación. Cuernavaca, Morelos, Mexico: Institute Eng Electric Electronics Morelos Section, S.C. (607-95255).


## Installation
The following packages are required to install mosyn
- Python: [](
- PyPI: [](
- NLTK: [](

Once having installed the depenencies above then install mosyn:
# pip install mosyn

If at any point the following error appears:
Resource u'tokenizers/punkt/english.pickle' not found. Please
use the NLTK Downloader to obtain the resource:


Searched in:
- '/home/ec2-user/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
- u''
try the instructions in the following link:

## Running examples
Examples may need to be downloaded from GitHub and locally copied. Examples should be copied to the same level where mosyn has been installed for they to work out of the box.

Use the command `pydoc mosyn´ to find out the directory where mosyn has been installed installed to:
$ pydoc mosyn

After hit enter a screen with a text similar to the following should appear:
Help on package mosyn:

mosyn - # -*- coding: iso-8859-15 -*-


util (package)


In that example mosyn is installed in `/Library/Python/2.7/site-packages/mosyn-1.0.5-py2.7.egg/mosyn`. Download examples directory to that location:
-rw-r--r-- 1 root wheel 413 Sep 20 23:18
-rw-r--r-- 1 root wheel 439 Sep 20 23:18 __init__.pyc
-rw-r--r-- 1 root wheel 265 Sep 20 23:18
-rw-r--r-- 1 root wheel 256 Sep 20 23:18 __main__.pyc
drwxr-xr-x 3 root wheel 102 Sep 20 23:18 dict
drwxr-xr-x 8 root wheel 272 Sep 20 23:37 examples <<===
-rw-r--r-- 1 root wheel 12023 Sep 20 23:18
-rw-r--r-- 1 root wheel 12875 Sep 20 23:18 mosyn.pyc
drwxr-xr-x 12 root wheel 408 Sep 20 23:18 util

Navigate to that directory and execute one of the examples; e.g.:
$ cd examples
python python2.x/
Processing: Poema20.txt.
" PUEDO " ( lema: poder )
VMIP1S0 -> singular verb without gender

" escribir " ( lema: escribir )
V0N0000 -> undefined number verb without gender

" los " ( lema: el )
DA0MP0 -> plural male determinant
PP3MPA00 -> plural male pronoun
NCMS000 -> singular male name

. . .


" escribo " ( lema: escribir )
V0IP1S0 -> singular verb without gender
VMIP1S0 -> singular verb without gender

" . " ( lema: . )
FP -> undefined number punctuation without gender

## Contact
Please address questions to
Report a bug by creating an issue in the following link:

<div style="text-align:center"><a rel="license" href=""><img alt="Creative Commons License" style="border-width:0" src="" /></a><br />This work is licensed under a <a rel="license" href="">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.</CENTER></div>

Project details

Download files

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

Files for mosyn, version 1.0.9
Filename, size File type Python version Upload date Hashes
Filename, size mosyn-1.0.9.tar.gz (5.0 MB) File type Source Python version None Upload date Hashes View
Filename, size mosyn-1.0.9-py3-none-any.whl (5.3 MB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page