Template:Ko-rm/doc: Difference between revisions

From Honkai: Nexus Anima Wiki
Jump to navigation Jump to search
Created page with "{{Documentation/Header}} {{Lua}} Template to automate the romanization of Korean text based on the Genshin Impact Wiki:Korean guidelines. ==Syntax== {{T|ko-rm|v1=Korean text|v2=capi=include to capitalize everything|v3=sent=include to use sentence case}} * {{F|^}} will capitalize the following syllable. * {{F|_}} will decapitalize the following syllable. ;Hyphenation and spacing corrections * {{F|< >}} can be added to insert a space into the romanization. This should..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{Lua}}
{{Lua}}
Template to automate the romanization of Korean text based on the [[Genshin Impact Wiki:Korean]] guidelines.
Template to automate the romanization of Korean text based on the [[Honkai Nexus Anima Wiki:Korean]] guidelines.
==Syntax==
==Syntax==
{{T|ko-rm|v1=Korean text|v2=capi=include to capitalize everything|v3=sent=include to use sentence case}}
{{T|ko-rm|v1=Korean text|v2=capi=include to capitalize everything|v3=sent=include to use sentence case}}

Latest revision as of 18:03, 29 August 2025

This is the documentation page for Ko-rm.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Ko-rm, a script written in Lua.

Template to automate the romanization of Korean text based on the Honkai Nexus Anima Wiki:Korean guidelines.

Syntax

{{ko-rm|Korean text|capi = include to capitalize everything|sent = include to use sentence case}}

  • ^ will capitalize the following syllable.
  • _ will decapitalize the following syllable.
Hyphenation and spacing corrections
  • < > can be added to insert a space into the romanization. This should only be used when a space is needed around punctuation. Do not use this to break words into two. For example:
    • {{ko-rm|…으윽…< >흠.|sent = 1}} yields: ...Eueuk... Heum.
  • <-> can be added to insert a hyphen into the romanization. For example:
    • {{ko-rm|나<->의}} yields: na-ui
  • <・: > can be used instead of just to romanize it as a space instead of a spaced hyphen.
    • {{ko-rm|야곱<・: >머스크|capi = 1}} yields: Yagop Meoseukeu
Irregular pronunciation corrections
  • nn{{ko-rm|Korean text|nn = position of the syllable containing ᄅ}} will transcribe the specified intersyllabic "ᆫᄅ" sequence as nn instead of the default ll. For example:
    • {{ko-rm|생산량|nn = 3}} yields: saengsannyang
  • ni{{ko-rm|Korean text|ni = position of the syllable containing 이/야/여/요/유}} will add the "ㄴ" to the specified syllable for the "ㄴ addition" rule. For example:
    • {{ko-rm|옛이야기|ni = 2}} yields: yenniyagi
  • bcred{{ko-rm|Korean text|bcred = position of the syllable containing the batchim to reduce}} will reduce the consonant cluster in the specified syllable or neutralize the batchim in the specified syllable prior to consonant assimilation. This can also be used to block palatalization. For example:
    • {{ko-rm|값어치|bcred = 1}} yields: gabeochi
    • {{ko-rm|맞흥정|bcred = 1}} yields: matheungjeong
    • {{ko-rm|곧이어|bcred = 1}} yields: godieo
  • When counting positions, spaces are included in the count but not punctuation.
  • If multiple of each irregularity exists, their positions may be listed with commas. For example:
    • {{ko-rm|생산량, 곧이어, 생산량, 곧이어|nn = 3,11|bcred = 5,13}} yields: saengsannyang, godieo, saengsannyang, godieo
Given names
  • Surround any part of the Korean text with // on both sides for given names to romanize with the exceptions noted in the guidelines. For example:
    • {{ko-rm|//종려//의 운명의 별}} yields: Jongnyeo-ui unmyeong'ui byeol
Numbers
  • The reading of numbers can be added into the original text in the format <number:reading in Hangul>. For example:
    • {{ko-rm|<11:열한>시 <11:십일>분}} yields: yeolhansi sibilbun

Examples

Default

{{ko-rm|「외눈박이 월드」}} yields: "oenunbagi woldeu"

Forced capitalization

{{ko-rm|방^랑자}} yields: bangNangja

Title case

{{ko-rm|새벽의 어둠|capi = 1}} yields: Saebyeogui Eodum
{{ko-rm|…으윽…< >흠, 유쾌하지 않은 일들이 생각났어|capi = 1}} yields: ...Eueuk... Heum, Yukwaehaji Aneun Ildeuri Saenggangnasseo
{{ko-rm|1 = 속세를 비웃는 백 가지 {{tt|자태|姿態}}자태자태{{Sino|ko}}[※][※]|capi = 1}} yields: Soksereul Biunneun Baek Gaji Jatae‍

Sentence case

{{ko-rm|…으윽…흠, 유쾌하지 않은 일들이 생각났어|sent = 1}} yields: ...Eueuk...Heum, yukwaehaji aneun ildeuri saenggangnasseo
{{ko-rm|1 = 속세를 비웃는 백 가지 {{tt|자태|姿態}}자태자태{{Sino|ko}}[※][※]|sent = 1}} yields: Soksereul biunneun baek gaji jatae‍

Template Data

Template to automate the romanization of Korean text

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1

Korean text to be romanized.

Example
"방랑자"
Stringrequired
Title Casecapi

Transform the romanization into title case.

Booleansuggested
Sentence Casesent

Transform the romanization into sentence case.

Booleansuggested
ᆫᄅ as nnnn

Romanize the initial of the specified character as if it were ㄴ.

Stringsuggested
ㄴ Additionni

Add a ㄴ before the specified character.

Stringsuggested
Batchim Reductionbcred

Reduce the batchim of the specified character.

Stringsuggested