Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0682

D toc

Excerpt

Transliterates Asian script characters from one script form to another. The string can be specified as a column reference or a string literal.


D s
snippetBasic

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:transliterate(MyJapaneseSentences,HiraganaToKatakana) as:'Katakana'

transliterate(MyJapaneseSentences,HiraganaToKatakana)

Output: Returns the values in the myJapaneseSentences transliterated from Hiragana script form to Katakana script form.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:transliterate(column_string,form_enum)

transliterate(column_string,form_enum)


ArgumentRequired?Data TypeDescription
column_stringYstringName of the column or string literal to be applied to the function
form_enumYstring (enumerated value)The transliteration form as an enumerated value. Details below.

D s lang notes

column_string

Name of the column or string constant to be transliterated. String values must be in a supported Japanese script form. See below.

  • Missing string or column values generate missing string results.
  • String constants must be quoted ('Hello, World').
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString literal or column referencemyColumn

form_enum

Enumerated value to indicate the transliteration to apply to the referenced column:

Info

NOTE: Each width option can be paired with each form option. Four separate options are supported.

Enum valueDescription
HiraganaToKatakanaTransliterates Hiragana to Katagana
KatakanaToHiraganaTransliterates Katagana to Hiragana
FullwidthToHalfwidthTransliterates full-width forms to half-width form
HalfwidthToFullwidthTransliterates half-width forms to full-width form

D s
snippetusage

Required?Data TypeExample Value
YesString (enumerated type)HiraganaToKatakana

D s
snippetExamples

Example - TRANSLITERATE Function

Source:

EnglishJapanese_Hiragana
a
i
u
e
o
ka
ki
ku
ke
ko


Transformation:

The following transliterates the above characters into Katakana form:

D trans
RawWrangletrue
p03Value'Japanese_Katakana'
Typestep
WrangleTextderive type: single value: transliterate(Japanese_Hiragana, HiraganaToKatakana) as: 'Japanese_Katakana'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuetransliterate(Japanese_Hiragana, HiraganaToKatakana)
p03NameNew column name
SearchTermNew formula

The generated Katakana form is full-width. The following transliterates that column into half-width form:

D trans
RawWrangletrue
p03Value'Japanese_Katakana_halfwidth'
Typestep
WrangleTextderive type: single value: transliterate(Japanese_Katakana, FullwidthToHalfwidth) as: 'Japanese_Katakana_halfwidth'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuetransliterate(Japanese_Katakana, FullwidthToHalfwidth)
p03NameNew column name
SearchTermNew formula

Results:

EnglishJapanese_HiraganaJapanese_KatakanaJapanese_Katakana_halfwidth
a
i
u
e
o
ka
ki
ku
ke
ko


D s also
labelstring