It is currently Mon Sep 28, 2020 2:11 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Crossword Helper
PostPosted: Fri Nov 01, 2019 9:18 am 
Offline
Addict
Addict

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 1112
Location: Portugal
Suggested I use regular Expressions to search text but I did not have a clue so tried learning.

Made this programme to help with crosswords.

When run type in the letters you have using question marks for letters you do not know. Then click the get Words button and the list will be filled with words that match.

Just cannot get a regex to match the length of the word as well so just use len() on first pass.

This includes an English dictionary file not complete but seems quite big enough. This is just a list of words in a file.

You can get all the code and dictionary here. https://www.mediafire.com/file/iy96p6pvhuev3ht/Crossword_Help.zip/file

CD

PS Think I found the length bit

replace line 38 with
Code:
RegEx = "^" + Word  + "$"


and you can do away with checking the length,

CD

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: Crossword Helper
PostPosted: Tue Nov 05, 2019 3:46 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Apr 25, 2003 11:08 pm
Posts: 460
Very nice - simple and quick!

I'm going to try to adapt it to another kind of word puzzle.
This one gives you a word and you try make as many words as you can using the letters from the original word.

Regards,
Eric


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye