semvec/pypi-packages huggingface dataset:
pywordfreq 0.4.2
Word frequency checker based on Wikipedia corpus written in Rust
License: MIT
Keywords: word,frequency,frequencies,rust,pyo3

<p align="center">
    <a href="https://github.com/intsights/pywordfreq">
        <img src="https://raw.githubusercontent.com/intsights/pywordfreq/master/images/logo.png" alt="Logo">
    </a>
    <h3 align="center">
        Word frequency checker based on Wikipedia corpus written in Rust
    </h3>
</p>


![license](https://img.shields.io/badge/MIT-License-blue)
![Python](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![OS](https://img.shields.io/badge/OS-Mac%20%7C%20Linux%20%7C%20Windows-blue)
![Build](https://github.com/intsights/pywordfreq/workflows/Build/badge.svg)
[![PyPi](https://img.shields.io/pypi/v/pywordfreq.svg)](https://pypi.org/project/pywordfreq/)

## Table of Contents

- [Table of Contents](#table-of-contents)
- [About The Project](#about-the-project)
  - [Built With](#built-with)
  - [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contact](#contact)


## About The Project

Rust library for checking against the Wikipedia word frequency corpus. The library is fast, memory efficient, and secure.
The data structure used to do full lookups is the Hashmap. A Suffix Array data structure [suffix](https://github.com/BurntSushi/suffix) is used to perform quick lookups of sub-patterns over the dictionary.


### Built With

* [pyo3](https://github.com/PyO3/pyo3)
* [suffix](https://github.com/BurntSushi/suffix)
* [ahash](https://github.com/tkaitchuck/ahash)


### Installation

```sh
pip3 install pywordfreq
```


## Usage

```python
import pywordfreq


# On the first use of library, the engine is loaded with the dictionary.
# It is worth to mention that there is a significant ammount
# of memory overhead for the engine.

# This function checks the frequency of the word "the" in the corpus
pywordfreq.full_frequency(
    word="the",
)
# This function checks the frequency of the word "inter" as a pattern
# in other words of the dictionary.
pywordfreq.partial_frequency(
    pattern="inter",
)
```


## License

Distributed under the MIT License. See `LICENSE` for more information.


## Contact

Gal Ben David - gal@intsights.com

Project Link: [https://github.com/intsights/pywordfreq](https://github.com/intsights/pywordfreq)
oblate 1.2.1
Python library for data validation
License: MIT
Requires Python: >=3.7.0

# Oblate — data, made easy
Oblate is a Python library that provides modern and robust interface for data and schema validation.

Focused around simplicity and flexibility, Oblate has the following features:

- Intuitive and modern object oriented interface
- Built in support for commonly used data structures
- Easily extendible and customizable to suit every use case
- Robust with no compromise on performance and speed
- Typed and plays well with static type checking

**[Documentation](https://oblate.readthedocs.io) • [Source Code](https://github.com/izxxr/oblate) • [Python Package Index](https://pypi.org/project/oblate)**

## Installation
Oblate is available on PyPi and can be installed using pip.
```
$ pip install oblate 
```
> **ℹ️ Didn't work?** Try prefixing the above command with `python -m` if you don't have `pip` on PATH or the command doesn't work for some reason.

## Usage
Oblate is focused around simplicity and ease of usage. Below snippet is an example of how data
is handled using Oblate:
```py
from oblate import validate, fields
import oblate

# A schema defines the structure of data
class Author(oblate.Schema):
    name = fields.String()  # Field must be a string
    bio = fields.String(none=True)  # Field allows None to be passed
    rating = fields.Integer(default=0)  # Optional field that defaults to 0

    # Apply custom validations to a field
    @validate.field(rating)
    def validate_rating(self, value, ctx):
        assert value >= 0 and value <= 10, 'Rating must be in range 0-10 inclusive'

class Book(oblate.Schema):
    title = fields.String()
    price = fields.Float()
    author = fields.Object(Author)

data = {
    'title': 'Art of Data Validation',
    'price': 20.30,
    'author': {
        'name': 'John',
        'bio': None,
        'rating': 4,
    }
}
book = Book(data)
print(f"{book.title} by {book.author.name}")
```
Check the [**Quickstart**](https://oblate.readthedocs.io/en/latest/tutorial/index.html) section in
documentation for an introduction to the basics of library.