Hey guys,
I was starting to get into the Factor programming language and I have never
done any programming in this language. I have done some programming in
Scheme so I have some knowledge about how some of the syntax works in this
language, but there are several differences. My question comes from a
project that I am working on for one of my computer science classes; my
project is the Word Amalgamation algorithm. What this algorithm does is it
reads in information from a file that contains a list of words which forms
the dictionary. Following the final word is a break designed by X's, and
following that are words that are scrambled together. With the scrambled
words we have to match that up to the words in the given dictionary to
determine if it is possible to unscramble that word to match as many words
in the dictionary. For example:
(input file)
tarp
given
score
refund
only
trap
work
earn
course
pepper
part
XXXXXX
resco
nfudre
aptr
sett
oresuc
XXXXXX
(output file)
score
******
refund
******
part
tarp
trap
******
NOT A VALID WORD
******
course
******
So I have been going through the help documents and looked at some of the
code but I was wondering if there was more information that I could find on
getting a file parsed into a vector, and how I access that information in
that vector to do a comparison on the dictionary? I did find the file-reader
and the file-writer, but I couldn't find any sample code that uses that
functionality. I was also wondering if there was functionality that allowed
me to scan through the word itself, character by character, to match up the
scrambled word to the words in the dictionary?
I would appreciate any help that could be offered, and I will continue
looking through the code to see if I can answer my own questions. I was just
hoping for some help since I haven't had a whole lot of experience in
Factor.
Thanks in advance for the help,
Stephen
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk