Token Classification
Transformers
ONNX
Safetensors
Transformers.js
Japanese
bert
onnxruntime
pii
pii-detection
ner
privacy
redaction
presidio
japanese
Eval Results (legacy)
Instructions to use japan-opendata/ja-pii-ner-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use japan-opendata/ja-pii-ner-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="japan-opendata/ja-pii-ner-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("japan-opendata/ja-pii-ner-v1") model = AutoModelForTokenClassification.from_pretrained("japan-opendata/ja-pii-ner-v1", device_map="auto") - Transformers.js
How to use japan-opendata/ja-pii-ner-v1 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'japan-opendata/ja-pii-ner-v1'); - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from japan-opendata/ja-pii-ner-v1: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/japan-opendata/ja-pii-ner-v1/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://japan-opendata/ja-pii-ner-v1/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/japan-opendata/ja-pii-ner-v1/resolve/main/tokenizer_config.json
1.43 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "[PAD]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "[UNK]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "[CLS]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "[SEP]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "[MASK]", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "backend": "custom", | |
| "cls_token": "[CLS]", | |
| "do_lower_case": false, | |
| "do_subword_tokenize": true, | |
| "do_word_tokenize": true, | |
| "is_local": false, | |
| "jumanpp_kwargs": null, | |
| "local_files_only": false, | |
| "mask_token": "[MASK]", | |
| "mecab_kwargs": { | |
| "mecab_dic": "unidic_lite" | |
| }, | |
| "model_max_length": 512, | |
| "never_split": null, | |
| "pad_token": "[PAD]", | |
| "sep_token": "[SEP]", | |
| "subword_tokenizer_type": "wordpiece", | |
| "sudachi_kwargs": null, | |
| "tokenizer_class": "BertJapaneseTokenizer", | |
| "unk_token": "[UNK]", | |
| "word_tokenizer_type": "mecab" | |
| } | |