Skip to content

Commit

Permalink
add t9 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DGrothe-PhD committed Oct 28, 2023
1 parent e397928 commit 7315d72
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 8 deletions.
9 changes: 1 addition & 8 deletions T9KeyboardApp/AddTextButton.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace T9KeyboardApp
namespace T9KeyboardApp
{
public class AddTextButton : Button
{
Expand Down
16 changes: 16 additions & 0 deletions T9KeyboardApp/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions T9KeyboardApp/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,12 @@ private void BtnGruss_Click(object sender, EventArgs e)
textBox1.Select();
}

private void BtnAWDS_Click(object sender, EventArgs e)
{
textBox1.Text += Environment.NewLine + Environment.NewLine
+ "Auf Wiedersehen!" + Environment.NewLine
+ Environment.NewLine;
textBox1.Select();
}
}
}
79 changes: 79 additions & 0 deletions T9KeyboardApp/T9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"38" : [ "du" ],
"863" : [ "und" ],
"648" : [ "mit" ],
"428" : [ "hat" ],
"283" : [ "auf" ],
"446" : [ "hin" ],
"6424" : [ "mich" ],
"543278" : [ "liebst" ],
"724289" : [ "Schatz" ],
"94333773436" : [ "Wiedersehen" ],
"424" : [ "ich" ],
"37" : [ "er", "es"],
"743" : [ "sie" ],
"947" : [ "wir" ],
"447" : [ "ihr" ],
"3424" : [ "dich" ],
"7424" : [ "sich" ],
"867" : [ "uns" ],
"3824" : [ "euch" ],
"4223" : [ "habe" ],
"4228" : [ "habt" ],
"4278" : [ "hast" ],
"42236" : [ "haben" ],
"434228" : [ "gehabt" ],
"42883" : [ "hatte" ],
"428836" : [ "hatten" ],
"4288378" : [ "hattest" ],
"246" : [ "bin" ],
"2478" : [ "bist" ],
"478" : [ "ist" ],
"7463" : [ "sind" ],
"7343" : [ "seid" ],
"428838" : [ "hattet" ],
"927" : [ "war" ],
"92778" : [ "warst" ],
"9278" : [ "wart" ],
"92736" : [ "waren" ],
"4393736" : [ "gewesen" ],
"937336" : [ "werden" ],
"9473" : [ "wird" ],
"93733" : [ "werde" ],
"94778" : [ "wirst" ],
"937338" : [ "werdet" ],
"3773" : [ "esse" ],
"4778" : [ "isst" ],
"37736" : [ "essen" ],
"3778" : [ "esst" ],
"43437736" : [ "gegessen" ],
"886" : [ "tun" ],
"8878" : [ "tust" ],
"883" : [ "tue" ],
"888" : [ "tut" ],
"43826" : [ "getan" ],
"437244258" : [ "geschickt" ],
"72442536" : [ "schicken" ],
"72442578" : [ "schickst" ],
"7244253" : [ "schicke" ],
"7244258" : [ "schickt" ],
"72442583" : [ "schickte" ],
"53736" : [ "lesen" ],
"527" : [ "las" ],
"4353736" : [ "gelesen" ],
"5437" : [ "lies" ],
"54378" : [ "liest" ],
"327" : [ "das" ],
"337" : [ "der" ],
"343" : [ "die" ],
"346" : [ "ein" ],
"3463" : [ "eine" ],
"8435" : [ "viel" ],
"84353" : [ "viele" ],
"93644" : [ "wenig" ],
"936443" : [ "wenige" ],
"634783" : [ "meiste" ],
"6347836" : [ "meisten" ],
"2553" : [ "alle" ],
"25537" : [ "alles" ]
}
35 changes: 35 additions & 0 deletions T9KeyboardApp/numify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
def ifromchar(q):
c = q.lower()
if c < 'd':
return 2
elif c < 'g':
return 3
elif c < 'j':
return 4
elif c < 'm':
return 5
elif c < 'p':
return 6
elif c < 't':
return 7
elif c < 'w':
return 8
else:
return 9

def numify(text):
result = ""
for x in text:
if x.isalpha():
result += str(ifromchar(x))
else:
result += x
return result

def jsonify(text):
word = text.split()
for w in word:
print(f'"{numify(w)}" : [ "{w}" ],')

# numify("Auf Wiedersehen!")
# '283 94333773436!'

0 comments on commit 7315d72

Please sign in to comment.