Is it possible to store 1 MB of ASCII clean text to some Pascal source so functions and procedures will have access to it?
The aim of my plea is, that I have complex work in front of Me. I need to store Czech dictionary file which is The dictionary for Pspad text editor. Clients will have to type Czech words and I do not have to depend on their spell checkers. App should determine, if word is missspelled when respondent will type it to editable word. I will also have to use strings related Pascal unit to determine, if predefined three letters first three letters are presented inside The word. Fortunately, every edit box will contain only one word.
The question is, if is it possible to embed long dictionary from Pspad to The source code, because I know, that it is not possible to work from external data file when I will not speak about data stored on some servers. If it would cause memory allocation issues or code crash, I will have to give it up, so big dictionary will not be possible to embed.
Mailing lists / pas2js / 2020-09
how to store long data more than 1 mb of Ascii text
4 messages · 2 people · –
- JJean SUZINEAU 2
- MMgr. Janusz Chmiel 2
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I imagine the best would be to use a json file, which is basically a text file storing the data of a javascript object.
At first you'll need to write a program to convert the pspad dictionnary to json. (Check the licence of pspad dictionnary to avoid copyright problems).
Then you can easily put the json file on your server and load it from your pas2js file.
I think you'll need to compute a good index file too, to reduce the search time.
But recognising a word may be tricky.
May be you should dig in the direction of the integrated spellcheckers:
https://www.w3schools.com/tags/att_global_spellcheck.asp
It seems the feature is integrated in HTML/Javascript, may be you can directly get it in pas2js.
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200917/4f3092f6/attachment-0001.htm> -------------- next part --------------
A non-text attachment was scrubbed...
Name: project1.lpr
Type: application/x-wine-extension-lpr
Size: 5611 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200917/4f3092f6/attachment-0001.bin>
Oh, excellent work. I will follow yours idea. Really, implemented dictionary checking is The best approach. Thank you for yours code extension. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200917/113afc78/attachment.htm>
