Modul:Syrc-stripdiacritics
Penampilan
(Dilencongkan daripada Modul:Syrc-entryname)
- Berikut merupakan pendokumenan yang dijana oleh Modul:pendokumenan. [sunting]
- Pautan berguna: senarai sublaman • pautan • transklusi • kes ujian • kotak pasir
This module will generate diacritic-stripped text for text in the Tulisan Suryani. It is also used to generate diacritic-stripped text for Neo-Aram Assyria, Neo-Aram Barat, Chaldean Neo-Aramaic, and Turoyo.
The module should preferably not be called directly from templates or other modules.
To use it from a template, use {{strip diacritics}}.
Within a module, use Module:languages#Language:stripDiacritics.
For testcases, see Module:Syrc-stripdiacritics/testcases.
Functions
[sunting]stripDiacritics(text, lang, sc)- Strips diacritics from a given piece of
textwritten in the script specified by the codesc, and language specified by the codelang. - When diacritic stripping fails, returns
nil.
local export = {}
local u = mw.ustring.char
function export.stripDiacritics(text, lang, sc)
-- tilde, macron, dot above, diaeresis, dot below, breve below, tilde below, macron below, superscript aleph, pthaha, zqapha, rbasa, zlama, hbasa, esasa, rwaha, feminine dot, qushshaya
local replacements = {
u(0x303), u(0x304), u(0x307), u(0x308), u(0x323), u(0x32E), u(0x330), u(0x331), u(0x711), "[" .. u(0x730) .. "-" .. u(0x74A) .. "]"
}
for _, replacement in ipairs(replacements) do
text = mw.ustring.gsub(text, replacement, "")
end
return text
end
return export
Kategori:
- Diacritic-stripping modules used by 4 languages
- Tulisan Suryani
- Diacritic-stripping modules without a testcases subpage
- Modul penyiatan diakritik mengikut tulisan
- Modul bahasa Tulisan Suryani
- Modul penyiatan diakritik
- Modul bahasa Neo-Aram Assyria
- Modul bahasa Neo-Aram Barat
- Modul bahasa Chaldean Neo-Aramaic
- Modul bahasa Turoyo