Lexitron
==============================================================================
A command-line regex search engine for the English language.
Requirements
------------------------------------------------------------------------------
The only major requirement is **Python**.
I don't actually know which versions of Python this package will work on, I've
only tested on my own system which is using Python 3.11. Any feedback about
what works and doesn't would be helpful.
I did not write Lexitron to work on Windows, although it is a simple enough
package that I don't see why it shouldn't.
If you try to install Lexitron and something goes wrong, let me know what your
system details are and I'll try to get it fixed.
Installation
------------------------------------------------------------------------------
Lexitron is available on the Python Package Index (pip). To install, simply
type
```
$ pip install lexitron
```
at the command line.
Once the install is complete, you can access Lexitron with the `lx` command at
the terminal.
Usage
------------------------------------------------------------------------------
Usage syntax is
```
$ lx [options] expression
```
where `expression` is a regular expression and `[options]` are as follows.
option | function
--------|-------------------------------------------------
`-d` | Append start and end delimiters `^...$` to search query
`-n` | Print only the number of matches
`-u` | Search only for lowercase/common/uncapitalized words
`-U` | Search only for uppercase/proper/capitalized words
`-v` | Show version and exit
`-x` | Print unformatted output, one word per line
Type `$ lx -h` for full help text.
If you aren't familiar with regular expressions, it isn't too hard to learn
the basics. There are many resources online. A good starting point is
the [Wikipedia article](https://en.wikipedia.org/wiki/Regular_expression).
Output
------------------------------------------------------------------------------
By default, Lexitron will output a well-formatted (potentially multi-column)
list of words, along with a header describing the results.
The results are separated into "proper" words (capitalized, like "France")
and "common" words (lowercase, like "boat").
Using the `-x` flag will return a more machine-readable output with one word
per line.
Examples
------------------------------------------------------------------------------
### Example 1
A list of English words ending with "icide".
```
$ lx icide$
---------------------------------------------------------------------------
53 results for /.*icide/
0 proper ~ 53 common
---------------------------------------------------------------------------
aborticide foeticide matricide pesticide stillicide
acaricide fratricide medicide prolicide suicide
agricide fungicide menticide pulicide tyrannicide
algicide germicide miticide raticide uxoricide
aphicide giganticide molluscicide regicide vaticide
aphidicide herbicide nematicide rodenticide verbicide
bacillicide homicide ovicide scabicide vermicide
bactericide infanticide parasiticide silicide viricide
deicide insecticide parasuicide sororicide vulpicide
feticide larvicide parricide spermicide
filicide liberticide patricide sporicide
```
### Example 2
A list of English words that contain the substring "rdb".
```
$ lx rdb
---------------------------------------------------------------------------
21 results for /rdb/
1 proper ~ 20 common
---------------------------------------------------------------------------
Standardbred
birdbath herdbook
birdbrain herdboy
cardboard leopardbane
hardback recordbook
hardbake standardbearer
hardball standardbred
hardbeam swordbill
hardboard thirdborough
hardboot wordbook
hardbound yardbird
```
### Example 3
The number of lowercase English words that end in "tion".
```
$ lx -nxu ".*tion"
3837
```
(This number should be taken with a grain of salt, since no dictionary
is perfect, and it depends on what you count as a valid english word,
and which technical or niche jargons are included; etc etc.)
### Example 4
A list of English words with the same double letter appearing twice, except
for those whose double letter is a vowel or the letter `s` (to ignore
words of the form `*lessness`).
```
$ lx "([^aeious])\1.*\1\1"
---------------------------------------------------------------------------
45 results for /([^aeious])\1.*\1\1/
9 proper ~ 36 common
---------------------------------------------------------------------------
Allhallowmas
Allhallows
Allhallowtide
Armillariella
Chancellorsville
Dullsville
Gallirallus
Hunnemannia
Llullaillaco
acciaccatura hillbilly pellmell shillyshally
bellpull huggermugger pizzazz skillfully
chiffchaff hullaballoo pralltriller snippersnapper
dillydallier jellyroll razzamatazz villanelle
dillydally kinnikinnic razzmatazz volleyball
dullsville kinnikinnick riffraff volleyballer
flibbertigibbet millefeuille rollcollar whippersnapper
granddaddy niffnaff rollerball willfully
hallalling parallelling scuttlebutt yellowbelly
```
### Example 5
Compare the number of lowercase/uncapitalized words that end in "woman"
with the number that end in "man".
```
$ lx -nxu ".*woman"
107
```
```
$ lx -nxu ".*(?<\!wo)man"
1145
```
Acknowledgements
------------------------------------------------------------------------------
For its dictionary, Lexitron uses the Automatically Generated
Inflection Database (AGID) by Kevin Atkinson. See
[http://wordlist.sourceforge.net/]([http://wordlist.sourceforge.net/]).
License
------------------------------------------------------------------------------
Lexitron is licensed under GNU GPL Version 2.
Contact
------------------------------------------------------------------------------
Questions, bug reports, and feature requests can be filed on the [Github
issues tracker](//github.com/hrothgar/lexitron/issues).
Raw data
{
"_id": null,
"home_page": "http://github.com/rothos/lexitron",
"name": "Lexitron",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "english,dictionary,crossword,spelling,words,lexicon,search",
"author": "Rothos",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/3d/ba/ba3e386c319342d8c7007521e6ac3c26aef0588adb35d4986c07da575f01/Lexitron-2.0.4.tar.gz",
"platform": null,
"description": "Lexitron\n==============================================================================\n\nA command-line regex search engine for the English language.\n\n\nRequirements\n------------------------------------------------------------------------------\nThe only major requirement is **Python**.\n\nI don't actually know which versions of Python this package will work on, I've\nonly tested on my own system which is using Python 3.11. Any feedback about\nwhat works and doesn't would be helpful.\n\nI did not write Lexitron to work on Windows, although it is a simple enough\npackage that I don't see why it shouldn't.\n\nIf you try to install Lexitron and something goes wrong, let me know what your\nsystem details are and I'll try to get it fixed.\n\n\nInstallation\n------------------------------------------------------------------------------\nLexitron is available on the Python Package Index (pip). To install, simply\ntype\n```\n$ pip install lexitron\n```\nat the command line.\n\nOnce the install is complete, you can access Lexitron with the `lx` command at\nthe terminal.\n\n\nUsage\n------------------------------------------------------------------------------\nUsage syntax is\n\n```\n$ lx [options] expression\n```\n\nwhere `expression` is a regular expression and `[options]` are as follows.\n\n option | function\n--------|-------------------------------------------------\n `-d` | Append start and end delimiters `^...$` to search query\n `-n` | Print only the number of matches\n `-u` | Search only for lowercase/common/uncapitalized words\n `-U` | Search only for uppercase/proper/capitalized words\n `-v` | Show version and exit\n `-x` | Print unformatted output, one word per line\n\nType `$ lx -h` for full help text.\n\nIf you aren't familiar with regular expressions, it isn't too hard to learn\nthe basics. There are many resources online. A good starting point is\nthe [Wikipedia article](https://en.wikipedia.org/wiki/Regular_expression).\n\n\nOutput\n------------------------------------------------------------------------------\nBy default, Lexitron will output a well-formatted (potentially multi-column)\nlist of words, along with a header describing the results.\n\nThe results are separated into \"proper\" words (capitalized, like \"France\")\nand \"common\" words (lowercase, like \"boat\").\n\nUsing the `-x` flag will return a more machine-readable output with one word\nper line.\n\n\nExamples\n------------------------------------------------------------------------------\n\n### Example 1\nA list of English words ending with \"icide\".\n```\n$ lx icide$\n---------------------------------------------------------------------------\n53 results for /.*icide/\n0 proper ~ 53 common\n---------------------------------------------------------------------------\n\naborticide foeticide matricide pesticide stillicide\nacaricide fratricide medicide prolicide suicide\nagricide fungicide menticide pulicide tyrannicide\nalgicide germicide miticide raticide uxoricide\naphicide giganticide molluscicide regicide vaticide\naphidicide herbicide nematicide rodenticide verbicide\nbacillicide homicide ovicide scabicide vermicide\nbactericide infanticide parasiticide silicide viricide\ndeicide insecticide parasuicide sororicide vulpicide\nfeticide larvicide parricide spermicide\nfilicide liberticide patricide sporicide\n```\n\n### Example 2\nA list of English words that contain the substring \"rdb\".\n```\n$ lx rdb\n---------------------------------------------------------------------------\n21 results for /rdb/\n1 proper ~ 20 common\n---------------------------------------------------------------------------\n\nStandardbred\n\nbirdbath herdbook\nbirdbrain herdboy\ncardboard leopardbane\nhardback recordbook\nhardbake standardbearer\nhardball standardbred\nhardbeam swordbill\nhardboard thirdborough\nhardboot wordbook\nhardbound yardbird\n```\n\n### Example 3\nThe number of lowercase English words that end in \"tion\".\n```\n$ lx -nxu \".*tion\"\n3837\n```\n(This number should be taken with a grain of salt, since no dictionary\nis perfect, and it depends on what you count as a valid english word,\nand which technical or niche jargons are included; etc etc.)\n\n\n### Example 4\nA list of English words with the same double letter appearing twice, except\nfor those whose double letter is a vowel or the letter `s` (to ignore\nwords of the form `*lessness`).\n```\n$ lx \"([^aeious])\\1.*\\1\\1\"\n---------------------------------------------------------------------------\n45 results for /([^aeious])\\1.*\\1\\1/\n9 proper ~ 36 common\n---------------------------------------------------------------------------\n\nAllhallowmas\nAllhallows\nAllhallowtide\nArmillariella\nChancellorsville\nDullsville\nGallirallus\nHunnemannia\nLlullaillaco\n\nacciaccatura hillbilly pellmell shillyshally\nbellpull huggermugger pizzazz skillfully\nchiffchaff hullaballoo pralltriller snippersnapper\ndillydallier jellyroll razzamatazz villanelle\ndillydally kinnikinnic razzmatazz volleyball\ndullsville kinnikinnick riffraff volleyballer\nflibbertigibbet millefeuille rollcollar whippersnapper\ngranddaddy niffnaff rollerball willfully\nhallalling parallelling scuttlebutt yellowbelly\n```\n\n### Example 5\nCompare the number of lowercase/uncapitalized words that end in \"woman\"\nwith the number that end in \"man\".\n```\n$ lx -nxu \".*woman\"\n107\n```\n```\n$ lx -nxu \".*(?<\\!wo)man\"\n1145\n```\n\n\nAcknowledgements\n------------------------------------------------------------------------------\nFor its dictionary, Lexitron uses the Automatically Generated\nInflection Database (AGID) by Kevin Atkinson. See\n[http://wordlist.sourceforge.net/]([http://wordlist.sourceforge.net/]).\n\n\nLicense\n------------------------------------------------------------------------------\nLexitron is licensed under GNU GPL Version 2.\n\n\nContact\n------------------------------------------------------------------------------\nQuestions, bug reports, and feature requests can be filed on the [Github\nissues tracker](//github.com/hrothgar/lexitron/issues).\n",
"bugtrack_url": null,
"license": "GNU GPL Version 2",
"summary": "A command-line regex search engine for the English language",
"version": "2.0.4",
"split_keywords": [
"english",
"dictionary",
"crossword",
"spelling",
"words",
"lexicon",
"search"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8b39606aaba0079c90679f1cc076489c1953027260e6184268e578a1bca1750d",
"md5": "7bfa1115fe3ef10fde490451d80b4bc5",
"sha256": "13c6210749054aa996bf97e4987339bd5fb509d3935272f26d2459e8d898fcbe"
},
"downloads": -1,
"filename": "Lexitron-2.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7bfa1115fe3ef10fde490451d80b4bc5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 872614,
"upload_time": "2023-03-21T05:14:31",
"upload_time_iso_8601": "2023-03-21T05:14:31.247085Z",
"url": "https://files.pythonhosted.org/packages/8b/39/606aaba0079c90679f1cc076489c1953027260e6184268e578a1bca1750d/Lexitron-2.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3dbaba3e386c319342d8c7007521e6ac3c26aef0588adb35d4986c07da575f01",
"md5": "d80c9a786059c60809920fb48b47cce7",
"sha256": "cdd8a7fb4ece6efb9c5253a0aaf456df22d6124b088699cb3179f3a7c62daaa9"
},
"downloads": -1,
"filename": "Lexitron-2.0.4.tar.gz",
"has_sig": false,
"md5_digest": "d80c9a786059c60809920fb48b47cce7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 873643,
"upload_time": "2023-03-21T05:14:33",
"upload_time_iso_8601": "2023-03-21T05:14:33.284052Z",
"url": "https://files.pythonhosted.org/packages/3d/ba/ba3e386c319342d8c7007521e6ac3c26aef0588adb35d4986c07da575f01/Lexitron-2.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-21 05:14:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "rothos",
"github_project": "lexitron",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lexitron"
}