Message Boards Message Boards

0
|
7741 Views
|
3 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Find unique characters in text with probability, entropy

Posted 11 years ago
Can somebody make a aplication in mathematica with this conditions? Identification of unique characters used to write the text, and so needed the alphabet. In addition, specify the amount of occurrences of each of these characters in the string and the probability of occurrence that character.

1 indication of the alphabet all the characters occuring in the text.
2 no special characters, spaces, etc.
3 select only uppercase letters

When calculating the probability should skip characters not included in the alphabet. Example:



I'm adding a image with an example of a program written in C #:

POSTED BY: Radek Drozd
3 Replies
Posted 10 years ago

how to do it in Mathematica

       public Alfabet(string input)
    {
        alfabetDict = new Dictionary<char, int>();
        napis = input.ToCharArray();
    }
        public void AlfabetCreate_All()
    {
            alfabetDict.Add(napis[0], 1);
            for (int i = 1; i < napis.Length; i++)
            {
                if (alfabetDict.ContainsKey(napis[i])) alfabetDict[napis[i]]++;
                else alfabetDict.Add(napis[i], 1);
            }
            foreach (var item in alfabetDict)
            {
                this.sumAlfabet += item.Value;
            }
    }
POSTED BY: Radek Drozd
Posted 10 years ago
ok than i start with this
 Panel[InputField["", String, FieldHint -> "Enter text",
 
    FieldHintStyle -> {Red}]
 
   Grid[{
 
     {Text@Style["Entropia Shannona"],
 
      Control[{{showGrid, True, ""}, {True, False},

       ControlType -> Checkbox}]},

    {Text@Style["Entropia Hartleya"],

     Control[{{showGrid, False, ""}, {True, False},

       ControlType -> Checkbox}]}}]

  PopupMenu[

   Wszystkie Znaki, {Wszystkie Znaki, Bez znaków Specjalnych,

    Tylko Wielkie Litery}]

  Button["Licz"]

]
can somebody make this UI like in app form images, and how to make checkbox to have indicated separately?
POSTED BY: Radek Drozd
Can somebody make a aplication in mathematica with this conditions?

sure, but this is not a freelance portal to give people work to do for love. So, please, propose something you've done already about this, then somebody might look into your work and may - if possible -  give useful advice.
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract