Quellcode durchsuchen

Replace triple k with double k.

scossu vor 1 Jahr
Ursprung
Commit
aba9a4e9e4
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      scriptshifter/hooks/korean/romanizer.py

+ 4 - 1
scriptshifter/hooks/korean/romanizer.py

@@ -110,6 +110,8 @@ def _romanize_nonames(src, capitalize="first", hancha=True):
         if exp in ambi:
         if exp in ambi:
             warnings.append(ambi if warn == "" else warn)
             warnings.append(ambi if warn == "" else warn)
 
 
+    rom = rom.replace("kkk", "kk")
+
     return rom, warnings
     return rom, warnings
 
 
 
 
@@ -168,6 +170,8 @@ def _romanize_names(src):
                 rom_ls = rom.rsplit(" ", 1)
                 rom_ls = rom.rsplit(" ", 1)
                 rom = ", ".join(rom_ls)
                 rom = ", ".join(rom_ls)
 
 
+            rom = rom.replace("kkk", "kk")
+
             return rom, warnings
             return rom, warnings
 
 
         else:
         else:
@@ -272,7 +276,6 @@ def _romanize_oclc_auto(kor):
     kor = kor.replace("^", " GLOTTAL ")
     kor = kor.replace("^", " GLOTTAL ")
 
 
     rom_ls = []
     rom_ls = []
-    # breakpoint()
     for word in kor.split(" "):
     for word in kor.split(" "):
         rom_ls.append(_kor_rom(word))
         rom_ls.append(_kor_rom(word))
     rom = " ".join(rom_ls)
     rom = " ".join(rom_ls)