semvec/pypi-packages huggingface dataset:
pyfiscal 2.1.2
Pyfiscal calculation of tax data.
License: MIT
Requires Python: >=3.9
Keywords: RFC, CURP, NSS, fiscal, tax, SAT

# Calculation of tax data in México

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/sutsantiago/pyfiscal/blob/master/LICENSE.txt)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

## Installation

Install pyfiscal.
```python
pip install pyfiscal
```

CURP
----
The Clave Única de Registro de Población (CURP) is a unique 18 character alphanumeric identity code for both Mexican residents and citizens.

![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/CURP.jpg)


RFC
---
The Federal Taxpayer Registry is a code used in Mexico to distinguish each individual or company required to pay taxes. The people or organizations that have their RFC are called contributors.

1.- Physical person:

![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/RFC.jpg)

This homoclave will be designated by the SAT, reviewing the request through already designated official paper.


NSS
---
The Social Security Number (NSS) is unique, permanent and nontransferable and is assigned to keep a record of workers and insured.

![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/NSS.png)

Validation:
* Only 11 digits will be validated.
* Validation by the Luhn algorithm.
* Calculate the last digit.


## Getting Started with Docker
If you want to install the dependencies and work using Docker, you can simply follow this steps. 

Clone the project repository
```bash
git clone https://github.com/roottsantiago/pyfiscal.git
cd pyfiscal
```

### Usage
There are several ways to use the project because there are those using `docker-compose.yml` and `Dockerfile`. Here's how to use it:

> This is for the install part with docker-compose
```compose
# Build
docker-compose build
# Run
docker-compose up -d
````

## Unit Tests
```python
python -m unittest tests/data_fiscal_test.py
python -m unittest tests/validator_test.py
```
> Testing with docker
```python
docker exec pyfiscal python -m unittest tests/data_fiscal_test.py
docker exec pyfiscal python -m unittest tests/validator_test.py
```
## License

See LICENSE for more details (The MIT License).


## References

https://es.wikipedia.org/wiki/Algoritmo_de_Luhn
spacy-annotator 2.1.4
SpaCy annotator for Named Entity Recognition (NER) using ipywidgets.
License: MIT
Keywords: spacy, NER, NLP

# spacy-annotator

SpaCy annotator for Named Entity Recognition (NER) using ipywidgets.
The annotator allows users to quickly assign (custom) labels to one or more entities in the text, including noisy-prelabelling!   

**Features**:

* The annotator supports pandas dataframe: it adds annotations in a separate 'annotation' column of the dataframe;
* Why not use transformers to label your data for you? 
If a model is passed into the annotator, it is used to identify entities and pre-fill the annotator for you.
* The annotations adhere to spaCy format and are ready to serve as input to a spaCy NER model.   
No additional code required!

Blog post: [medium/enrico.alemani/spacy-annotator](https://medium.com/@enrico.alemani/how-to-create-training-data-for-spacy-ner-models-using-ipywidgets-c4aa71bf61a2)

## Installation
```
pip install spacy-annotator
```

## Example: annotations using spaCy model 

https://user-images.githubusercontent.com/31287731/119233291-4079be00-bb20-11eb-8a8d-7ad1436c662b.mov



For code, see [spacy_annotator demo](demo/spacy_annotator_demo.ipynb) notebook.

## Contributors
[dayalstrub-cma](https://github.com/dayalstrub-cma) - Refactored code to class, added displacy visualisation and entity ruler.   
[LeafmanZ](https://github.com/LeafmanZ) - Added `to_spacy` method.

## Contributing

1. Fork the repo on GitHub;
2. Clone the project to your own machine;
3. Commit changes to your own branch; and
4. Push your work back up to your own fork;
5. Submit a Pull request so that I can review your changes.

## Dependencies

Spacy-annotator works with SpaCy 3.X, and ipywidgets 7.X.

## References

spacy-annotator is based on [spaCy](https://spacy.io/) and [pigeon](https://github.com/agermanidis/pigeon) (see also [PigeonXT](https://github.com/dennisbakhuis/pigeonXT)).   
Many thanks to them for making their awesome libraries publicly available. Another interesting project is [Doccano](https://github.com/doccano/doccano).

**Note**:
spaCy is a great library and, most importantly, free to use. So please also consider using the https://prodi.gy/ annotator to keep supporting the spaCy deveopment.

## Changelog
2024-03-25: Update ipywidget requirements to >=8