On Nov 9, 2007 11:08 PM, <[EMAIL PROTECTED]> wrote: > Thank you Brian. Very clearly written. I'm sure I won't have any problems > with it when I get home. > > But..., (you knew this was coming, right?) > > The alternate function which drops the mailto: tag got me to thinking > about another problem I have that is not directly related to OOo but uses > OOo Writer as one of the steps. > > I'm an analyst, not a programmer so I've been a bit stumped trying to > solve this problem. > > I want to take large (3+ megs of words from a variety of sources I have > compiled and parse them like this: Say the first words are "Mary had a > little lamb..." What I need is a moving window to grab the letters, spaces > and punctuation, add a delimiter and then count the number of each digraph > in the set. > > So the result would look like this using ~~ as the separator: > > Ma~~ > ar~~ > ry~~ > y ~~ > h~~ > ha~~ > ad~~ > d ~~ > a~~ > a ~~ > l~~ < > li~~ > it~~ > tt~~ > tl~~ > le~~ > e ~~ > l~~ < > la~~ > am~~ > mb~~ > b.~~ > ..~~ > ..~~ > > etc. > > I have a program that will sort and count the duplicates like the ones > marked with the <s. > > It occured to me that what the hyperlink program does when it drops the > mailto: tag is almost the same. So the question I have can anyone modifiy > it to do what I need, or point me to a tutorial where I could learn enough > to do it myself. What would be best, in my view would be some knd soul who > would be patient enough to to help me understand how it works and how to > modify it with an exchange of e-mails, that way I would learn something > useful and not just hack at it until it sort of works. > > Thanks, > > Allen > > Hello Allen,
[rant mode=ON] As you are becoming a regular of the mailing list could you please make an effort to reply *below* the original text rather than above? This way the emails on the same subject are ordered from the first at the top to the last at the bottom. This is a kind of regular procedure for mailing lists. You can also delete the text which is not necessary and only leave what you are replying to. Finally, when you start a new question it is very important that you start a new thread by changing the subject so more people read it and in particular someone who does not know how to un-hyperlink in bulk but knows how to create a macro that does what you want. Also, the volunteers the provide replies can quickly spot the questions that have not been answered yet. [rant mode=OFF] Anyway, I am not quite sure I understood what you need. You wrote that you already have a program that sorts and counts the duplicates, so all you need is to write a new file where you write something like [character 1][character 2] [character 2][character 3] [character 3][character 4] and so on... If this is the case it does not take too long to write a macro although the size of the file may be a problem. However I suggest you proceed in a different way: - take the first two characters, tell OOo to perform a Find and it will tell you how many of these couples were found. - If more than one is found write the couple and the number of times they appear. This list will be called, say, "Result". - take the second and third character, check if they are in the "Result" list and if the couple is not there launch again the Find function and so on... Cheers, Michele
