Git Product home page Git Product logo

razumlivost's Introduction

@interslavic/razumlivost

npm version Build Status Coverage Status

Utilities to flavorize dictionary entries and calculate a smarter distance between languages.

To install in your project, use:

npm install @interslavic/razumlivost --save

Flavorization rules

At the moment, rules are stored in CSV files under __fixture__/rules directory.

To calculate written intelligibility between Interslavic words and words from another Slavic language, this repository relies on the following algorithm:

  1. Every Interslavic entry gets processed in three separate ways:
    1. Etymological. The entry goes through the replacement rules, that have E letter in their respective flavorizationLevel column.
    2. Standard. Only rules with S letter in the flavorizationLevel column will be applied for the transformation.
    3. Mistaken. Same as above, but for M letter.
  2. The translation variants undergo all transformations with R (i.e., Reverse) letter defined in their flavorization level column.

In the end, there will be multiple variants to compare, e.g.:

Interslavic word: jęčmenny
Russian translation: ячменный (jačmennyj)

Mistaken reading (distance = 6):
jęčmenny -> jecmenny -> джецменну (džecmennu)

Standard reading (distance = 2):
jęčmenny -> ječmenny -> йечменны -> ечменны

Etymological reading (distance = 0):
jęčmenny (adj.) -> jačmenny -> jačmennyj -> йачменный -> ячменный

The algorithm uses Levenshtein's editing distance to tell how close the Interslavic word and its translation are. If the base letters are the same except for diacrictics, the editing distance is considered to be 0.5 characters instead of 1.

razumlivost's People

Contributors

noomorph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.