Lexitron


NameLexitron JSON
Version 2.1.2 PyPI version JSON
download
home_pageNone
SummaryA command-line regex search engine for the English language
upload_time2025-01-17 06:57:51
maintainerNone
docs_urlNone
authorRothos
requires_python>=3.7
licenseGNU GPL Version 2
keywords english dictionary crossword spelling words lexicon search
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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
--------|-------------------------------------------------
  `-h`  | Print help and exit
  `-i`  | Print info header along with search results
  `-n`  | Print only the number of matches
  `-u`  | Include uppercase/proper words (like "France") in addition to lowercase/common words
  `-U`  | Search only for uppercase/proper words
  `-v`  | Print 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 lowercase English words ending with "icide".
```
$ lx icide$
aborticide      germicide       ovicide         spermicide
acaricide       giganticide     parasiticide    sporicide
agricide        herbicide       parasuicide     stillicide
algicide        homicide        parricide       suicide
aphicide        infanticide     patricide       tyrannicide
aphidicide      insecticide     pesticide       uxoricide
bacillicide     larvicide       prolicide       vaticide
bactericide     liberticide     pulicide        verbicide
deicide         matricide       raticide        vermicide
feticide        medicide        regicide        viricide
filicide        menticide       rodenticide     vulpicide
foeticide       miticide        scabicide
fratricide      molluscicide    silicide
fungicide       nematicide      sororicide
```

### Example 2
A list of lowercase English words that contain the substring "rdb", printed with info header.
```
$ lx -i rdb
20 matches for /rdb/

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 -n ".*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`), printed with info header.
```
$ lx -iu "([^aeious])\1.*\1\1"
45 matches for /([^aeious])\1.*\1\1/ (9 proper, 36 common)

Allhallowmas
Allhallows
Allhallowtide
Armillariella
Chancellorsville
Dullsville
Gallirallus
Hunnemannia
Llullaillaco

acciaccatura       jellyroll          rollcollar
bellpull           kinnikinnic        rollerball
chiffchaff         kinnikinnick       scuttlebutt
dillydallier       millefeuille       shillyshally
dillydally         niffnaff           skillfully
dullsville         parallelling       snippersnapper
flibbertigibbet    pellmell           villanelle
granddaddy         pizzazz            volleyball
hallalling         pralltriller       volleyballer
hillbilly          razzamatazz        whippersnapper
huggermugger       razzmatazz         willfully
hullaballoo        riffraff           yellowbelly
```

### Example 5
Compare the number of lowercase English words that end in "woman"
with the number that end in "man".
```
$ lx -n ".*woman"
107
```
```
$ lx -n ".*(?<\!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/rothos/lexitron/issues).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Lexitron",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "english, dictionary, crossword, spelling, words, lexicon, search",
    "author": "Rothos",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/08/c9/804512e6c2b63125a111747b5e969fb1c7ed742f4c3da4255c3239f19c00/lexitron-2.1.2.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  `-h`  | Print help and exit\n  `-i`  | Print info header along with search results\n  `-n`  | Print only the number of matches\n  `-u`  | Include uppercase/proper words (like \"France\") in addition to lowercase/common words\n  `-U`  | Search only for uppercase/proper words\n  `-v`  | Print 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 lowercase English words ending with \"icide\".\n```\n$ lx icide$\naborticide      germicide       ovicide         spermicide\nacaricide       giganticide     parasiticide    sporicide\nagricide        herbicide       parasuicide     stillicide\nalgicide        homicide        parricide       suicide\naphicide        infanticide     patricide       tyrannicide\naphidicide      insecticide     pesticide       uxoricide\nbacillicide     larvicide       prolicide       vaticide\nbactericide     liberticide     pulicide        verbicide\ndeicide         matricide       raticide        vermicide\nfeticide        medicide        regicide        viricide\nfilicide        menticide       rodenticide     vulpicide\nfoeticide       miticide        scabicide\nfratricide      molluscicide    silicide\nfungicide       nematicide      sororicide\n```\n\n### Example 2\nA list of lowercase English words that contain the substring \"rdb\", printed with info header.\n```\n$ lx -i rdb\n20 matches for /rdb/\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 -n \".*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`), printed with info header.\n```\n$ lx -iu \"([^aeious])\\1.*\\1\\1\"\n45 matches for /([^aeious])\\1.*\\1\\1/ (9 proper, 36 common)\n\nAllhallowmas\nAllhallows\nAllhallowtide\nArmillariella\nChancellorsville\nDullsville\nGallirallus\nHunnemannia\nLlullaillaco\n\nacciaccatura       jellyroll          rollcollar\nbellpull           kinnikinnic        rollerball\nchiffchaff         kinnikinnick       scuttlebutt\ndillydallier       millefeuille       shillyshally\ndillydally         niffnaff           skillfully\ndullsville         parallelling       snippersnapper\nflibbertigibbet    pellmell           villanelle\ngranddaddy         pizzazz            volleyball\nhallalling         pralltriller       volleyballer\nhillbilly          razzamatazz        whippersnapper\nhuggermugger       razzmatazz         willfully\nhullaballoo        riffraff           yellowbelly\n```\n\n### Example 5\nCompare the number of lowercase English words that end in \"woman\"\nwith the number that end in \"man\".\n```\n$ lx -n \".*woman\"\n107\n```\n```\n$ lx -n \".*(?<\\!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/rothos/lexitron/issues).\n",
    "bugtrack_url": null,
    "license": "GNU GPL Version 2",
    "summary": "A command-line regex search engine for the English language",
    "version": "2.1.2",
    "project_urls": {
        "Homepage": "http://github.com/rothos/lexitron"
    },
    "split_keywords": [
        "english",
        " dictionary",
        " crossword",
        " spelling",
        " words",
        " lexicon",
        " search"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcdd9e255baa6936e26dbee1dd63bec9c69cf5f3ffb3366915a5dc0600e783eb",
                "md5": "2740618538f27b28454bc9d8d753bb67",
                "sha256": "fc479d40c1a7c9737f86dc157018cbd4207e01a62bb84bc7c5b8904ca6f24dcc"
            },
            "downloads": -1,
            "filename": "Lexitron-2.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2740618538f27b28454bc9d8d753bb67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 873542,
            "upload_time": "2025-01-17T06:57:50",
            "upload_time_iso_8601": "2025-01-17T06:57:50.224195Z",
            "url": "https://files.pythonhosted.org/packages/dc/dd/9e255baa6936e26dbee1dd63bec9c69cf5f3ffb3366915a5dc0600e783eb/Lexitron-2.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08c9804512e6c2b63125a111747b5e969fb1c7ed742f4c3da4255c3239f19c00",
                "md5": "d91357dd3f381ea1743f8826611172bb",
                "sha256": "7ca896a3e8ac772424501b741d532cacbb46a7b698544d9adb70b871bb90d5e6"
            },
            "downloads": -1,
            "filename": "lexitron-2.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d91357dd3f381ea1743f8826611172bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 874568,
            "upload_time": "2025-01-17T06:57:51",
            "upload_time_iso_8601": "2025-01-17T06:57:51.642776Z",
            "url": "https://files.pythonhosted.org/packages/08/c9/804512e6c2b63125a111747b5e969fb1c7ed742f4c3da4255c3239f19c00/lexitron-2.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 06:57:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rothos",
    "github_project": "lexitron",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "lexitron"
}
        
Elapsed time: 9.35729s