Skip to main content

Method to get part-of-speech tags from universal dependencies data.

Project description

# ud2pos

[![CircleCI](https://circleci.com/gh/tpimentelms/ud2pos.svg?style=svg&circle-token=d3f2433d9576bb5413356b1ef77c50272d22de8d)](https://circleci.com/gh/tpimentelms/ud2pos)

This code creates a map from wordform to part-of-speech using UD data.

## Using this simple part-of-speech tagger

To use the ud2pos tagger, first install this repository and then instantiate the UdTagger class.

### Install Repository

To install the code in this repository run: `bash $ pip install -e . `

### Use code

To use the ud2pos tagger, add the following to your script: `python import ud2pos language = 'english' tagger = ud2pos.UdTagger(language) print('Pos tag is: %s' % tagger('Hi')) ` This pos tagger will return ‘UNK’ for words not in the universal dependencies.

## Adding new languages

To process ud data for new languages, run the following commands:

### Install Dependencies

Create a conda environment with `bash $ conda env create -f environment.yml `

### Download and parse universal dependencies (UD) data

You can easily download UD data with the following command `bash $ make get_ud `

You can then get the embeddings for a language with command `bash $ make process LANGUAGE=<language> ` As languages, you should be able to experiment on any in UD. For instance: ‘english’; ‘czech’; ‘basque’; ‘finnish’; ‘turkish’; ‘arabic’; ‘japanese’; ‘tamil’; ‘korean’; ‘marathi’; ‘urdu’; ‘telugu’; ‘indonesian’.

## Extra Information

#### Contact

To ask questions or report problems, please open an [issue](https://github.com/tpimentelms/ud2pos/issues).

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

ud2pos-0.113.tar.gz (785.9 kB view details)

Uploaded Source

File details

Details for the file ud2pos-0.113.tar.gz.

File metadata

  • Download URL: ud2pos-0.113.tar.gz
  • Upload date:
  • Size: 785.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for ud2pos-0.113.tar.gz
Algorithm Hash digest
SHA256 894b54295148c3e1ea262ae22df853d1ce31e8e3cb185b18c63fbccaea3cf40a
MD5 fed7fd84ba9c475c512ca662f95af69f
BLAKE2b-256 7cdc19aaf410d9e7fdaf4f3b6bc8e7a8fc5cc9a7a4ab177a99b36c04d039bb4a

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