Class Korean.HanjaReadings
A system for converting Hanja to Hangeul characters, or for romanizing Hanja directly.
For more information, visit:
https://en.wikipedia.org/wiki/Hanja
Inheritance
Namespace: Romanization
Assembly: Romanization.NET.dll
Syntax
public sealed class HanjaReadings : object, IReadingsSystem<Korean.HanjaReadings.ReadingTypes>, IRomanizationSystem
Constructors
| Improve this Doc View SourceHanjaReadings()
Instantiates a copy of the system to process romanizations.
Declaration
public HanjaReadings()
Properties
| Improve this Doc View SourceType
The type of the system - this is an important consideration depending on the purpose of romanizing the text.
For more information, visit:
https://en.wikipedia.org/wiki/Romanization#Methods
Declaration
public SystemType Type { get; }
Property Value
Type | Description |
---|---|
SystemType |
Methods
| Improve this Doc View SourceProcess(String)
Performs romanization of all Hanja in the given text, first to Hangeul, then to proper romanization according to the Revised Romanization of Korea system.
Declaration
public string Process(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to romanize. |
Returns
Type | Description |
---|---|
System.String | A romanized version of the text, leaving unrecognized characters untouched. Note that all romanized text will be lowercase. |
Process(String, IRomanizationSystem)
Performs romanization of all Hanja in the given text, first to Hangeul, then to proper romanization according to system
.
Declaration
public string Process(string text, IRomanizationSystem system)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to romanize. |
IRomanizationSystem | system | The romanization system to use for the Hangeul characters the Hanja is converted to. |
Returns
Type | Description |
---|---|
System.String | A romanized version of the text, leaving unrecognized characters untouched. Note that all romanized text will be lowercase. |
ProcessToHangeul(String)
Converts all Hanja in the given text to their first Hangeul character in the list of possible readings.
Note that this will not yield a romanized string, but rather a standard Korean one. See Process(String, IRomanizationSystem) for a romanized output.
Declaration
public string ProcessToHangeul(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to romanize. |
Returns
Type | Description |
---|---|
System.String | A version of the text with all Hanja characters replaced with their first Hangeul readings. |
ProcessWithReadings(String)
Performs romanization of all Hanja in the given text.
Returns a collection of all the characters in text
, but with all readings (pronunciations) of each in Hangeul (the Korean alphabet).
Declaration
public ReadingsString<Korean.HanjaReadings.ReadingTypes> ProcessWithReadings(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to romanize. |
Returns
Type | Description |
---|---|
ReadingsString<Korean.HanjaReadings.ReadingTypes> | A ReadingsString<TType> with all readings for each character in |