Skip to main content

spaCyTurk - trained spaCy models for Turkish

Project description

spaCyTurk - trained spaCy models for Turkish

spaCyTurk is a library providing trained spaCy models for Turkish language.

Available Models

Trained floret vectors for Turkish

The floret vectors were trained on the deduplicated version of OSCAR-2109 Turkish corpus. The sentence segmented (non-Turkish sentences were removed) and tokenized final corpus has a size of 30GB and 4327M tokens.

For more details, see the article describing the parameter selection and evaluation process.

training parameters: model=cbow, dim=300, minn=4, maxn=6, hashCount=2, minCount=5, ws=5, neg=10, lr=0.05, epoch=5

Two models (tr_floret_web_md, tr_floret_web_lg) are available with bucket sizes of 50000 and 200000 respectively.

Model performances were evaluated in below downstream NLP tasks.

  • Named Entity Recognition, NER
  • Part of Speech Tagging, POS
  • Offensive Language Identificaton, OLI
  • Movie Sentiment Analaysis, MSA
Vectors NER POS OLI MSA Model Size
none 90.19 82.60 61.07 75.63 -
fastText (~3.4M vectors/keys) 92.36 92.49 69.83 75.62 4.1GB
tr_floret_web_md (bucket 50K) 92.87 93.02 73.55 76.98 60MB
tr_floret_web_lg (bucket 200K) 93.05 93.51 74.00 77.28 240MB
BERT 95.71 96.42 79.37 80.87 444MB

Evaluation metrics: micro f1-score for NER, accuracy for POS, macro f1-score for OLI and MSA.

Installation & Usage

Trained models can be installed directly from Hugging Face Hub. Alternatively, you can install spacyturk from PyPI and download models through its API. This is the recommended way since the downloader performs version compatibility checks.

pip install spacyturk
import spacyturk

# downloads the spaCyTurk model
spacyturk.download("model_name")

# info about spaCyTurk installation and models
spacyturk.info()

# load the model using spaCy
import spacy
nlp = spacy.load("model_name")

Alternatively, download models through CLI

# downloads the spaCyTurk model
python -m spacyturk download model_name

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

spacyturk-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

spacyturk-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file spacyturk-0.1.0.tar.gz.

File metadata

  • Download URL: spacyturk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for spacyturk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca03240e9e23b278c140dfd5a94bae8338594fa97fe0c428ddb2466318453e0f
MD5 157f3449bb8199d9d05fa3b2578d2abd
BLAKE2b-256 419ad9978540cea44e2d32ebd881eed9af166329d07f27086b7c6e4791ed8d88

See more details on using hashes here.

File details

Details for the file spacyturk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spacyturk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for spacyturk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b47e1e5eaaecb4edbb4820cdc31a2ad980abdae4bb7a5bb545f69c9fadb2985b
MD5 05ed6993e8d37dfc0a9a99efe095b552
BLAKE2b-256 d73e399aeedd94b8332ff47ad4c6e4a71135135c5c7737005045570a637778c9

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