Code Monkey home page Code Monkey logo

greek-conversion's Introduction

Mostly working on projects related to Ancient Greek.

greek-conversion's People

Contributors

antoineboquet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

greek-conversion's Issues

Behavior of the letter 'j'

Hi.. love the library and have only just begun exploring.. but I have a question why does an English word containing 'J' stay as 'J' when converted to Greek letters? Is there a setting to stop this?

Tonos/oxia issue

Reproduction

When converting some strings to greek, the output string can be wrong even if it looks good:

toGreek('huḯdion', keyType.TRANSLITERATION);
// Expected: "ὑΐδιον"; Received: "ὑΐδιον"

Fact

The fact is that the accented iota received a tonos rather than an oxia (tonos & oxia are, visually, some kinds of acute accent specific to greek).

In the example, we got ΐ (U+0390) Greek Small Letter Iota with Dialytika and Tonos rather than ΐ (U+1FD3) Greek Small Letter Iota with Dialytika and Oxia.

Even if the two diacritics look the same - in most fonts -, the Unicode norm has chosen to separate these diacritics. So, the tonos is intended for the 'modern' monotonic greek & the oxia for the 'ancient' polytonic greek.

Resolution

It seems that an oxia is replaced by a tonos when the Unicode normalization is applied (e. g. str.normalize('NFC')). This is due to the poor canonical equivalences defined by the Unicode norm.

If some other characters can be replaced during the conversion process using utils/normalizeGreek() (e.g. tilde to Combining Greek Perispomeni), this one seems to be more tricky: it's a diacritic, so if we want to process it individually we need to use NFD mode; but as soon as we come back to NFC, the conversion will be broken. If we want to process the tonos in NFC mode, then we must define all the combinations of diacritics that can be made for all the characters that can take a tonos on them.

Before solving this issue, it might be wise to weigh the pros and cons of trying to force the usage of the oxia rather than the tonos.

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.