semvec/pypi-packages huggingface dataset:
currency-iso4217 0.12.0
Librería para buscar divisas conforme listado ISO 4217. Last update: 2022-03-29
License: MIT

ISO 4217 currency definitions
============================================================

Package `currency_iso4217` is a self-contained module that allows search currency
by code, country or currency definition returning the corresponding active currency information.

## Pre requirements

Python >=3.6


## Installation

pip install currency-iso4217


## Usage

>>> from currency_iso4217 import search_by_code  
>>> search_by_code('CLP')  
>>> [{'position': 42, 'code': 'CLP', 'country': 'Chile', 'currency': 'Peso chileno', 'decimals': '0'}]  


>>> from currency_iso4217 import search_by_country  
>>> search_by_country('Chile')  
>>> [{'position': 41, 'code': 'CLP', 'country': 'Chile', 'currency': 'Unidad de fomento', 'decimals': '4'}, {'position': 42, 'code': 'CLP', 'country': 'Chile', 'currency': 'Peso chileno', 'decimals': '0'}]  


>>> from currency_iso4217 import search_by_currency  
>>> search_by_currency('Peso chileno')  
>>> [{'position': 42, 'code': 'CLP', 'country': 'Chile', 'currency': 'Peso chileno', 'decimals': '0'}]  


>>> from currency_iso4217 import search_decimals  
>>> search_decimals('USD')  
>>> 2


>>> from currency_iso4217 import show_list  
>>> show_list()
>>> [...]


Written by Marcelo Daniel Iacobucci. Distributed under Public Domain.
dader 0.0.4
The package of DADER (Domain Adaptation for Deep Entity Resolution).
License: MIT
Requires Python: >=3.6.0


## DADER: Domain Adaptation for Deep Entity Resolution

![python](https://img.shields.io/badge/python-3.6.5-blue)
![pytorch](https://img.shields.io/badge/pytorch-1.7.1-brightgreen)

Entity resolution (ER) is a core problem of data integration. The state-of-the-art (SOTA) results on ER are achieved by deep learning (DL) based methods, trained with a lot of labeled matching/non-matching entity pairs. This may not be a problem when using well-prepared benchmark datasets. Nevertheless, for many real-world ER applications, the situation changes dramatically, with a painful issue to collect large-scale labeled datasets. In this paper, we seek to answer: If we have a well-labeled source ER dataset, can we train a DL-based ER model for target dataset, without any labels or with a few labels? This is known as domain adaptation (DA), which has achieved great successes in computer vision and natural language processing, but is not systematically studied for ER. Our goal is to systematically explore the benefits and limitations of a wide range of DA methods for ER. To this purpose, we develop a DADER (Domain Adaptation for Deep Entity Resolution) framework that significantly advances ER in applying DA. We define a space of design solutions for the three modules of DADER, namely Feature Extractor, Matcher, and Feature Aligner. We conduct so far the most comprehensive experimental study to explore the design space and compare different choices of DA for ER. We provide guidance for selecting appropriate design solutions based on extensive experiments.

<!-- <img src="figure/architecture.png" width="820" /> -->

This repository contains the implementation code of six representative methods of [DADER]: MMD, K-order, GRL, InvGAN, InvGAN+KD, ED.

<!-- <img src="figure/designspace.png" width="700" /> -->


## DataSets
The dataset format is <entity1,entity2,label>. See [Hugging Face](https://huggingface.co/datasets/RUC-DataLab/ER-dataset) for details.

<!-- <img src="figure/dataset.png" width="700" /> -->


## Quick Start
Step 1: Requirements
- Before running the code, please make sure your Python version is 3.6.5 and cuda version is 11.1. Then install necessary packages by :
- `pip install dader`

- If Pytorch is not installed automatically, you can install it using the following command:
- `pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html`

Step 2: Run Example

    ```python
    #!/usr/bin/env python3
    from dader import data, model

    # load datasets
    X_src, y_src = data.load_data(path='source.csv')
    X_tgt, X_tgt_val, y_tgt, y_tgt_val = data.load_data(path='target.csv', valid_rate = 0.1)


    # load model
    aligner = model.Model(method = 'invgankd', architecture = 'Bert')
    # train & adapt
    aligner.fit(X_src, y_src, X_tgt, X_tgt_val, y_tgt_val, batch_size = 16, ada_max_epoch=20)
    # predict                    
    y_prd = aligner.predict(X_tgt)
    # evaluate
    eval_result = aligner.eval(X_tgt, y_prd, y_tgt)

    ```