Module talk:bn-IPA
Problems
[edit]Since I'm novice in Lua, I'm encountering a lot of problems while editing this module. Please fix them. Sbb1413 (he) (talk • contribs) 12:24, 27 March 2023 (UTC)
- @Sbb1413: I suggest you make use of a test page Module:bn-IPA/testcases/documentation as suggested in the displayed form of Module:UnitTests, and preview its output often as you edit. For a long edit session, I suggest you save copies of improved code as you go, in case you have to go back. Frequently saving this module is antisocial, as it is already used on about 240 pages, and every time you save a changed version of the nmodule, the Wikimedia server will queue the generation of new versions of these pages. One approach is to create a sandbox for the module, including copies of the testcases module and its 'documentation' file. (The root name could be Module:bn-IPA/sandbox, or Module:User:Sbb1413/bn-IPA, depending on whether you expect to develop the sandbox with others.) Until you have a usable solution for implicit vowels, I suggest you use
{{status}}
to advise against widespread use of{{bn-IPA}}
--RichardW57m (talk) 16:54, 27 March 2023 (UTC)- Thank you. I have managed to workaround the issues already. The only thing to do is to reintroduce the syllable breaking, which is something I have removed from the module for troubleshooting purposes. Anyway, I will test it in the sandbox before deploying it. Sbb1413 (he) (talk • contribs) 16:58, 27 March 2023 (UTC)
Implicit Vowels
[edit]@Sbb1413: Until you have solved the problem of deducing the pronunciation of the implicit vowels from the spelling, I suggest you provide a mechanism for editors to supply them. (I suspect there is no infallible method of deducing their pronunciation from the spelling.) It could be as simple as a general method of overriding the deduction of the pronunciation from the spelling - many languages need this. An alternative method is to just supply the implicit vowels by respelling (if that works), and thereby ensure that the module handles the consonants and the other vowels. --RichardW57m (talk) 17:06, 27 March 2023 (UTC)
- I've used the following method in Module:bn-translit to supply the inherent vowels (which you refer to as "implicit vowels").
for word in mw.ustring.gmatch(text, "[ঁ-৽o’]+") do
local orig_word = word
word = rev_string(word)
word = gsub(word, "^o(়?" .. c .. ")(ঁ?" .. v .. ")", "%1%2")
while match(word, syncope_pattern) do
word = gsub(word, syncope_pattern, "%1%2")
end
text = gsub(text, orig_word, rev_string(word))
end
- This method is also used in Module:as-translit. In Bengali (and other Indic scripts), inherent vowels can be suppressed with a virama diacritic, which is mandatory in Sanskrit but optional in other Indic languages. Sbb1413 (he) (talk • contribs) 17:19, 27 March 2023 (UTC)
- @Sbb1413: I get the impression that these rules are not perfect, tatsamas being particularly troublesome. --RichardW57m (talk) 10:00, 28 March 2023 (UTC)