Numerous Problems Multiplied

    morph-it-helper
    TypeScript icon, indicating that this package has built-in type declarations

    4.2.5 • Public • Published

    morph-it-helper

    morph-it provides an extensive morphological resource for the Italian language. It is dual-licensed free software and can be redistributed it and/or modified under the terms of the under the Creative Commons Attribution ShareAlike 2.0 License and the GNU Lesser General Public License.

    morph-it-helper very simple Node.js module that contains:

    • morph-it derived json files
    • a helper class to get data from these json files

    The derived json files content remains under the same Creative Commons Attribution ShareAlike 2.0 License and the GNU Lesser General Public License licence.

    Installation

    npm install morph-it-helper

    Usage

    let MorphItHelper = require('morph-it-helper').MorphItHelper;
    
    let mih = new MorphItHelper();
    
    // uomo
    console.log(mih.getNoun('uomini'));
    
    // antico
    console.log(mih.getAdj('antiche'));

    The json files are created from morph-it via the createDb script.

    Current helpers:

    • getNoun takes a lemma (string) or flex form (string) of a noun and returns its root. uomini => uomo. null when not found. When it is a past participle, it will not return the lemma (the infinitive verb) but its masculine singular form: educati => educati (and not educare)
    • getAdj takes a lemma (string) or a flex form (string) of an adjective and returns its root. antiche => antico. null when not found.

    Todo

    Enrich features.

    dependencies and licences

    The code is under Apache 2.0 license.

    The derived json files content remains under the same Creative Commons Attribution ShareAlike 2.0 License and the GNU Lesser General Public License licence.

    Install

    npm i morph-it-helper

    DownloadsWeekly Downloads

    376

    Version

    4.2.5

    License

    Apache-2.0

    Unpacked Size

    2.86 MB

    Total Files

    13

    Last publish

    Collaborators

    • ludan.stoeckle