Xah Talk Show 2022-10-18 WolframLang Coding, Count Words Frequency, Letter Frequency, Bigrams
- write a program in WolframLang to count word frequency, 2-words phrase frequency, and count letter frequency, bigram.
why you need to do it
- word frequency Xah Shorthand System (Abbrev Input)
- Emacs Abbrev for Most Used English Words?
- letter frequency Ergonomic Keyboard Layouts
xinput = ReadString["C:/Users/xah/web/xahlee_org/wordy/arabian_nights/an3.html"]; (* replace any html tag by empty string *) xinput = StringReplace[ xinput , { RegularExpression[ "<[^>]+>" ] -> ""}]; WordCounts[ xinput ] (* WordCounts[ xinput, 2 ] *) (* WordCounts[ xinput, 3 ] *) (* LetterCounts[ xinput ] *) (* LetterCounts[ xinput, 2 ] *)