01-17-2017, 02:51 AM
Referring to QM topic Spelling checker : I came up with reading the dictionary in my native language, using the following functions :
Function tempf12
Member function str.ToUnicode
Any advice for a more efficient - elegant solution to either this implementation or that in the above topic will be much appreciated.
Function tempf12
str sf="C:\Documents and Settings\S.E.Simopoulos\My QM\Aspell\dict\el.rws"
str sout s
int l new
rep 1500 ;; in this example I read only a small part of it
,sout.getfile(sf new)
,l=len(sout)
,if l=0
,,new=new+1
,else
,,sout.ToUnicode
,,out F"{l} {sout}"
,,new=new+l+1
Member function str.ToUnicode
function [str'sinp]
if empty(sinp)
,str s=this
else
,s=sinp
,
s.unicode(s CP_ACP)
s.ansi(s)
this=s
ret
Any advice for a more efficient - elegant solution to either this implementation or that in the above topic will be much appreciated.