Giter VIP home page Giter VIP logo

Comments (6)

charlesLoder avatar charlesLoder commented on June 16, 2024

@m-yac

Great question!

Transliteration and transcription are on a spectrum. The former attempts to accurately represents the characters of a script in another scripts, and the latter attempts to accurately represent the pronunciation of a language in another script.

With the example "יִשָּׂשכָר", you're right, it would definitely be read (i.e. transcribed) as "yissakhar" not "yissashkhar". The quiesced alef is a great analog.

The default schema, SBL Academic, requires that your transliterate the alef even when it doesn't have any phonetic value.

On the site, there is currently no way to adjust it, but in the node package, you can add to the ADDITIONAL_FEATURES like this:

const str = `יִשָּׂשכָר`;
const unmodified = heb.transliterate(str);
// yiśśāškār

const modified = heb.transliterate(str, {
  ADDITIONAL_FEATURES: [
    {
      FEATURE: "cluster",
      HEBREW: "^[^הוי]$",
      TRANSLITERATION: (cluster) => {
        // if final cluster, still return the text
        if (!cluster.next) {
          return cluster.text;
        }
        return "";
      }
    }
  ]
});
// yiśśākār

from hebrew-transliteration.

charlesLoder avatar charlesLoder commented on June 16, 2024

Closing as this isn't a bug, per se.

from hebrew-transliteration.

m-yac avatar m-yac commented on June 16, 2024

Thanks for such a great reply, that makes perfect sense!

I tried to get the example you wrote working, but it looks like it only works if I build the package from source – the version on NPM is from 4 months ago and doesn't support functions in ADDITIONAL_FEATURES. Do you have any sense of when you might push a new version of the node package to NPM?

from hebrew-transliteration.

charlesLoder avatar charlesLoder commented on June 16, 2024

Do you have any sense of when you might push a new version of the node package to NPM?

v2.4.0 is almost finished, but the last issue is a bit tricky.

Maybe if I don't finish #45 in the next couple of weeks, I'll just release 2.4 anyways

from hebrew-transliteration.

charlesLoder avatar charlesLoder commented on June 16, 2024

@m-yac

See v2.4 release, and the live site is using 2.4 as well

from hebrew-transliteration.

m-yac avatar m-yac commented on June 16, 2024

@charlesLoder Thank you so much! I've started experimenting and ran into a couple of pain points – I made a PR in havarotjs, and an issue and a discussion thread in this repo based on what I found.

from hebrew-transliteration.

Related Issues (20)

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.