Talk:Letter frequency: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Task description: added comment (query) about using the Latin alphabet for English. -- ~~~~)
Line 22: Line 22:


"Letter frequency" is not the same as "letter occurences". The title hints that more is needed in the task description. It would seem that some description of output is required as well. --[[User:Demivec|Demivec]] 16:43, 9 November 2011 (UTC)
"Letter frequency" is not the same as "letter occurences". The title hints that more is needed in the task description. It would seem that some description of output is required as well. --[[User:Demivec|Demivec]] 16:43, 9 November 2011 (UTC)

== a few remarks for Rexx ==

A few typos:
carraiage -> carriage
occurances -> occurrences
independant -> independent

and some more substantial observations:
y=d2x(L); if @.up.y==0 then iterate /*zero count? Then ignore letter*/
c=d2c(L) /*C is the hex version of of char*/

In such cases I use cnt.0up.y so that a possible variable up never interferes
actually y is the hex version , drop one ‘of’

@.=0 /*wouldn't it be neat to use Θ ? */
why not use cnt. ?

In the discussion I read:
“Case sensitivity? Count what you get without applying any uppercase/lowercase filters”

upper c -> c=translate(c) would help for other Rexxes (in particular ooRexx)

--[[User:Walterpachl|Walterpachl]] 09:21, 25 July 2012 (UTC)

Revision as of 09:21, 25 July 2012

Task description

More detailed task description is needed. For example, should we only count ASCII letters A-Z? Case in-sensitive?

Or for that matter, what is a letter? For what language? Most programs seemed to assume the Latin alphabet for English. -- Gerard Schildberger 01:47, 30 June 2012 (UTC)

Maybe the results can be displayed with whatever method is the most convenient? I assume opening the file is required (not just handle a file that is already open)?

Since the first solutions were copied from another page and may not be correct solutions, those should be marked somehow. (Was there some specific tag for this purpose?) At least the Pascal solution seems to have nothing to do with the task.

--PauliKL 13:03, 19 September 2011 (UTC)

I took it as anything that is un-said should be whatever is convenient to the implementer.
  • ASCII? Count whatever the file open routine makes most easy.
  • Case sensitivity? Count what you get without applying any uppercase/lowercase filters.
  • Output format? whatever is convenient.
Open the file in your code? I interpreted this as being a requirement.
This leaves the guts as being a way to iterate through the characters keeping count. --Paddy3118 14:58, 19 September 2011 (UTC)

"Letter frequency" is not the same as "letter occurences". The title hints that more is needed in the task description. It would seem that some description of output is required as well. --Demivec 16:43, 9 November 2011 (UTC)

a few remarks for Rexx

A few typos: carraiage -> carriage occurances -> occurrences independant -> independent

and some more substantial observations: y=d2x(L); if @.up.y==0 then iterate /*zero count? Then ignore letter*/

 c=d2c(L)                             /*C is the hex version of of char*/

In such cases I use cnt.0up.y so that a possible variable up never interferes actually y is the hex version , drop one ‘of’

@.=0 /*wouldn't it be neat to use Θ ? */ why not use cnt. ?

In the discussion I read: “Case sensitivity? Count what you get without applying any uppercase/lowercase filters”

upper c -> c=translate(c) would help for other Rexxes (in particular ooRexx)

--Walterpachl 09:21, 25 July 2012 (UTC)