The upperword( function interprets an em-dash as a word break


#1

This statement, where the — character is an em-dash:

upperword("CEDE—O LENTES LEONACIO")

produces

Cede—O Lentes Leonacio

The —O came from Panorama 6.0 where it replaced the Spanish characters, ÑO for reasons that I forget.

The Help wizard notes that this function is unchanged from Panorama 6.0, maybe it doesn’t recognise characters beyond the ASCII set?


#2

Do you happen to have WordService installed on your computer? It is one of the indispensable collections of Services from Devon Technologies, available free from the App Store. It does the same thing, which leads me to believe that this is a Mac thing, not a Panorama thing.

WordService and CalcService have been so valuable to me that I bought DEVONthink, which I never use, just to thank them for providing this freeware!


#3

You (Bruce) are correct. Panorama uses an Apple function to perform this conversion, so it’s up to Apple what the definition of a word is. I would assume that they are much smarter about this sort of thing than I am.

Sure, in the general sense it is unchanged, but Panorama 6.0 doesn’t handle Unicode at all.


#4

Say, speaking of Services, would it be possible to integrate Summarize into Panorama X? Not the summaries that Panorama does, but summarizing text, using the same Summary Apple function that is used for the Service? That would be really neat!

One of the best things about Panorama X is the ability to use the Services menu, especially with CalcService and WordService. I know you can usually do those things in a procedure, but sometimes you just want to do some local editing.


#5

I’m not a big Services user, so I had never heard of this. I did a bit of poking around and figured out how to turn it on and tried it. I see what it is supposed to do, though I wasn’t super impressed with the summaries it produced.

I did some research online and it doesn’t appear that there is any API for this, or even a way to access it from the command line or AppleScript. So I think the answer is no, it would not be possible.

Text analytics would be a natural fit for Panorama, but there aren’t any facilities built into macOS for this. I did find one possibly interesting open source library, but it uses GPL licensing so that won’t work with Panorama. Also, it appears that it hasn’t been updated in 6 years, so that is worrysome also.


#6

This came up in a search:

This would only be something cool to have, but there are more important things you need to do, so I would not waste time on it now.


#7

Yes, I found that page but it didn’t seem like a very good answer. But if it works for you, great!