Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading Aspell Dictionary in native language
#1
Referring to QM topic Spelling checker : I came up with reading the dictionary in my native language, using the following functions :

Function tempf12
Code:
Copy      Help
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
Code:
Copy      Help
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)