Template talk:Morse

Latest comment: 2 years ago by Spinningspark in topic Simpler user interface?

Disaster for text browsers

edit

This template is a disaster for text browsers.


A {{morse|dot|dash}}                  ▄▄▄▄▄▄▄▄
B {{morse|dash|dot|dot|dot}}          ▄▄▄▄▄▄▄▄▄▄▄▄
C {{morse|dash|dot|dash|dot}}         ▄▄▄▄▄▄▄▄▄▄▄▄▄▄

Perhaps work on something with more web accessibility.

In fact, Morse code works on even the lowest end devices. So Template:Morse shouldn't require only the highest end web browsers to render correctly. Jidanni (talk) 11:01, 21 November 2020 (UTC)Reply

I downloaded Browsh to try this, but the Windows version doesn't work. I mean, it doesn't work at all. The next few on the list look unsuitable for Windows, or at least a nightmare to install. I'm guessing that the problem is that text browsers ignore CSS text styling, but without a working platform to test it on, there's not a lot I can do. Someone at WP:VPT might be able to help, or at least point to somewhere that can. I don't think you can describe CSS support as the domain of the "highest end web browsers". That's pretty much universal nowadays. SpinningSpark 17:12, 30 August 2021 (UTC)Reply
Now fixed with a template rewrite. SpinningSpark 08:28, 17 September 2021 (UTC)Reply

My idea

edit

@User:Kurzon, User:Spinningspark: Please have a look to my Morse idea. Maybe it's good for you too? --Klaus-Peter 11:43, 30 August 2021 (UTC)--[Reply

That's a great template and it will probably get a lot of use if you make it available on en:wiki too. However, it can't totally replace this template. For a start, it's used to write in American Morse code which has different timings and codings to the International code. It can usefully generate any arbitrary sequence of dots and dashes whether or not an official symbol. All codes in all languages. All of that is not possible starting from text to translate. SpinningSpark 17:18, 30 August 2021 (UTC)Reply
No problem at all! You will find a lot of comments in the Vorlage:Morse. Iss easy to implement with a translator for your Template:Morse. Actuel I don't have the time.
Regarding the American timing, you will find the definition of the character lengths and the pauses starting at line 35 in Modul:Vorlage/Morse:
    ["p"] = "▄ ", -- short/dit  + pause
    ["l"] = "▄▄▄ ", -- long/dah = 3 dit + pause
    ["t"] = "  ", -- between 2 letters
    ["s"] = "    " --  between 2 words.
   ["p"] = "▄ ",
   ["l"] = "▄▄▄ ",
   ["t"] = "  ",
   ["s"] = "    "
Don't forget to copy de:Modul:Vorlage/Morseletters too.
It's very easy to adjust. Maybe s is a little bit tricky, but 7 spaces are good too
Good luck and best wishes Klaus-Peter 11:40, 1 September 2021 (UTC)
I just see in American Morse code that there are more differences. I'll try to write a Version with an additional parameter for you. The problem ist, that 'en'-Britisch are still different, partially like European Klaus-Peter 12:23, 1 September 2021 (UTC)Reply
@User:Spinningspark Now I have an additional option ″US″, if true you'll get the Railroad version. Have a look to my Morse page. Do you will replace Template:Morse or install a 2nd version? Klaus-Peter 19:38, 1 September 2021 (UTC)Reply
God no, don't replace it. You will immediately break every article it is used in. It has to be a different template. If you want to replace it globally, you need to look at every single use case. Can your template take Japanese characters as input for instance? That's will be needed at Wabun code. Can your template take arbitrary prosigns? That's needed at Wabun code and many other places. SpinningSpark 13:18, 2 September 2021 (UTC)Reply
@Spinningspark
  1. It is not in my interest to revolutionize the world and change best practice. I'm just making an offer.
  2. The name of the template, the module and the associated tables can be adapted as desired.
  3. The template is not used for communication, but exclusively for the representation of individual codes and short text passages in the context of Wikipedia.
  4. European interests count primarily for me. Of course, the list can be expanded with many more letters and the associated codes. But I don't see that as my job. In the Wabun case mentioned above, the Japanese can expand this at will. Everything is stored in a simple table “Monographs”. Arabs, Georgians, , Indians, Thais and many others too. A line such as “["テ"]  = "plpllt",” adds lightning-fast to the table. This applies to all languages ​​and exotic letters for which there is Morse code.
  5. There can be problems with the prosigns. It is not necessary for prosigns that are issued as separate codes. It can be problematic with linked codes, as these character strings cannot be distinguished from normal text in the context. This table (“Prosigns”) can only be expanded with caution. But that too goes beyond the purpose of the template.
Some additional informations and examples you'll find at Morsetemplate --Klaus-Peter 07:55, 5 September 2021 (UTC)Reply
I don't find the idea of having to update tables for every new use case particularly appealing. I have no objection to this module being on enwiki or used on enwiki. But all that is besides the point. The original issue here is that the template does not render properly in text browsers. So first of all, can you confirm that your module renders properly? If it does then a good solution would be to use your rendering method in this template also, but retaining exactly the same input method. I'm not able to deal with Lua myself, would you be willing to help with that? If you can't confirm how the module renders in text browsers then this is going nowhere, at least for now. SpinningSpark 09:10, 5 September 2021 (UTC)Reply
An additional language is only entered once. Bringing this into the table is not a hurdle, because Wiki has a special editor for it that is very easy to use: input errors are reported before they are saved. You can't go wrong.
Regarding the use in texts, please have a look at my sample pages that I gave above. You can also test it yourself on the discussion page.
I can enter other character sets if I know them. I just expanded in Armenian. All I need is a structured list. ″テ = .-...″ is sufficient. I can then format that correctly in a short time and add it to the table.
The output are one or more simple UTF-8 characters →▄← and spaces, that's all! Every browser should understand it by now. The audio edition is not very elegant, but Wikipedia doesn't offer anything better. Klaus-Peter 09:53, 5 September 2021 (UTC)Reply
As I said, that's all beside the point how easy or difficult it is in your template. The question on this talk page is this template. Using different characters for marks and spaces can lead to problems. Can you guarantee that all characters and spaces are one-dot length, even when rendered in a non-monospaced font (which will usually be the case). If not, the timings will be wrong. By the way, the timings are wrong in your examples. Intersymbol spaces should be 3-dot units and inter-word spaces should be 7-dot units. The latter are rendered as 4-dot units in my browser. SpinningSpark 13:57, 5 September 2021 (UTC)Reply
To answer a question from elsewhere, yes, opacity just is not great at all (c.f. SO - I found others with a quick Google). I would expect this module to output monospace text of normal dashes, punctuation, and so forth, with white-space: pre-wrap to preserve needed whitespace.
Making a module to help fix this template might be a bit hard for me though right now. Got other stuff to do. Izno (talk) 14:57, 5 September 2021 (UTC)Reply
@Izno: Thanks for making me aware of the CSS whitespace property. I can use that in the existing template without the need to go to a module. SpinningSpark 15:28, 5 September 2021 (UTC)Reply
Me too and for de:WP it's enough; they are already complaining that the empty space takes up too much space. Klaus-Peter 15:12, 5 September 2021 (UTC)Reply
The timings aren't optional in Morse, they are an essential part of it. Getting the timings wrong is equivalent to bad spelling or grammar. See Hog Morse. SpinningSpark 15:21, 5 September 2021 (UTC)Reply
@Spinningspark:. The current version has been revised heavily and now it has more functions including full compatibility with your template (not 100%, as I do not output leading and trailing spaces; that is a matter of word processing). Have a loo to Morsetemplate. But experts who know Morse never need it, they know the code. I wish everyone a good day. Klaus-Peter 08:12, 17 September 2021 (UTC)Reply

Why 2 leading / 1 trailing spaces? ( )

edit

HELLO ALL: (  ▄ ▄ ▄ ▄   ▄   ▄▄▄▄   ▄▄▄▄   ▄  ▄       ▄ ▄▄   ▄▄▄▄   ▄▄▄▄ ) Klaus-Peter 06:17, 14 September 2021 (UTC)Reply

The updated documentation explains the two leading spaces: "Each invocation of the template is preceded by two spaces to provide the correct timing for inter-character spacing. When the template is used at the beginning of a paragraph this will appear as an indent of the first line of the paragraph. These spaces can be suppressed if desired by using |noindent=yes." Johnuniq (talk) 06:59, 14 September 2021 (UTC)Reply
Thanks. With |noindent=yes(▄ ▄ ▄ ▄   ▄   ▄▄▄▄   ▄▄▄▄   ▄  ▄       ▄ ▄▄   ▄▄▄▄   ▄▄▄▄ ) It's not exactly brilliant. --Klaus-Peter 10:54, 15 September 2021 (UTC)Reply

Regarding Indian Long Dash

edit

Hi all! I wanted to create a new morse code character in order to facilitate the rendering of a special long dash created by B.S. Ramakrishna and his team when they published their article in volume 4, issue 1 of IETE Journal of Research (1957) titled "Statistical Studies in Some Indian Languages with Applications to Communication Engineering". The reason for this creation is explained in 32nd page of the journal (in 14th line and footnotes) which mainly stated-

"The number of speech sounds required for coding purposes can be reduced considerably since five of the vowels are merely prolonged versions of their shorter forms and ten of the consonants are aspirated forms of the corresponding unaspirated ones. Therefore to transmit the long vowels or the aspirated consonants we can send a special symbol, say a long dash, following the vowel or the consonant to indicate prolongation or aspiration."

And the footnote of the page states-

"The durations of the code symbols are (most conveniently) calculated by regarding the dot to consist of line closure for one-unit time followed by line open for one-unit time, the dash to consist of line closure for three units followed by line open for one unit and the special symbol of long dash to consist of five units of line closure followed by line open for one unit time."

As we know the 'ldash' produces a four unit dash and 'zerodash' produces a very long dash. So, to overcome this obstacle, I will render a five unit indian long dash to finally include a table for Indian languages in morse code on various wikipedia pages. The shorter name for that long dash would be ildash. I thought I should inform people before making this change. Otherwise someone would come and revert my change. All are welcome to dicuss this matter with me on this page. Rishu Shukla (talk) 08:06, 20 November 2021 (UTC)Reply

Has this code actually been in use? I'm not in favour of creating tables for codes that were once proposed but never went anyhwere, or for modifying this template to facilitte their creation. Do you have any evidence for the notability of this system? According to gscholar, Ramakrishna's paper has only five citations, two of which are his own papers and one is just a bibliography. Of the two remaining papers, Ganeshsundaram opposes the long dash and proposes a different system. Pandit's paper retains the long dash, but again proposes a different system to Ramakrishna. That gives every impression that this was a failed proposal. SpinningSpark 11:42, 20 November 2021 (UTC)Reply
Rishu Shukla, what was the point of opening this thread if you then immediately go and make the edits anyway? SpinningSpark 12:05, 20 November 2021 (UTC)Reply
Hello SpinningSpark!

Thanks for putting your well-informed opinion regarding the long dash. After receiving your response, I went and read the research papers of both Pandit and Ganeshsundaram to fully understand your point. Here's what I have learned, In Ganeshsundaram's paper, he opposed the long dash because he thought it will create confusion between the dash and long dash, but even according to him, this concern will subside if "coding and decoding are done mechanically by punching on tapes designed for that purpose." While opposing the Ramakrishna model, he proposed a dot-dash model followed internationally but confined his research only to the vowels of the Tamil language, a language which does not contain many of the consonants present in several Indian languages. While Ramakrishna's model created a unified system for 5 Indian languages. In Pandit's paper, he did devise a slightly different model based on the same symbols introduced by Ramakrishna. In his model, he replaced the position of the long dash from the end to the middle position, but he too reaffirmed the importance of the long dash and opposed the dot-dash system (His scope of research was also far greater than Ganeshsundaram's, he published his paper for 6 languages). He stated- "If we note that Tamil does not contain the middle letters ग, ड, द, ब (Hindi consonants) and their aspirates as well, it becomes apparent that we have to use far more dots and dashes than in the said code in the case of other Indian languages to accommodate all the letters into symbol sequences with the required endings." He further adds, "It may be pointed out that there seem to be some errors in Table III of the paper by Ganeshsundaram. The duration for the symbol of 'i' in the long dash code should be 4+2=6 and not 8, since the symbol is (. .). Durations ti for ऐ, ओ and औ also are given wrongly." At the end, he concludes, "Therefore, it is felt that it would be advantageous to retain the long dash and see if the Ramakrishna code can be bettered than to try inventing a cumberous code (Ganeshsundaram's code) which is not really easy to remember, easily affected by 'noise' and of possibly much smaller transmission rate."

The only wikipedia page where there is a table of Indian morse code conversion method (Devanagari one) developed by Ashok Kelkar, is also only focussed on one script and one language (Devanagari and Marathi respectively). He stated, "Granting that any coding of the Devanagari alphabet (or any other alphabet on the same plan) is going to call for more symbols than the coding of the Roman Alphabet in the International Morse Code, the existing code is often unnecessarily large." Which also solidifies the fact that Indian languages require some additional symbols other than the ones followed by International community. So, either I choose to follow the Ramakrishna model or Pandit model, I will have to utilise the long dash, because these two systems aim to unify the coding system for multiple Indian languages and I haven't seen much progress after them. The opposition by Ganeshsundaram is not valid according to me, looking at the focus of his paper. So, I see it right to add this symbol for rendering either Ramakrishna or Pandit model.

Regarding me adding the symbol after creating this page. I was sure someone was going to revert my edit, even though the edit is much thought of, because I couldn't in any way expain the reason for adding that symbol just in the summary of the edit. So, I thought, first notify the page manager and than make the edit.

It does not matter how good you think the scheme is, or how pressing the need for it is. What matters for Wikipedia purposes is whether it is notable. If it was never put into use (and the evidence right now is overwhelmingly that it wasn't) then it is highly unlikely to be notable. And since Morse code is a dying language, it is never going to be. It can't have an article of its own and explaining it in full with tables is going to be WP:UNDUE in another article. It's got a mention at Morse code for non-Latin alphabets, that should be enough. SpinningSpark 15:33, 20 November 2021 (UTC)Reply

Simpler user interface?

edit

I feel like writing {{morse|dash|dot|dash|dot}} is kind of clumsy. Don't we need a simpler user interface like {{morsei|-.-.}} ? (The suffix i implies for the International Morse code). In the template {{morsei}} it converts the arguments and calls {{morse|dash|dot|dash|dot}}. Or such a template already exists? Viking Rollo (talk) 06:30, 11 June 2022 (UTC)Reply

I might be persuaded to add something like this if you have a real need for it. Are you creating or expanding an article that will use it? SpinningSpark 07:29, 11 June 2022 (UTC)Reply