semvec/pypi-packages huggingface dataset:
phonenumbers-jp 0.1.0
Analyze Japanese domestic phone numbers
License: MIT
Requires Python: >=3.7,<4.0

# phonenumbers-jp-py

![Test](https://github.com/ciscorn/phonenumbers-jp-py/actions/workflows/test.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/gh/ciscorn/phonenumbers-jp-py/branch/main/graph/badge.svg)](https://codecov.io/gh/ciscorn/phonenumbers-jp-py)
[![pypi package](https://img.shields.io/pypi/v/phonenumbers-jp?color=%2334D058&label=pypi%20package)](https://pypi.org/project/phonenumbers-jp)

Get attribute information from Japanese domestic phone numbers.

日本国内の電話番号から、種別や市外局番などの情報を取得します。

License: MIT

## Installation

```bash
pip3 install phonenumbers-jp -U
```

## Examples

```python
>>> phonenumbers_jp.parse("0311111111")
NumberInfo(parts=['03', '1111', '1111'], type='固定', subtype=None, message_area=NumberAndName(number='03', name='東京'), specified_carrier=None, callerid_delivery=None)

>>> phonenumbers_jp.parse("0992000000")
NumberInfo(parts=['099', '200', '0000'], type='固定', subtype=None, message_area=NumberAndName(number='099', name='鹿児島'), specified_carrier=None, callerid_delivery=None)

>>> phonenumbers_jp.parse("1840992000000")
NumberInfo(parts=['184', '099', '200', '0000'], type='固定', subtype=None, message_area=NumberAndName(number='099', name='鹿児島'), specified_carrier=None, callerid_delivery='withhold')

>>> phonenumbers_jp.parse("09011112222")
NumberInfo(parts=['090', '1111', '2222'], type='携帯', subtype=None, message_area=None, specified_carrier=None, callerid_delivery=None)

>>> phonenumbers_jp.parse("117")
NumberInfo(parts=['117'], type='特番', subtype='時報', message_area=None, specified_carrier=None, callerid_delivery=None)

>>> phonenumbers_jp.parse("05012345678")
NumberInfo(parts=['050', '1234', '5678'], type='IP', subtype=None, message_area=None, specified_carrier=None, callerid_delivery=None)

>>> phonenumbers_jp.parse("00630111111111")
NumberInfo(parts=['0063', '011', '111', '1111'], type='固定', subtype=None, message_area=NumberAndName(number='011', name='札幌'), specified_carrier=NumberAndName(number='0063', name='ソフトバンク株式会社'), callerid_delivery=None)

>>> phonenumbers_jp.parse("0120444444")
NumberInfo(parts=['0120', '444', '444'], type='フリーダイヤル', subtype=None, message_area=None, specified_carrier=None, callerid_delivery=None)
```

## API

```python
NumberTypes = Literal[
    "特番", "固定", "携帯", "IP", "M2M", "国際電話", "国外",
    "フリーダイヤル", "FMC", "ポケベル", "災害募金サービス", "ナビダイヤル"
]

@dataclass
class NumberAndName:
    number: str
    name: str

@dataclass
class NumberInfo:
    parts: List[str] = field(default_factory=list)  # 分解された電話番号
    type: Optional[NumberTypes] = None  # 種別
    subtype: Optional[str] = None  # 特番の内容
    message_area: Optional[NumberAndName] = None  # メッセージエリア (市外局番)
    specified_carrier: Optional[NumberAndName] = None  # 事業者指定番号
    callerid_delivery: Optional[Literal["withhold", "provide"]] = None  # 非通知・通知

def parse(number: str) -> NumberInfo:
    ...
```
Topsis-Abhav-102016096 0.3
A topsis score and ranks calculator package
License: MIT
Keywords: topsis

# Topsis-Calculator
## The efficient python package to calcualate topsis scores

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria-based decision-making method. TOPSIS chooses the alternative of shortest the Euclidean distance from the ideal solution and greatest distance from the negative ideal solution. 

To make this definition easier, let's suppose you want to buy a mobile phone, you go to a shop and analyze 5 mobile phones on basis of RAM, memory, display size, battery, and price. At last, you’re confused after seeing so many factors and don’t know how to decide which mobile phone you should purchase. TOPSIS is a way to allocate the ranks on basis of the weights and impact of the given factors.

## Features

- Imports an input csv file and calculates Topsis scores and ranks of it
- Output file consists of seaparate columns as Topsis scores and Ranks which is ideal for decision making



And of course Topsis itself is open source with a [public repository](https://github.com/abhavgoel/base-Topsis-Abhav-102016096)
 on GitHub.

## Installation

Topsis requires [Python](https://www.python.org/downloads/) v3+ to run.
Use pip to install the package.

```sh
pip install Topsis-Abhav-102016096
```
## Usage
```sh
import Topsis_Abhav_102016096 as tp
#call for topsis_score function
tp.topsis_score("input.csv","weights","impact","output.csv")
```
- Make sure you enter "weights" and "impact" as string
- The result would be stored in a output csv file with ranks and topsis score respectively.

## Example
input.csv
| Model | corr | R2  | Rmse | Acc |
| --- | --- | --- | --- | --- |
| m1  | 0.79 | 0.62 | 1.25 | 60.89 |
| m2  | 0.66 | 0.44 | 2.89 | 63.07 |
| m3  | 0.56 | 0.31 | 1.57 | 62.87 |
| m4  | 0.82 | 0.67 | 2.68 | 70.19 |
| M5  | 0.75 | 0.56 | 1.3 | 80.39 |

output.csv
| Model | corr | R2  | Rmse | Acc | Topsis score | Rank |
| --- | --- | --- | --- | --- | --- | --- |
| m1  | 0.79 | 0.62 | 1.25 | 60.89 | 0.7722097345612788 | 2   |
| m2  | 0.66 | 0.44 | 2.89 | 63.07 | 0.22559875426413367 | 5   |
| m3  | 0.56 | 0.31 | 1.57 | 62.87 | 0.43889731728018605 | 4   |
| m4  | 0.82 | 0.67 | 2.68 | 70.19 | 0.5238778712729114 | 3   |
| M5  | 0.75 | 0.56 | 1.3 | 80.39 | 0.8113887082429979 | 1   |

- The output csv contains the ranks of all the rows i.e. Model M5 is the best among the others




## License

MIT

**Free Software, Hell Yeah!**