Skip to main content

noyaki

Converts character span label information to tokenized text-based label information.

Installation

$ pip install noyaki

Usage

Pass the tokenized text and label information as arguments to the convert function.

import noyaki

label_list = noyaki.convert(
        ['明日', 'は', '田中', 'さん', 'に', '会う'],
        [[3, 5, 'PERSON']]
    )

print(label_list)
# ['O', 'O', 'U-PERSON', 'O', 'O', 'O'] 

If you want to remove the subword symbol (eg. ##), specify the subword argument.

import noyaki

label_list = noyaki.convert(
        ['明日', 'は', '田', '##中', 'さん', 'に', '会う'],
        [[3, 5, 'PERSON']],
	subword="##"
    )

print(label_list)
# ['O', 'O', 'B-PERSON', 'L-PERSON', 'O', 'O', 'O']

If you want to use IOB2 tag format, specify the scheme argument.

import noyaki

label_list = noyaki.convert(
        ['明日', 'は', '田', '##中', 'さん', 'に', '会う'],
        [[3, 5, 'PERSON']],
	scheme="IOB2"
    )

print(label_list)
# ['O', 'O', 'B-PERSON', 'I-PERSON', 'O', 'O', 'O']

Note

Only Japanese is supported.
supported tag formats are follow:

  • BILOU
  • IOB2

Metadata

Release files for noyaki 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for noyaki 0.2.0
File Size Uploaded
noyaki-0.2.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for noyaki 0.2.0
File Interpreter ABI Platform
noyaki-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 6.3 kB

Release files / noyaki-0.2.0.tar.gz

Download URL noyaki-0.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6162be127afd6b77741d0c9d9ba0e30a9e708ce2b1240201231082aed597cc7f
BLAKE2b-256 checksum
How to use checksums
af54ececbd1140dab823c58c5183f0b539daa13c4d07f95ad90674f999a6e1f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release files / noyaki-0.2.0-py2.py3-none-any.whl

Download URL noyaki-0.2.0-py2.py3-none-any.whl
Size 3.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f0791462f39346d501687535fc01ee7ed8bde359b7978d31ea542a43f8550b11
BLAKE2b-256 checksum
How to use checksums
e05424873254f71f183a580c76927928e6b6ad41649ee1bc3ffaf197278d2fcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page