Jump to content
Sign in to follow this  

Looking to make this more efficient

Recommended Posts

Hi all, This is the result of grabbing (what I thought at the time was) a simple free program from the internet and converting it to AutoIt as best I could.

It has a LOT of array juggling, that I feel must be able to be made more efficient. And maybe the whole thing could be made much simpler by a better coder than me... B-)

So, it takes a list of words from a textfile (TestLexicon.txt) and applies rules listed in SoundChange.ini to those words to create another file with all the orginal words, the rules that applied to them and what they eventually become. Could use some neatening, but that can wait until the next phase of the project (I'm hoping to create a GUI for it eventually).

The idea came from http://www.zompist.com/spell.html and his 'simple' C program...

It takes a 'lexical rule' in a certain format like: c/k/_ (replace all instances of 'c' with 'k')

And applies it to each word. So cat would become kat.

Variables can be used, in the ini file all variables are Uppercase letters.

So, if L=aeiou, and S=bqwrt, then L//_S# means any character in L (aeiou) is removed when before any character in S (bqwrt) at the end of a word (that's the # meaning).

The link has all this in much more detail.

Anyway, if anyone can spot more efficient and simpler ways to do this, I would love to hear it! I'll attach all starting files and look forward to comments... B-)

Edit: Rename SoundChange.txt to .ini

Edited by nikink

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...