semvec/pypi-packages huggingface dataset:
juster 0.1.2
justification script
License: MIT

Juster
===========
Script for justification text with newlines and delimiters

Install
===========

.. code-block:: python

    pip install juster

Usage
===========

.. code-block:: python

    from juster import justify

    print(justify.__doc__)
    data = "some;thing;here\nvery;next;line"
    out = justify(data)
    print(out)


- 'justify' function parameters:
    - content - text with newlines and delimiters, to be converted /
                from version 0.1.2 it also can be list(tuple) of lists(tuples)

    - grid - True/False value, grid inside; default is True

    - frame - True/False value, frame around; default is False

    - enumerator - True/False value, will add enumerator column on the left

    - header - True/False value, will extract first row from content as header

    - topbar - str value. Topbar will be added on the top

    - newline - newline symbol; default is '\\n'

    - delimiter - delimiter symbol; default is ';'

    - justsize - justify size; default is 4

Example
===========

.. code-block:: python

    from juster import example

    example()
closely 19.0.2.dev0
Closely find closest pairs of points, eg duplicates, in a dataset
License: MIT
Requires Python: >= 3.6
Keywords: mathematics,geometry,closest pairs,similar data,duplicates

# Closely :triangular_ruler:
 [![PyPI version](https://badge.fury.io/py/closely.svg)](https://badge.fury.io/py/closely) [![Build Status](https://travis-ci.com/justinshenk/closely.svg?branch=master)](https://travis-ci.com/justinshenk/closely) [![DOI](https://zenodo.org/badge/187990744.svg)](https://zenodo.org/badge/latestdoi/187990744)



Find the closest pairs in an array. 

Closely compares distances of arrays/embeddings and sorts them.

### Getting Started

```bash
pip install closely
```

or install from source:

```bash
git clone https://github.com/justinshenk/closely
cd closely
pip install .
```

### How to use

```python
import closely

# X is an n x m numpy array
pairs, distances = closely.solve(X, n=1)
```

You can specify how many pairs you want to identify with `n`.


### Example
```python
import closely
import numpy as np
import matplotlib.pyplot as plt

# Create dataset
X = np.random.random((100,2))
pairs, distances = closely.solve(X, n=1)

# Plot points
z, y = np.split(X, 2, axis=1)
fig, ax = plt.subplots()
ax.scatter(z, y) 

for i, txt in enumerate(X): 
    if i in pairs: 
        ax.annotate(i, (z[i], y[i]), color='red') 
    else: 
        ax.annotate(i, (z[i], y[i]))

plt.show() 
```

Check `pairs`:
```ipython
In [10]: pairs                                                                                                                                
Out[10]: 
array([[ 7, 16],
       [96, 50]])

```

Output:
![example_plot](example_plot.png)

### Credit and Explanation

Python code for ordering distance matrices modified from [Andriy Lazorenko](https://medium.com/@andriylazorenko/closest-pair-of-points-in-python-79e2409fc0b2), packaged and made useful for >2 features by Justin Shenk.
pythaiwordcut 0.2.0
Simple Thai Wordcut in Python using Maximum Matching
License: MIT
Requires Python: >3.5.0

# pythaiwordcut - Thai Wordcut in Python

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c4cb39daa5a54ffd9c1a797072e0f6d2)](https://www.codacy.com/app/narongdejsrn/pythaiwordcut?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=narongdejsrn/pythaiwordcut&amp;utm_campaign=Badge_Grade)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pythaiwordcut.svg)
![PyPI - License](https://img.shields.io/pypi/l/pythaiwordcut.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pythaiwordcut.svg)

-----

A simple Thai wordcut written in Python, based on Maximum Matching algorithm by [S. Manabu](http://www.aclweb.org/anthology/E14-4016)
. Uses Lexitron (by [NECTEC](http://www.sansarn.com/lexto/license-lexitron.php)) dictionary as default

> Please note: This project is under development and should not be use in production , all function and interface are subject to change. If you have issue or suggestion please feel free to ask, contribution is also very welcome :)

## Installation

```bash
pip install pythaiwordcut
```

or

```bash
git clone https://github.com/zenyai/pythaiwordcut.git
python setup.py install
```

## Usage

```python
import pythaiwordcut as pwt

pt = pwt.wordcut(removeRepeat=True, stopDictionary="<full path to txt file>", removeSpaces=True, minLength=1, stopNumber=False, removeNonCharacter=False, caseSensitive=True, ngram=(1, 2), negation=False)
print "|".join(pt.segment(u'ทดสอบการตัดคำ'))
```

  * removeRepeat: remove intention insertion spelling error such as (สบายยยยยย)
  * stopDictionary: remove word that exist in this specify text file (one word one line)
  * removeSpaces: remove blank space
  * minLength: minimum length of each word
  * stopNumber: remove number if exist
  * removeNonCharacter: remove character that are not Thai or English character
  * caseSensitive: if set to false, will remove stop word without regarding the case
  * ngram: Add word ngram from (1, 2)
  * negation: If set to true, then it will add NOT_ to every word after negation word and space