I already have posted here asking how could I create a script that would determine what language a given particular document is in. Since I wasn't able to chew on some of your recommendations because of overly complex nature at that point for me, I decided to find a workaround on my own using tools I'm already familiar with rather than going with a very sophisticated AppleScriptObjC language.
I think you're better off using Shane's AppleScriptObjC handler myself. It's not all that difficult to manage.
------------------------------------------------------------------------------
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
------------------------------------------------------------------------------
set theText to "Οἱ δὲ Φοίνιϰες"
set textLanguage to its guessLanguageOf:theText
------------------------------------------------------------------------------
--» HANDLERS
------------------------------------------------------------------------------
on guessLanguageOf:theString
set theTagger to current application's NSLinguisticTagger's alloc()'s initWithTagSchemes:{current application's NSLinguisticTagSchemeLanguage} options:0
theTagger's setString:theString
set languageID to theTagger's tagAtIndex:0 |scheme|:(current application's NSLinguisticTagSchemeLanguage) tokenRange:(missing value) sentenceRange:(missing value)
return ((current application's NSLocale's localeWithLocaleIdentifier:"en")'s localizedStringForLanguageCode:languageID) as text
end guessLanguageOf:
------------------------------------------------------------------------------
If you really want to use a found alphabet solution then the simplest method will be to use the Satimage.osax find text command.
The most recent version may be installed from here:
------------------------------------------------------------------------------
set _data to "Οἱ δὲ Φοίνιϰες οὗτοι οἱ σὺν Κάδμῳ ἀπιϰόμενοι.. ἐσήγαγον διδασϰάλια ἐς τοὺς ῞Ελληνας ϰαὶ δὴ ϰαὶ γράμματα, οὐϰ ἐόντα πρὶν ῞Ελλησι ὡς ἐμοὶ δοϰέειν, πρῶτα μὲν τοῖσι ϰαὶ ἅπαντες"
set foundGreek to fnd("(α|β|γ|δ|ε|ζ|η|θ|ι|κ|λ|μ|ν|ξ|ό|о|π|ρ|ς|Ύ|φ|χ|ψaω)+", _data, true, true) of me
------------------------------------------------------------------------------
--» HANDLERS
------------------------------------------------------------------------------
on fnd(_find, _data, _all, strRslt)
try
find text _find in _data all occurrences _all string result strRslt with regexp without case sensitive
on error
return false
end try
end fnd
------------------------------------------------------------------------------
This will produce a list of found contiguous strings of Greek letters.