Only 64? So worst case ascii text summaries would be 64^ 3 rows?
> On Oct 12, 2019, at 6:36 PM, 'Mike Day' via Programming
> wrote:
>
> Yes, that’s me.
>
> Sorry about the “Nb”s ... I was adding comments and trying to make the lines
> runnable.
>
> I should have said that I wrote these e
Yes, that’s me.
Sorry about the “Nb”s ... I was adding comments and trying to make the lines
runnable.
I should have said that I wrote these example functions just for this
discussion. They’re not well tested, nor, likely/possibly, proof against edge
conditions such as empty datasets.
BTW,
One more (I promise, I’ll stop hogging the fourm) mail to script conversion,
this time from Ric’s contribution. (This is all great stuff, thank you guys
very much!!)
NB. Rick2, without Key
NB.If you want compare the summaries without the original text strings, then
NB.perhaps Key is not the b
> On Oct 12, 2019, at 1:52 PM, 'Mike Day' via Programming
> wrote:
>
> Sorry, I wasn’t considering trigrams in my off the cuff stuff,
>
> Mike
>
Thanks Mike (Day?). Can’t always tell with fourm replies until I reply…
I appreciate (and am still studying) your stuff, and learning a lot from
Sorry, I wasn’t considering trigrams in my off the cuff stuff,
Mike
Sent from my iPad
> On 12 Oct 2019, at 18:38, 'Jim Russell' via Programming
> wrote:
>
> Thanks. (Except for the part about etaionshrdlu... and the fact that I was
> unaware of any difference between prepend and prefix.) I
Thanks. (Except for the part about etaionshrdlu... and the fact that I was
unaware of any difference between prepend and prefix.) I had considered texts
using different character sets, and figured I would be comfortable reporting
them as completely different.
Thanks for the insights!
(I shou
eg for Ric Sherlock’s example, modified for unequal sample sizes:
Apologies for non-alignment, as seen on iPad anyway.
]'X Y'=: 'actg' {~ 2 30 ?@$ 4
catctaagtcgataatccacttacttccgg
cagcaaggacaggtgctaatacacactcgc
[X =: 'actg' {~ 40?@$ 4
ttagcacttccctcagagttacccacactagctggtgcag
fr1 each X
You'r right. I started to define it assigned as a string, but screwed that up
too. Took me just as long to learn del definition too :-).
> On Oct 12, 2019, at 12:53 PM, Brian Schott wrote:
>
> Your verb show needs a y in it.
>
>
> show=: verb define
> <: #/.~&> y
> )
> show supertrig
>
The advantage is that you’re in control of the domain of interest. You know
all cases that _might_ arise.
With my example of a given alphabet, we might be looking at the frequency of
letters in English prose, and find their sort order is along the lines of
etaionshrdlu... (iirc).
Not so goo
Oops, my mistake. I intended the first version of show to be yours (without
y), not mine (with y).
On Sat, Oct 12, 2019 at 12:53 PM Brian Schott
wrote:
> Your verb show needs a y in it.
>
>
>show=: verb define
> <: #/.~&> y NB. here is the mistake.
> )
>show supertrig
> |noun
Your verb show needs a y in it.
show=: verb define
<: #/.~&> y
)
show supertrig
|noun result was required: show
| <:#/.~&>
$trig
2
show=: verb define
<: #/.~&> y
)
show supertrig
1 1 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0
Genius! I tried (and failed) to convert your reply to a script on my iPhone:
X=:'Now is the time for all good men to come ti'
Y=: 'Now is the time for the quick brown good men to come ti'
trig=: 3,\&.> X;Y
NB. Get the nub of the union of both sets of trigrams and prepend it to each
trigram set.
Thanks, interesting. What advantage that give you?
> On Oct 12, 2019, at 9:02 AM, 'Mike Day' via Programming
> wrote:
>
> A quick thought, might not be what you have in mind.
>
> If, say, you’re seeking the frequency of letters, it’s worth prefixing the
> sorted alphabet of interest to yo
A quick thought, might not be what you have in mind.
If, say, you’re seeking the frequency of letters, it’s worth prefixing the
sorted alphabet of interest to your string and then subtracting one from the
scores.
Useful for me sometimes, anyway.
Mike
Sent from my iPad
> On 12 Oct 2019, at
If you want compare the summaries without the original text strings, then
perhaps Key is not the best approach.
This should work:
getTrigrams=: 3 ,\ ]
countTrigrams=: (~. ; #/.~)@getTrigrams
compareTrigrams=: dyad define
alltrig=. x ~.@;@,&({.) y
cnttrigs=. ((alltrig i.~ [) { 0 ,~ ])&>/&> x; w
15 matches
Mail list logo