Giter Club home page Giter Club logo

poly2mono's Introduction

poly2mono

Converts polytonic to monotonic.

Uses tkinter for the interface. If you don't need it, just run poly2mono in poly2mono.py directly onto your text.

Setup

Requires tkinter so you may have to pip install tk.

Run

  • python3 main.py for the window interface, as shown in the picture.
  • python3 test.py for the unittests.
  • python3 utils/create_dictionary.py to update the current dictionary.

Logic

The whole program is nothing but a chained replacement of key value pairs dumped in dictionary.json.

The building process is based on the insertion order of the final dictionary:

  1. Treat special cases that require spirits
  2. Remove spirits
  3. Remove accents from monosyllables (lots of case by case)

By the end, the final dictionary is of the form:

  • Regex: intended substitution. Ex: '\bΣτής\b': 'Στης'

Links

  • Translatum has a converter but it has a character limitation and quite some mistakes. It may still be a good option if you don't care about the mistakes and don't plan to use it on big texts.
  • There is also this perl module by Father Chrysostomos (I haven't tried it yet).

poly2mono's People

Contributors

daxida avatar

Watchers

 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.