Thread: Text Twist Program

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    24

    Text Twist Program

    Hi, I've made a program that solves the game text twist (a word game). I found a list of words online but some of the words aren't actually words at all. I was wondering if there was a way to verify if the string is actually a word and delete it if it's not. Is there any program that can do that or a way I can? I was thinking that I could use something like Microsoft Spell Check or something could someone help? Thanks.

  2. #2
    Registered User
    Join Date
    Aug 2006
    Posts
    28
    This may help.

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    yeah you're gonna need a dictionary file... unfotunately, good ones aren't the easiest to find...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    As major_small said, you'll need a dictionary. However, could you expand on how some words aren't words? You could do a quick test on the words to see if they contain unallowed characters (!"&#163;$%^&*()_+=}{[];:'@#~,<.>/?\|&#172;&#166;` just to name a few), and if they do, don't allow that word. Other than that ... a dictonary file's about the only thing I can think of.

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    (!"&#163;$%^&*()_+=}{[];:'@#~,<.>/?\|&#172;&#166;` just to name a few)
    Or better yet, isalpha() or isdigit() or isspace() or something in <cctype>.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Quote Originally Posted by dwks
    Or better yet, isalpha() or isdigit() or isspace() or something in <cctype>.
    He's trying to trick you, don't listen to him!! Hehe

    But, that's a much better idea. But some words have -'s in them, and spaces perhaps, so that won't be altogether accurate
    Last edited by twomers; 08-30-2006 at 01:46 PM.

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    What's the trick? You could discard all characters that don't match isspace(), isalpha(), or (if you want to accept numbers) isdigit(). It would be better than habing a long string of characters to ignore, hoping your program will always be run in the same locale under the same character set.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. Replies: 3
    Last Post: 05-25-2005, 01:50 PM
  3. Changing text size in a program
    By RedTroja in forum C++ Programming
    Replies: 3
    Last Post: 10-12-2003, 03:53 AM
  4. Help with text program...
    By gcn_zelda in forum Windows Programming
    Replies: 2
    Last Post: 09-08-2003, 12:47 AM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM