esmorph
Fast Spanish morphological analyzer written in Rust, the core of the esMorph library for Python.
- The analyses of a word form by a dictionary built from Wiktionary and treebanks, the most probable first: the lemma, the part of speech and the Universal Dependencies features.
- Case does not matter. A word absent as written is looked for without its accents and with a lost diaeresis.
- A verb with enclitic pronouns is analyzed as its verb, with the words of the token:
dámeloisda+me+lo. - The forms of a lexeme in the order of its paradigm and the form with given features: conjugation, gender and number.
- Tokens out of the dictionary by rules: punctuation, symbols, numbers, Roman numerals, names and acronyms.
- Unknown lowercase words guessed by their last part after a hyphen, a known prefix or their ending, with their forms.
- The dictionary is mapped into memory or read from the data of the program without copies.
Installation
[]
= "0.1"
The dictionary is in the crate esmorph-dict-es, used through the feature bundled (on by default). Without it the dictionary is read from a file:
let dictionary = open?;
Example
use Dictionary;
License
The code is distributed under the MIT license. The dictionary is under CC BY-SA 4.0.