semvec/pypi-packages huggingface dataset:
elisa-patch 0.3.7
Dictionary incorporation for machine translation

# Dependencies

```bash
unidecode
emoji
*kenlm
fuzzy
scikit-learn
pyxdameraulevenshtein 
pygtrie
numpy     
```

*Install kenlm wrapper from github:

```bash
pip install https://github.com/kpu/kenlm/archive/master.zip
```

# Usage

```python

    # Load english dictionary
    english_vocab = load_english_vocab(...)
    english_vocab.update(load_english_vocab(...))
    
    # Load bilingual lexicon dictionary
    foreign_dict = load_lexicon_norm(...)
    
    # Load target language model
    lm = kenlm.Model(...)

    # Train a ngram model if needed
    # ngram_train(foreign_dict, 'hin-tfidf-ngram_algo')

    # Ulf's romanizer
    romanizer = partial(romanize,
                        romanization_path=...,
                        language_code="hin")

    soundex_inst = fuzzy.DMetaphone()
    soundex_algo = lambda x: soundex_inst(x)[0].decode('utf-8') if soundex_inst(x)[0] is not None else x
    english_encoded_vocab = {e: soundex_algo(e) for e in english_vocab if e}

    # load the ngram model
    ngram_algo = pickle.loads(open(..., "rb").read())

    soundex_model = partial(soundex_similarity,
                            encoded_english_vocab=english_encoded_vocab,
                            romanizer=romanizer,
                            soundex=soundex_algo)

    lev_model = partial(lev_similarity, backup=soundex_model)
    ngram_model = partial(ngram_similarity, model=ngram_algo, backup=lev_model)
    final_model = partial(exact_similarity, backup=ngram_model)

    for line in open(...):
        source, target = line.strip('\n').split('\t')
        oovs = extract_oov(target, source, english_vocab=english_vocab, romanization=True)
        best, mods = translate_oov(target, oovs, foreign_dict, final_model, lm.score)

        if best != target:

            for oov in oovs:
                alt = list(mods[oov].keys())[0]
                trans = mods[oov][alt]
                debug.debug(f"{romanizer(oov)} -> {romanizer(alt)} : {list(trans)}")

            debug.debug(best)
            debug.debug("*"*100)
```

or 

```shell
python -m elisa_patch --help
```
weeder 0.1
Remove unneeded historical files
Requires Python: >=3.4, <4
Keywords: backup sysadmin junk

Remove unneeded historical files
================================

You may have backups.

Every day, your precious stuff is saved in a safe place.

But you may have too much of that...

This script will select for you what files to drop, based on a retention policy
such that as files get older you can keep less of them. The default policy
will keep all the files in the last two weeks, a file every week for the last
three months, a file every month for the last year, a file every year forever.

The script takes in input the existing files on command line and by default
will print on stdout the files to delete. You can use a chain of commands such
as::

    ls | xargs weeder | xargs rm

to run in a cron job every day to keep your backup directories light.


Our glorious help
-----------------

Running ``weeder -h`` you might be told::

    usage: weeder [-h] [-p AGE:DIST [AGE:DIST ...]] [-f REGEX] [-r YYYY-MM-DD]
                  [--print-keepers | --print-goners] [-q | -v]
                  [FILE [FILE ...]]

    positional arguments:
      FILE                  the files to weed

    optional arguments:
      -h, --help            show this help message and exit
      -p AGE:DIST [AGE:DIST ...], --policy AGE:DIST [AGE:DIST ...]
                            state that, of every file older than AGE days, we want
                            to keep at least one every DIST days
                            [default: 14:7 84:28 364:364]
      -f REGEX, --format REGEX
                            the pattern to extract a date from a file name
                            [default: (\d{4})-(\d{2})-(\d{2})]
      -r YYYY-MM-DD, --refdate YYYY-MM-DD
                            reference date to establish retention [default: today]
      --print-keepers       print the files to keep
      --print-goners        print the files to delete [default]
      -q, --quiet           talk less
      -v, --verbose         talk more

but who knows, really.


Running tests
-------------

You can run::

    python3 setup.py test
atd-email-util 0.0.2
Python utilities for sending emails with a gmail account.

# atd-email-util (emailutil)
Python utilities for sending emails with a gmail account.


## Installation

Master branch:

```
pip install atd-email-util
```

Development branch:

```
pip install atd-email-util-dev
```

## License

As a work of the City of Austin, this project is in the public domain within the United States.

Additionally, we waive copyright and related rights of the work worldwide through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).