Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to Type Ryssian Cyrillic Letters #404

Open
gasyoun opened this issue Feb 28, 2023 · 6 comments
Open

Function to Type Ryssian Cyrillic Letters #404

gasyoun opened this issue Feb 28, 2023 · 6 comments
Labels
enhancement New website features

Comments

@gasyoun
Copy link
Member

gasyoun commented Feb 28, 2023

As mentioned I would want to be able to type Russian letters in https://sanskrit-lexicon.uni-koeln.de/simple/ so they would be converted to latin. We'v developed a VBEE converter we use for EmEditor. The order of the replacements matters. Let's take an example:

document.selection.Replace "jña","джня",eeFindNext Or eeFindReplaceEscSeq Or eeReplaceAll

If we search for "джня" it should return "jña" which in return in simple might give as "jñā" as well.

If we would start with:

document.selection.Replace "j","дж",eeFindNext Or eeFindReplaceEscSeq Or eeReplaceAll

We would miss this case:

document.selection.Replace "jj","ддж",eeFindNext Or eeFindReplaceEscSeq Or eeReplaceAll

Only at word endings:

document.selection.Replace "tṛ ","три ",eeReplaceAll Or eeFindReplaceRegExp,0

Only at word beginnings:

document.selection.Replace "/e","э",eeFindNext Or eeFindReplaceEscSeq Or eeReplaceAll

What format should I convert it to @funderburkjim?

_IAST-Rus_Converter_1.2.txt

@gasyoun gasyoun added the enhancement New website features label Feb 28, 2023
@funderburkjim
Copy link
Contributor

funderburkjim commented Feb 28, 2023

Let's start initially with a file whose lines are like:

russian iast
Example
Make the russian as short as possible in this.  E.g.  
и i
Since Russian has capital letters, a long iast I could be represented as
И ī
Note it is ok to have more than one Russian letter to correspond 1 iast letter.
For this first file, let's stick to how to represent just 1 iast letter.

Then, we'll have to understand other subtle points that this simple 'russian iast' mapping does not represent.

@OrphicEgg
Copy link

OrphicEgg commented Mar 1, 2023

a а ?backwards?
а ā
и i
и ī
у u
у ū
ри ṛ
ри ṝ
л ḷ
л ḹ
е е
ай ai
o o
ау au
х ḥ
н ṃ
к k
кх kh
г g
гх gh
н ṅ
ч c
чх ch
дж j
джх jh
нь ñ
т ṭ
тх ṭh
д ḍ
дх ḍh
н ṇ
т t
тх th
д d
дх dh
н n
п p
пх ph
б b
бх bh
м m
й y
р r
л l
в v
ш ś
ш ṣ
с s
х h

funderburkjim added a commit to sanskrit-lexicon/csl-apidev that referenced this issue Mar 1, 2023
@funderburkjim
Copy link
Contributor

trial 1

image

Notes:

  1. The cyrillic input functionality only applies with simple-search (version 1.1) and
    • input = simple, input_simple = default
  2. This trial uses transcoding file cyrillic_slp1.xml.
    • Closely based on @OrphicEgg listing above.
      • Please check first line in listing above, and correct
    • Note some differences in the comments in cyrillic_slp1.xml

@funderburkjim
Copy link
Contributor

Note cyrillic reference

@gasyoun
Copy link
Member Author

gasyoun commented Mar 3, 2023

Thanks so much, it works!

a а ?backwards?

What do you mean by backwards? Cyrillic looks similar to Latin, but they have different Unicode numbers.

Let's move one.

джньяна will not be found (wanted jñāna), because now we have to treat clusters in addition to converting just simple letters.

So we need джня jña above other rules.

funderburkjim added a commit to sanskrit-lexicon/csl-apidev that referenced this issue Mar 5, 2023
@funderburkjim
Copy link
Contributor

funderburkjim commented Mar 5, 2023

change 1

This change slightly different from the previous comment.

<e> <s>INIT</s> <in>джня</in> <out>jY</out> <next>INIT</next></e>
<!-- ignore these cyrillic characters -->
<e> <s>INIT</s> <in>ь</in> <out></out> <next>INIT</next></e>  

Thus джньяна does not work, but джнаяна does work, as does джнана.

Another source I used is https://www.lexilogos.com/keyboard/russian_conversion.htm.

If there are many other rules required, it might be efficient for you to experiment with a local installation which includes csl-apidev. You could adjust rules in cyrillic_slp1.xml until satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New website features
Projects
None yet
Development

No branches or pull requests

3 participants