Ls,
I need to count the occurrences of predefined prefix strings in a large
text string.
E.g. pref is a boxed array of prefix strings e.g.
pref=:'appl';'bee';'oran' which have to be looked up in e.g.
txt=:'apples, beer and oranges (and not beef)'.
The result should be the  frequencies of all occurrences of these prefix
strings:  1 2 1.
I tried +/"1 >pref E.&.> <txt   but this is  too slow. Can somebody hint
me in a good direction?
Thanks in advance,
Jan.

This message and attachment(s) are intended solely for the use of the addressee 
and may contain information that is privileged, confidential or otherwise 
exempt from disclosure under applicable law.  
If you are not the intended recipient or agent thereof responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution, or copying of this communication is strictly 
prohibited.  
If you have received this communication in error, please notify the sender 
immediately by telephone and with a "reply" message.  
Thank you for your cooperation.


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

Reply via email to