Explorar o código

Replace triple k with double k.

scossu hai 1 ano
pai
achega
aba9a4e9e4
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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:
             warnings.append(ambi if warn == "" else warn)
 
+    rom = rom.replace("kkk", "kk")
+
     return rom, warnings
 
 
@@ -168,6 +170,8 @@ def _romanize_names(src):
                 rom_ls = rom.rsplit(" ", 1)
                 rom = ", ".join(rom_ls)
 
+            rom = rom.replace("kkk", "kk")
+
             return rom, warnings
 
         else:
@@ -272,7 +276,6 @@ def _romanize_oclc_auto(kor):
     kor = kor.replace("^", " GLOTTAL ")
 
     rom_ls = []
-    # breakpoint()
     for word in kor.split(" "):
         rom_ls.append(_kor_rom(word))
     rom = " ".join(rom_ls)