You are here: PSPad forum > English discussion forum > Re: Learning alternative text machine
Posted by: Esgrimidor | Date: 2014-06-23 10:32 | IP: IP Logged
Learning alternative text machine
We have a txt file with text.
Composed by lines in the txt file.
Each line is a phrase.
Under each line I want to put a new line composed by a replacement criteria. (or in a new txt file...)
The scritp would like to have two modes :
- learning mode
- automatic replacement mode
We need a "database" with the rules for the replacements.
We analyze each line (phrase) in the original txt file.
When we find in the txt file a sub-phrase with a corresponding replacement in our "database" we propose the replacement.
The above example is our first algorithm.
the second algorith is a delete criteria. When we found a word or a subphrase decide if delete or not.
Can I have this script or you know a program to do this and more ?
Best Regards
--
Nice program indeed
Posted by: pspad | Date: 2014-06-23 10:46 | IP: IP Logged
Hello
I am afraid, there is no such script. You can write it yourself, but be on your place, I will use any database solution as storage, not a text files.
In database is easier to connect phrases and answers, connect several questions with one answers e.t.c.
Your request isn't request for general text editor, you are requesting specialized solution for your concrete task
Posted by: Esgrimidor | Date: 2014-06-24 22:24 | IP: IP Logged
understood
Best Regards
--
Nice program indeed
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR