portable-ascii
portable-ascii copied to clipboard
Is Greek to ASCII correct?
Example: Is this correct?
"Ελληνικό αλφάβητο" -> "Ellhniko alfabhto"
Can a native speaker, please check the character-replacement, thanks.
https://github.com/voku/portable-ascii/blob/master/src/voku/helper/data/ascii_by_languages.php#L4
OK.. need to understand what is the purpose of this lib.
For instance convert Greek characters to what we Greeks call Greeklish (writing Greek using English characters in order to avoid language switching from keyboard)
Or you want to convert Greek characters to something meaningful? Something that could be used to Road Signs for instance.
Example let's use the word Αθήνα
meaning Athens
according to your lib it will be
A8ina
-> It makes sense when you type on a chat room. We Greeks replaced on chat rooms θ
with 8
. Visually there are kinda similar. But as you can understand this can be used only to chat rooms etc
Instead on a Road Sign you will in Greece you will see Αθήνα
as Athina
Same goes for other letters Ξ
which your library replaces with 3
.. Let me know the answer and I will try to contribute back.
Maybe we can add both ways, because you can choose one and so it's more useful for different situations.
For example there is a similar issue for "ru" (https://github.com/voku/portable-ascii/issues/3#issuecomment-531763644). Maybe we can also add e.g. "el_greeklish". Only a idea, what do you think?
@gmponos I have separated "greek" and "greeklish", can you please re-review the changes, thanks.
https://github.com/voku/portable-ascii/commit/98cb9b3eb6f86054dd61994402d54efcdaa60f2e#diff-07a0c79489ea27ae5e059a433ba83a34R5
@voku as a native speaker I think the greeklish mappings are not very accurate.
For example 'π' => 'n'
and 'Π' => 'N'
are wrong, I've never seen anyone using N/n
as a replacement for Π/π
(P/p), even in prehistoric chatrooms in the 90s. It should be 'π' => 'p'
and 'Π' => 'P'
.
Also:
-
'Ψ' => 'Ps'
-
'ψ' => 'ps'
-
'ΟΙ' => 'OI'
-
'Οι' => 'Oi'
-
'ΥΙ' => 'YI'
-
'Υι' => 'Yi'
-
'ΕΊ' => 'EI'
-
'Εί' => 'Ei'
-
'ΟΊ' => 'OI'
-
'Οί' => 'Oi'
-
'Οί' => 'Oi'
-
'ΎΙ' => 'YI'
-
'Ύι' => 'Yi'
-
'ΥΊ' => 'Yi'
-
'Υί' => 'Yi'
-
'οι' => 'oi'
-
'υι' => 'yi'
-
'εί' => 'ei'
-
'οί' => 'oi'
-
'ύι' => 'yi'
-
'υί' => 'yi'
-
'θ' => 'th',
-
'ξ' => 'ks'
-
'π' => 'p'
, -
'ψ' => 'ps'
-
'Θ' => 'Th'
-
'Ξ' => 'Ks'
-
'Ψ' => 'Ps'
@sebdesign Thanks for the update. Can you please take a look at this fix: https://github.com/voku/portable-ascii/commit/abfac74fac216982f1c59f2a3c62a90df3f8d72a
@voku I'll take a look later tonight!