Skip to main content

transfrom different language pos tags to universal pos tags.

Project description

Posturner - Universal POS Tag Converter

Posturner is a Python tool for converting language-specific part-of-speech (POS) tags to universal POS tags. It supports multiple languages through mapping files.

Features

  • Convert POS tags from various languages to universal POS tags
  • Support for multiple languages through mapping files
  • Simple Python API for integration with NLP pipelines
  • Includes a comprehensive multi-language mapping file

Installation

pip install posturner

Usage

Basic Usage

from posturner import trans_universal_pos

# Convert a language-specific POS tag to universal POS
print(trans_universal_pos("nimisõna"))  # Output: NOUN
print(trans_universal_pos("tegusõna"))  # Output: VERB
print(trans_universal_pos("名词"))      # Output: NOUN

Supported Languages

Posturner currently supports conversion for:

  • Estonian (et)
  • English (en)
  • Chinese (zh)
  • Japanese (ja)
  • Urdu (ur)

Example conversions:

  • nimisõna(et) → NOUN
  • tegusõna(et) → VERB
  • noun(en) → NOUN
  • 名词(zh) → NOUN
  • 動詞(ja) → VERB
  • اسم(ur) → NOUN

Advanced Usage

You can use your own mapping files by placing them in the posturner directory:

from posturner.set import pos_set

# Add custom mappings
pos_set["my_custom_tag"] = "NOUN"

Contributing

Contributions are welcome! Please submit pull requests with:

  • New language mappings
  • Bug fixes
  • Documentation improvements

License

MIT License - See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

posturner-0.1.13.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

posturner-0.1.13-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file posturner-0.1.13.tar.gz.

File metadata

  • Download URL: posturner-0.1.13.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for posturner-0.1.13.tar.gz
Algorithm Hash digest
SHA256 d6b70d7c20bc851abfa3cc6424b31f62872c126347a48e27db1b2eb11e144e4f
MD5 10850962db0e4d82600dfa041eb01c86
BLAKE2b-256 8391a99a1564cd1e7fc4c290b82c811f519c96d38a5e52075b8da0f044448083

See more details on using hashes here.

File details

Details for the file posturner-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: posturner-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for posturner-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6992433bfdf2118fc65cd6852b651d72c913e23f707600eaaa22b1960b4ecab6
MD5 94e3d245a18edcb9ea2d27cda4630b38
BLAKE2b-256 b664de00fb16fd3a85b1fa0787a2afc1eb97c79fa930e7c064977d11349271c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page