semvec/pypi-packages huggingface dataset:
vlac 0.1.2.5
Tool for creating document features
License: MIT

# Vectors of Locally Aggregated Concepts (VLAC)

[![PyPI - Status](https://img.shields.io/badge/status-beta-yellow.svg)]()
[![PyPI - Python](https://img.shields.io/badge/python-3.4%20%7C%203.5%20%7C%203.6-blue.svg)]()
[![PyPI - Python](https://img.shields.io/badge/license-MIT-green.svg)]()


## Purpose
As illustrated in the Figure below, VLAC clusters word embeddings to create *k* concepts. Due to the high dimensionality of word embeddings (i.e., 300) spherical k-means is used to perform the clustering as applying euclidean distance will result in little difference in the distances between samples. The method works as follows. Let *w<sub>i</sub>* be a word embedding of size *D* assigned to cluster center *c<sub>k</sub>*. Then, for each word in a document, VLAC computes the element-wise sum of residuals of each word embedding to its assigned cluster center. This results in *k* feature vectors, one for each concept, and all of size *D*. All feature vectors are then concatenated, power normalized, and finally, l2 normalization is applied. For example, if 10 concepts were to be created out of word embeddings of size 300 then the resulting document vector would contain 10 x 300 values. 

<img src="https://github.com/MaartenGr/VLAC/blob/master/Images/vlac.png?raw=true" width="70%"/>

## Usage
Tested in python 3.5.4. 

```python
# Train model and transform collection of documents
vlac_model = VLAC(documents=train_docs, model=model, oov=False)
vlac_features, kmeans = vlac_model.fit_transform(num_concepts=30)

# Create features new documents
vlac_model = VLAC(documents=train_docs, model=model, oov=False)
test_features = vlac_model.transform(kmeans=kmeans)
```
Vectors-of-Locally-Aggregate-Concepts 0.1
Tool for creating document features
License: MIT

# Vectors of Locally Aggregated Concepts (VLAC)

[![PyPI - Status](https://img.shields.io/badge/status-beta-yellow.svg)]()
[![PyPI - Python](https://img.shields.io/badge/python-3.4%20%7C%203.5%20%7C%203.6-blue.svg)]()
[![PyPI - Python](https://img.shields.io/badge/license-MIT-green.svg)]()


## Purpose
As illustrated in the Figure below, VLAC clusters word embeddings to create *k* concepts. Due to the high dimensionality of word embeddings (i.e., 300) spherical k-means is used to perform the clustering as applying euclidean distance will result in little difference in the distances between samples. The method works as follows. Let *w<sub>i</sub>* be a word embedding of size *D* assigned to cluster center *c<sub>k</sub>*. Then, for each word in a document, VLAC computes the element-wise sum of residuals of each word embedding to its assigned cluster center. This results in *k* feature vectors, one for each concept, and all of size *D*. All feature vectors are then concatenated, power normalized, and finally, l2 normalization is applied. For example, if 10 concepts were to be created out of word embeddings of size 300 then the resulting document vector would contain 10 x 300 values. 

<img src="https://github.com/MaartenGr/VLAC/blob/master/Images/vlac.png" width="70%"/>

## Usage
Tested in python 3.5.4. 

```python
# Train model and transform collection of documents
vlac_model = VLAC(documents=train_docs, model=model, oov=False)
vlac_features, kmeans = vlac_model.fit_transform(num_concepts=30)

# Create features new documents
vlac_model = VLAC(documents=train_docs, model=model, oov=False)
test_features = vlac_model.transform(kmeans=kmeans)
```
fanolabsasr 0.0.1
FanoLabs Asr module for Python3
License: MIT

fanolabsasr
==========

FanoLabs Asr module for Python3

<!-- TOC -->

- [Installation](#installation)
- [License](#license)
- [API](#api)
    - [stt(senderId, filepath, language)](#stt(senderId,filepath,language))


<!-- /TOC -->

## Installation

Current stable release (`0.0.1`)

```sh
$ pip install fanolabsasr
```

## Common Usage
We suggest you load the module via `import`, pending the stabalizing of es modules in node:
```python
from fanolabsasr import Asr
import os
curPath = os.path.abspath(os.path.dirname(__file__))

class Speech:

    def __init__(self):
        self.client = Asr(`url`, `corpId`, `authKey`)

    def __call__(self, senderId, filepath, language):
        return self.client.stt(senderId, filepath, language)

def main():
    returnObj = Speech()(`senderId`, os.path.abspath(curPath + '/test.wav'), `Cantonese`)
    print(returnObj)

if __name__ == '__main__':
    main()
```

`Note`: `url`(e.g. https://xxx.fanoai.cn/asr)、`corpId`、`authKey` should set to the specific correct configuration.

## API

### stt(senderId,filepath,language)

- `senderId` A string representing the user for chatting with asr
- `filepath` A string representing the local wav file path 
- `language` A string representing the language for the user input content, allowed languages to 'Cantonese, English, Mandarin'
- Returns: 

    `Note`: successful response
    ```js
    {
        'status': 200,
        'content': [{
            'recording_id': 'speech',
            'start_time': 0.83,
            'end_time': 1.62,
            'n_bests': [{
                'text': '明白街',
                'confidence': 0.121796916
            }],
            'text': '明白街',
            'confidence': 0.121796916,
            'success': True
        }]
    }
    ```

    `Note`: Error handling
    ```js
    {
        'status': 500,
        'statusText': 'Internal Server Error',
        'error_msg': "'input_language'"
    }
    ```

## License

MIT
django-script-pattern 0.3.3
Django script pattern app
License: MIT

*********************
django-script-pattern
*********************

This app allows you to add ``script`` blocks into your pages using url patterns like:
    
- /category/*
- /\*/subcategory/\*

# Includes GET parameters

- /products/catalog/\*category=some-category\*
    

Use ``*`` to pass any symbols and ``$`` as the end. 

Available to use four block locations:

1. Head - Top
2. Head - Bottom
3. Body - Top
4. Body - Bottom

************
Installation
************

Install with pip:

.. code:: shell

    $ pip install django-script-pattern


**********************
Update INSTALLED_APPS:
**********************

.. code:: python

    INSTALLED_APPS = [
        ...
        'script_pattern',
        'django-admin-sortable2',
        'django_jinja',  # optional for jinja2 global function
        ...
    ]

Apply migrations:

.. code:: shell

    $ python manage.py migrate

---------------
Example to use:
---------------

.. code:: jinja

    #layout.jinja
    <html lang="en">
        <head>
            {{ get_script_pattern(request, 'head', 'top') }}
            ...
            some head content
            ...
            {{ get_script_pattern(request, 'head', 'bottom') }}
        </head>

        <body>
            {{ get_script_pattern(request, 'body', 'top') }}
            ...
            some body content
            ...
            {{ get_script_pattern(request, 'body', 'bottom') }}
        </body>
    </html>