Saturday, June 13, 2009

F# progress

Made some progress on my name generator. The statistical analysis side is the hardest part - parsing individual words into their constituent syllables. I am happy to report that after several hours of plugging away, I have a mostly F#-axiomatic syllable parser based on the logic of my C# version. I made gratuitous use of discriminated unions, pattern matching, and recursive functions to write the word parsing logic, rather than OOP and procedural methods similar to what I used in C#. I feel like this has given me a decent grasp on what the language is capable of.

My next task is to continue the statistical analysis portion, and generate syllable boundary data (which is important for the generator to know how to put words together in ways that make sense). After that, the generator itself needs to be written, which should be a simple matter.

The only question at this point that I have is how to handle the SQL database access - much of the logic for generation is embedded in the SQL calls to the database. I'm considering eschewing the database completely and designing my own file-based storage solution, but then I have a whole new class of problems.

In the end, this is going to get compiled as a class library, for consumption in my name generator website (which currently isn't online).

No comments: