pycrossword
User Guide
×
Menu tab
Index tab

3.9. Working with word sources

 
pycrossword's key functionality is automatic generation of crossword in a given grid. In this, the application relies on word sources -- collections of words against which pattern searching is performed to find words matching a given pattern.
 
Apart from words proper, word sources can also contain part-of-speech (POS) data to reflect which part of speech a word belongs to. One and the same word may belong to different parts of speech. English is a very good example of such behavior, in fact. Thus, the word 'stone' may be a noun (as in "he lifted a stone from the ground"), an adjective (as in: "a stone wall"), or a verb (as in: "earlier people would have stoned him to death"). As you will see further, pycrossword lets you handle part-of-speech data in a flexible way, for example, by allowing only specific parts of speech (most commonly, nouns) to go into the crossword.
 
Every generation cycle starts an iterative search looking for words matching the dynamically updated word patterns (while also applying part-of-speech search rules, if given). Each matching word is used only once (to avoid duplicates in the crossword). While this process is run completely in memory, pycrossword can use several options to import and use such word collections.
 
submit to reddit
Made with help of Dr.Explain