Assalomu alaykum, yordam.uz saytimizga xush kelibsiz.
Bu saytda o`zingizni qiziqtirgan savollarga javob olishingiz va o`z sohangiz bo`yicha savollarga javob berishingiz mumkin. Bizning Oilamizga a'zo bo`lganingiz uchun chuqur Minnatdorchilik bildiramiz !!!

Lotin - Krill algoritm

+5 ovoz
867 marta ko‘rilgan
so‘radi 02 mart, 17 Murod (25 bal)
Lotin yozuvidan Krill ga yoki aksincha o‘zgartirishning aniq algoritmi bormi? Android uchun bir dastur(cha) yozayotgan edik. Ikkala yozuvni hech bir biriga moslay olmayapmiz. Internetni qidirsam mendan oldin ham bu muammoga ko‘p duch kelishgan ekan. Lekin aniq yechimni topa olishmagan shekilli. Agar ushbu muammoni yechimini (algoritmini) kimdir bilsa va yordam bersa zo‘r ish bo‘lar edi
izoh qoldirdi 02 mart, 17 mirafzal (116 bal)
imlo.insof.uz sayti adminidan so'rab ko'ring, balki yordam berishar

4 Javoblar

+2 ovoz
javob berdi 02 mart, 17 Fozilbek (154 bal)
public class CrillToLatin {

    public static String crillToLatin(String text) {

        String lotinAlpha = "A B V G D Ye J Z I Y K L M N O P R S T U F X Ts Ch Sh Sh I I ' E Yu Ya ";
        String[] lotinArr = getArrayFromString(lotinAlpha);

        int i = 0;
        for (char letter : text.toCharArray()) {
            int charId = 1103 - (int) letter;


            switch ((int) letter) {
                case 1025:
                    text = text.replaceAll(String.valueOf(letter), "Yo");
                    break;
                case 1105:
                    text = text.replaceAll(String.valueOf(letter), "yo");
                    break;
                case 1045:
                    if (text.indexOf(letter) == 0)
                        text = text.replace(String.valueOf(letter), "Ye");
                    else
                        text = text.replace(String.valueOf(letter), "E");
                    break;
                case 1077:
                    if (text.indexOf(letter) == 0)
                        text = text.replace(String.valueOf(letter), "ye");
                    else
                        text = text.replace(String.valueOf(letter), "e");
                    break;
                default:
                    if ((int) letter >= 1040 && (int) letter <= 1103){
                        text = text.replaceAll(String.valueOf(letter), lotinArr[64 - charId-1]);
                    }
                    break;
            }

        }

        return text;
    }

    private static String[] getArrayFromString(String alpha) {
        alpha += alpha.toLowerCase();

        return alpha.split(" ");
    }
}
Men Krillchadan Lotinga o'tkizishda shunday qiligandim
+2 ovoz
javob berdi 02 mart, 17 Dilshod (467 bal)
Bu JSda, shundan foydalansiz bo'ladi o'zizga moslashirib:
function lat2cyr(text)
    {
        var result = text
                .replaceAll("sh'", "щ")
                .replaceAll("sh`", "щ")
                .replaceAll("sh‘", "щ")
                .replaceAll("sh’", "щ")
                .replaceAll("ya", "я")
                .replaceAll("yo", "ё")
                .replaceAll("ye", "е")
                .replaceAll("yu", "ю")
                .replaceAll("ch", "ч")
                .replaceAll("ts", "ц")
                .replaceAll("i'", "ы")
                .replaceAll("i`", "ы")
                .replaceAll("i‘", "ы")
                .replaceAll("i’", "ы")
                .replaceAll("O‘", "Ў")
                .replaceAll("O'", "Ў")
                .replaceAll("O`", "Ў")
                .replaceAll("O’", "Ў")
                .replaceAll("ts", "ц")
                .replaceAll("TS", "ц")
                .replaceAll("Ts", "Ц")
                .replaceAll("Ch", "Ч")
                .replaceAll("ch", "ч")
                .replaceAll("sh", "ш")
                .replaceAll("Sh", "Ш")
                .replaceAll("SH", "Ш")
                .replaceAll("Sh", "Ш")
                .replaceAll("g‘", "ғ")
                .replaceAll("o'", "ў")
                .replaceAll("o`", "ў")
                .replaceAll("o‘", "ў")
                .replaceAll("o’", "ў")
                .replaceAll("O‘", "ў")
                .replaceAll("o’", "ў")
                .replaceAll("s'h", "сҳ")
                .replaceAll("s`h", "сҳ")
                .replaceAll("s‘h", "сҳ")
                .replaceAll("S'h", "Cҳ")

                .replaceAll("h", "х")
                .replaceAll("H", "Х")
                .replaceAll("X", "Ҳ")
                .replaceAll("x", "ҳ")
                .replaceAll("S`h", "Сҳ")
                .replaceAll("S'H", "СҲ")
                .replaceAll("S`H", "СҲ")
                .replaceAll("g‘", "ғ")
                .replaceAll("g'", "ғ")
                .replaceAll("g`", "ғ")
                .replaceAll("g’", "ғ")
                .replaceAll("G‘", "Ғ")
                .replaceAll("G'", "Ғ")
                .replaceAll("G`", "Ғ")
                .replaceAll("G’", "Ғ")
                .replaceAll("YU", "Ю")
                .replaceAll("YA", "Я")

                .replaceAll("SH'", "Щ")
                .replaceAll("Sh'", "Щ")
                .replaceAll("SH`", "Щ")
                .replaceAll("Sh`", "Щ")
                .replaceAll("SH‘", "Щ")
                .replaceAll("YA", "Я")
                .replaceAll("YO", "Ё")
                .replaceAll("YE", "Е")
                .replaceAll("YU", "Ю")
                .replaceAll("CH", "Ч")
                .replaceAll("TS", "Ц")
                .replaceAll("I'", "Ы")
                .replaceAll("I`", "Ы")
                .replaceAll("I‘", "Ы")
                .replaceAll("I’", "Ы")
                .replaceAll("Ya", "Я")
                .replaceAll("Yo", "Ё")
                .replaceAll("Ye", "Е")
                .replaceAll("Yu", "Ю")
                .replaceAll("J", "Ж")
                .replaceAll("TS", "Ц")
                .replaceAll("CH", "Ч")
                .replaceAll("SH", "Ш")
                //DOUBLE LETTERS LOWERCASE
                .replaceAll("yu", "ю")
                .replaceAll("ya", "я")
                .replaceAll("yo", "ё")
                .replaceAll("y", "й")
                .replaceAll("j", "ж")
                .replaceAll("ts", "ц")
                .replaceAll("ch", "ч")
                .replaceAll("sht", "щ")
                .replaceAll("sh", "ш")
                .replaceAll("O‘", "Ў")
                .replaceAll("o‘", "ў")
                .replaceAll("O'", "Ў")
                .replaceAll("o'", "ў")
                .replaceAll("O `", "Ў")
                .replaceAll("o `", "ў")
                .replaceAll("O `", "Ў")
                .replaceAll("o `", "ў")
                .replaceAll("O`", "Ў")
                .replaceAll("o`", "ў")
                .replaceAll("O`", "Ў")
                .replaceAll("o`", "ў")
                //UPPERCASE LETTERS
                .replaceAll(" ", " ")
                .replaceAll("A", "A")
                .replaceAll("B", "Б")
                .replaceAll("V", "В")
                .replaceAll("G'", "Г")
                .replaceAll("G", "Г")
                .replaceAll("D", "Д")
                .replaceAll("E", "E")
                .replaceAll("Z", "З")
                .replaceAll("I", "И")
                .replaceAll("J", "Й")
                .replaceAll("K", "К")
                .replaceAll("L", "Л")
                .replaceAll("M", "M")
                .replaceAll("N", "Н")
                .replaceAll("o'", "Ў")
                .replaceAll("o`", "Ў")
                .replaceAll("O'", "ў")
                .replaceAll("O`", "ў")
                .replaceAll("O", "O")
                .replaceAll("P", "П")
                .replaceAll("R", "Р")
                .replaceAll("S", "С")
                .replaceAll("T", "T")
                .replaceAll("W", "У")
                .replaceAll("F", "Ф")
                .replaceAll("H", "X")
                .replaceAll("U", "У")
                .replaceAll("q", "қ")
                .replaceAll("Q", "Қ")
                .replaceAll("a", "а")
                .replaceAll("b", "б")
                .replaceAll("v", "в")
                .replaceAll("g", "г")
                .replaceAll("d", "д")
                .replaceAll("e", "е")
                .replaceAll("z", "з")
                .replaceAll("i", "и")
                .replaceAll("j", "й")
                .replaceAll("k", "к")
                .replaceAll("l", "л")
                .replaceAll("m", "м")
                .replaceAll("n", "н")
                .replaceAll("o", "о")
                .replaceAll("p", "п")
                .replaceAll("r", "р")
                .replaceAll("s", "с")
                .replaceAll("t", "т")
                .replaceAll("w", "у")
                .replaceAll("f", "ф")
                .replaceAll("h", "х")
                .replaceAll("u", "у");
        return result;
    }         
izoh qoldirdi 02 mart, 17 Dilshod (467 bal)
function cyr2lat(text)
    {
        var result = text
                .replaceAll("ае","aye")
                .replaceAll("ее","eye")
                .replaceAll("ёе","yoye")
                .replaceAll("ие","iye")
                .replaceAll("ое","oye")
                .replaceAll("уе","uye")
                .replaceAll("эе","eye")
                .replaceAll("юе","yuye")
                .replaceAll("яе","yaye")
                .replaceAll("ўе","o‘ye")
                .replaceAll("ъе","'ye")
                .replaceAll("АЕ","AYE")
                .replaceAll("ЕЕ","EYE")
                .replaceAll("ЁЕ","YOYE")
                .replaceAll("ИЕ","IYE")
                .replaceAll("ОЕ","OYE")
                .replaceAll("УЕ","UYE")
                .replaceAll("ЭЕ","EYE")
                .replaceAll("ЮЕ","YUYE")
                .replaceAll("ЯЕ","YAYE")
                .replaceAll("ЎЕ","O‘YE")
                .replaceAll("ЪЕ","'YE")
                .replaceAll("Ае","Aye")
                .replaceAll("Ее","Eye")
                .replaceAll("Ёе","Yoye")
                .replaceAll("Ие","Iye")
                .replaceAll("Ое","Oye")
                .replaceAll("Уе","Uye")
                .replaceAll("Эе","Eye")
                .replaceAll("Юе","Yuye")
                .replaceAll("Яе","Yaye")
                .replaceAll("Ўе","O‘ye")
                .replaceAll("Ъе","'ye")
                .replaceAll("сҳ","s'h")
                .replaceAll("СҲ","S'H")
                .replaceAll("Сҳ","S'h")
                .replaceAll("сҲ","s'H")
                .replaceAll("ғ","g‘")
                .replaceAll("қ","q")
                .replaceAll("ў","o‘")
                .replaceAll("ҳ","h")
                .replaceAll("Ғ","G‘")
                .replaceAll("Қ","Q")
                .replaceAll("Ў","O‘")
                .replaceAll("Ҳ","H")
                .replaceAll("a","а")
                .replaceAll("б","b")
                .replaceAll("в","v")
                .replaceAll("г","g")
                .replaceAll("д","d")
                .replaceAll("е","e")
                .replaceAll("ё","yo")
                .replaceAll("ж","j")
                .replaceAll("з","z")
                .replaceAll("и","i")
                .replaceAll("й","y")
                .replaceAll("к","k")
                .replaceAll("л","l")
                .replaceAll("м","m")
                .replaceAll("н","n")
                .replaceAll("о","o")
                .replaceAll("п","p")
                .replaceAll("р","r")
                .replaceAll("с","s")
                .replaceAll("т","t")
                .replaceAll("у","u")
                .replaceAll("ф","f")
                .replaceAll("х","x")
                .replaceAll("ц","ts")
                .replaceAll("ч","ch")
                .replaceAll("ш","sh")
                .replaceAll("щ","sh")
                .replaceAll("ь","")
                .replaceAll("ы","i")
                .replaceAll("ъ","’")
                .replaceAll("э","e")
                .replaceAll("ю","yu")
                .replaceAll("я","ya")
                .replaceAll("А","A")
                .replaceAll("Б","B")
                .replaceAll("В","V")
                .replaceAll("Г","G")
                .replaceAll("Д","D")
                .replaceAll("Е","E")
                .replaceAll("Ё","Yo")
                .replaceAll("Ж","J")
                .replaceAll("З","Z")
                .replaceAll("И","I")
                .replaceAll("Й","Й")
                .replaceAll("К","K")
                .replaceAll("Л","L")
                .replaceAll("М","M")
                .replaceAll("Н","N")
                .replaceAll("О","O")
                .replaceAll("П","P")
                .replaceAll("Р","R")
                .replaceAll("С","S")
                .replaceAll("Т","T")
                .replaceAll("У","U")
                .replaceAll("Ф","F")
                .replaceAll("Х","X")
                .replaceAll("Ц","TS")
                .replaceAll("Ч","Ch")
                .replaceAll("Ш","Sh")
                .replaceAll("Щ","Sh")
                .replaceAll("Ь","")
                .replaceAll("Ы","I")
                .replaceAll("Ъ","’")
                .replaceAll("Э","E")
                .replaceAll("Ю","Yu")
                .replaceAll("Я","Ya");
        return result;
    }
    
    
    String.prototype.replaceAll = function (search, replacement) {
        var target = this;
        return target.replace(new RegExp(search, 'g'), replacement);
    };
    $('.lat2cyr').bind("change keyup keypress input blur keydown", function () {
        $('.cyr').val(lat2cyr($(this).val()));
    });
    
     $('.cyr2lat').bind("change keyup keypress input blur keydown", function () {
        $('.lat').val(cyr2lat($(this).val()));
    });
+1 ovoz
javob berdi 02 mart, 17 vejon (2,992 bal)
Kirilchadan lotinchaga muommo bo'lmasligi mumkin. Ammo Lotinchadan kirilchaga muommo bo'ladi, uni hal qilish uchun ba'zi so'zlarni ro'yxatini tuzib olib, o'shalardan foydalanish zarur. Lekin shunda ham 100% aniqlikka erishib bo'lmaydi.
izoh qoldirdi 02 mart, 17 Baron (862 bal)
Qoidasi bo'yicha o'girilsa uyam, buyam muammo emas (manimcha)... Ba'zi so'zlar qaysilar sizningcha?
izoh qoldirdi 03 mart, 17 vejon (2,992 bal)
sirk, funksiya, rayon, sivilizatsiya va boshqa so'zlar.
0 ovoz
javob berdi 04 mart, 17 Jahongir Soataliyev (260 bal)
package test1;

import java.util.Scanner;

public class Test1 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

        char[] ch = str.toCharArray();
        for (int i = 0; i < ch.length; i++) {

            if (ch[i] == 'c' && ch[i + 1] == 'h') {
                System.out.print("ч");
                i = i + 2;
            }
            if (ch[i] == 's' && ch[i + 1] == 'h') {
                System.out.print("ш");
                i = i + 2;
            }
            if (ch[i] == 'C' && ch[i + 1] == 'h') {
                System.out.print("Ч");
                i = i + 2;
            }
            if (ch[i] == 'S' && ch[i + 1] == 'h') {
                System.out.print("Ш");
                i = i + 2;
            }
            if (ch[i] == 'O' && ch[i + 1] == '`') {
                System.out.print("Ў");
                i = i + 2;
            }
            if (ch[i] == 'o' && ch[i + 1] == '`') {
                System.out.print("ў");
                i = i + 2;
            }
            if (ch[i] == 'g' && ch[i + 1] == '`') {
                System.out.print("ғ");
                i = i + 2;
            }
            if (ch[i] == 'G' && ch[i + 1] == '`') {
                System.out.print("Ғ");
                i = i + 2;
            }
            if (ch[i] == 'y' && ch[i + 1] == 'a') {
                System.out.print("я");
                i = i + 2;
            }
            if (ch[i] == 'Y' && ch[i + 1] == 'a') {
                System.out.print("Я");
                i = i + 2;
            }
            if (ch[i] == 'y' && ch[i + 1] == 'o') {
                System.out.print("ё");
                i = i + 2;
            }
            if (ch[i] == 'Y' && ch[i + 1] == 'o') {
                System.out.print("Ё");
                i = i + 2;
            }
            if (ch[i] == 'y' && ch[i + 1] == 'e') {
                System.out.print("е");
                i = i + 2;
            }
            if (ch[i] == 'Y' && ch[i + 1] == 'e') {
                System.out.print("Е");
                i = i + 2;
            }
            if (ch[i] == 'y' && ch[i + 1] == 'u') {
                System.out.print("ю");
                i = i + 2;
            }
            if (ch[i] == 'Y' && ch[i + 1] == 'u') {
                System.out.print("Ю");
                i = i + 2;
            }
            switch (ch[i]) {

            case 'a':
                System.out.print("а");
                break;
            case 'b':
                System.out.print("б");
                break;
            case 'h':
                System.out.print("ҳ");
                break;
            case 'x':
                System.out.print("х");
                break;
            case 'd':
                System.out.print("д");
                break;
            case 'e':
                System.out.print("э");
                break;
            case 'f':
                System.out.print("ф");
                break;
            case 'g':
                System.out.print("г");
                break;
            case 'i':
                System.out.print("и");
                break;
            case 'j':
                System.out.print("ж");
                break;
            case 'k':
                System.out.print("к");
                break;
            case 'l':
                System.out.print("л");
                break;
            case 'm':
                System.out.print("м");
                break;
            case 'n':
                System.out.print("н");
                break;
            case 'o':
                System.out.print("о");
                break;
            case 'p':
                System.out.print("п");
                break;
            case 'q':
                System.out.print("қ");
                break;
            case 'r':
                System.out.print("р");
                break;
            case 's':
                System.out.print("с");
                break;
            case 't':
                System.out.print("т");
                break;
            case 'u':
                System.out.print("у");
                break;
            case 'v':
                System.out.print("в");
                break;
            case 'y':
                System.out.print("й");
                break;
            case 'z':
                System.out.print("з");
                break;
            case 'A':
                System.out.print("А");
                break;
            case 'B':
                System.out.print("Б");
                break;
            case 'H':
                System.out.print("Ҳ");
                break;
            case 'X':
                System.out.print("Х");
                break;
            case 'D':
                System.out.print("Д");
                break;
            case 'E':
                System.out.print("Э");
                break;
            case 'F':
                System.out.print("Ф");
                break;
            case 'G':
                System.out.print("Г");
                break;
            case 'I':
                System.out.print("И");
                break;
            case 'J':
                System.out.print("Ж");
                break;
            case 'K':
                System.out.print("К");
                break;
            case 'L':
                System.out.print("Л");
                break;
            case 'M':
                System.out.print("М");
                break;
            case 'N':
                System.out.print("Н");
                break;
            case 'O':
                System.out.print("О");
                break;
            case 'P':
                System.out.print("П");
                break;
            case 'Q':
                System.out.print("Қ");
                break;
            case 'R':
                System.out.print("Р");
                break;
            case 'S':
                System.out.print("С");
                break;
            case 'T':
                System.out.print("Т");
                break;
            case 'U':
                System.out.print("У");
                break;
            case 'V':
                System.out.print("В");
                break;
            case 'Y':
                System.out.print("Й");
                break;
            case 'Z':
                System.out.print("З");
            case ' ':
                System.out.print(" ");
                break;
            default:
                break;
            }

        }

    }
}

Assalomu alaykum, yordam.uz saytimizga xush kelibsiz.

Bu saytda o`zingizni qiziqtirgan savollarga javob olishingiz va o`z sohangiz bo`yicha savollarga javob berishingiz mumkin.

Bizning Oilamizga a'zo bo`lganingiz uchun chuqur Minnatdorchilik bildiramiz !!!

Telegram kanal YordamUzRss

...