On 4/18/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
   http://hg.metaperl.com/j/doc/dyad-proc.txt

One note about terminology...

You state "A frame is some subset of a noun's shape."

One interpretation of this is that a frame would be one of
the lists in one of the boxes produced by the verb subsets
applied to the noun's shape, where subsets is defined as:

  all=: [EMAIL PROTECTED]@# A. ]
  subsets=: i.@>:@# ~.@:(}."1)&.> <@all

While this would be true, for your example case I get a lot
of potential subsets.
  +/#&>subsets 4 3 2 7 6
326

A narrower word, which eliminates only unnecessary possibilities,
would be subsequences.  In other words, it's also true that a
frame would be one of the lists in one of the boxes produced
by the verb subsequences applied to the noun's shape, where
subsequences is defined as
  subsequences=: [: ~.@, i.@>:@# }.&.>/ [EMAIL PROTECTED]@>:@# }.&.> <

And, in fact, in this case each box contains only a list (not a
list of lists), so counting them looks like this:
  # subsequences 4 3 2 7 6
16

Of course, here also we have possibilities which can not be
valid frames.  I could instead say that a frame would be one of the
lists in one of the boxes produced by the verb prefixes applied
to the noun's shape, where prefixes is defined as
  prefixes=: [EMAIL PROTECTED]@>:@# }.&.> <

Here, I only get valid possibilities:
  # prefixes 4 3 2 7 6
6

On the other hand, without a rigorous statement of how J's
shapes are expressed in terms of sets, my above "subsets"
could be completely inaccurate.  For example, if J's shape
were expressed as a set of pairs, where the first element
of the pair were the index position of the shape element
and the second element of the pair were the value of
the shape element, then we get a different concept of subsets
(though, still, only some of them could be valid frames).

Anyways, assuming a reasonably plausible concept of
subset, your original sentence seems correct.  However
I think people get into the habit of throwing around the word
"set" (and subset) without thinking through what they are
saying. And, I wanted to take your statement as an opportunity
to expand on this subject.  (I hope you don't mind.)

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to