{ "info": { "author": "Phillip M. Feldman", "author_email": "Phillip.M.Feldman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature" ], "description": "OVERVIEW\r\n========\r\n\r\nThe Python program ``frequencies.py`` finds English words having specified\r\nletter frequencies. The user specifies letter frequencies via a ``dict`` (Python\r\ndictionary), which is a series of key-value pairs. The letter frequency ``dict``\r\nmay appear on the command line; if it does not, the program prompts the user to\r\nenter it interactively.\r\n\r\nIn each key-value pair, the key appears first, followed by a colon (:) and then\r\nthe associated value. The order of the key and the value within a pair are\r\ncritical, but the order of the pairs does not matter. Keys must be unique;\r\nvalues are not required to be unique.\r\n\r\nIn each key-value pair, the key must be one of the following:\r\n\r\n- a single letter, optionally enclosed in quotes. In this case the frequency\r\nspecified by the value (see below) applies to that specific letter.\r\n\r\n- an integer, in which case the frequency applies to an unspecified letter that\r\nmust be distinct from the letters associated with other frequencies.\r\n\r\nThe value must be one of the following:\r\n\r\n- a positive integer. This is the number of times that some letter--either the\r\nletter specified via the key or some other unique letter if the key is an\r\ninteger-- appears in a matching word.\r\n\r\n- a range of integers of the form m-n (two integers separated by a hyphen).\r\nThis indicates that the corresponding letter must appear at least m times but no\r\nmore than n times. For example, the key-value pair 'e:3-99' indicates that the\r\nletter 'e' must appear at least 3 and no more than 99 times. The first integer\r\n(m) may equal zero. One may use an asterisk (*) as a shorthand for 0-99, i.e.,\r\nthe asterisk indicates that the given letter may appear any number of times\r\n(including zero). One may use a question mark (?) as a shorthand for 0-1, and\r\na plus sign (+) as a shorthand for 1-99.\r\n\r\nNote: When specifying the frequency as a range, the key must name a specific\r\nletter. Thus, for example, the key-value pair '1:*' would be illegal.\r\n\r\n\r\nTO RUN THIS PROGRAM:\r\n===================\r\n\r\n(1) Verify that a spelling dictionary file containing one word per line exists\r\neither in the folder containing frequencies.py or one level higher in the folder\r\ntree.\r\n\r\n(2) Verify that the file command_line_input.py exists either in the same folder\r\nas frequencies.py or in a folder specified via the PYTHONPATH environment\r\nvariable.\r\n\r\n(3) Depending on what operating system you are using, open a Windows or Linux\r\ncommand prompt and make the folder containing frequencies.py the current folder.\r\n\r\n(4) Issue a command of the form 'python frequencies.py ' where is\r\na letter frequency specification.\r\n\r\n\r\nEXAMPLES\r\n========\r\n\r\n(1) To find 6-letter words containing one c, one d, two o's, one r, and one\r\nother letter, issue the following command:\r\n\r\n python frequencies.py c:1, d:1, o:2, r:1, 1:1\r\n\r\nThere are 4 matches: 'condor', 'cordon', 'corody', and 'doctor'.\r\n\r\n(2) To find 10-letter words containing one v, two instances of a second letter,\r\nthree instances of a third letter, and four instances of a fourth letter, issue\r\nthe following command:\r\n\r\n python frequencies.py v:1, 2:2, 3:3, 4:4\r\n\r\nThere are 2 matches: 'evennesses' and 'sleeveless'.\r\n\r\n(3) To find all words containing three or more e's and any number of m's, n's,\r\np's, and t's, issue the following command:\r\n\r\n python frequencies.py e:3-99,m:*,n:*,p:*,t:*\r\n\r\nThere are 6 matches: 'entente', 'epee', 'pentene', 'teepee', 'tenement', and\r\n'tepee'", "description_content_type": null, "docs_url": null, "download_url": "http://phillipmfeldman.org/English/frequencies.html", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://phillipmfeldman.org/English/frequencies.html", "keywords": "", "license": "MIT License", "maintainer": "Phillip M. Feldman", "maintainer_email": "Phillip.M.Feldman@gmail.com", "name": "frequencies", "package_url": "https://pypi.org/project/frequencies/", "platform": "", "project_url": "https://pypi.org/project/frequencies/", "project_urls": { "Download": "http://phillipmfeldman.org/English/frequencies.html", "Homepage": "http://phillipmfeldman.org/English/frequencies.html" }, "release_url": "https://pypi.org/project/frequencies/1.0/", "requires_dist": null, "requires_python": null, "summary": "find English words having specified letter frequencies", "version": "1.0" }, "last_serial": 612461, "releases": { "1.0": [] }, "urls": [] }