RosettaCodeData/Task/Textonyms/00DESCRIPTION

41 lines
1.2 KiB
Text
Raw Permalink Normal View History

2015-02-20 09:02:09 -05:00
When entering text on a phone's digital pad it is possible that a particular combination of digits corresponds to more than one word. Such are called textonyms.
Assuming the digit keys are mapped to letters as follows:
2 -> ABC
3 -> DEF
4 -> GHI
5 -> JKL
6 -> MNO
7 -> PQRS
8 -> TUV
9 -> WXYZ
2016-12-05 22:15:40 +01:00
;Task:
Write a program that finds textonyms in a list of words such as  
[[Textonyms/wordlist]]   or  
[http://www.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt].
2015-02-20 09:02:09 -05:00
The task should produce a report:
There are #{0} words in #{1} which can be represented by the digit key mapping.
They require #{2} digit combinations to represent them.
#{3} digit combinations represent Textonyms.
Where:
#{0} is the number of words in the list which can be represented by the digit key mapping.
#{1} is the URL of the wordlist being used.
#{2} is the number of digit combinations required to represent the words in #{0}.
#{3} is the number of #{2} which represent more than one word.
2016-12-05 22:15:40 +01:00
At your discretion show a couple of examples of your solution displaying Textonys.
E.G.:
2015-02-20 09:02:09 -05:00
2748424767 -> "Briticisms", "criticisms"
2016-12-05 22:15:40 +01:00
;Extra credit:
2015-02-20 09:02:09 -05:00
Use a word list and keypad mapping other than English.
2016-12-05 22:15:40 +01:00
<br><br>