Skip to main content

A generic language stemming utility, dedicated for gensim word-embedding.

Project description

Word embedding: generic iterative stemmer

A generic helper for training gensim and fasttext word embedding models.
Specifically, this repository was created in order to implement stemming on a Wikipedia-based corpus in Hebrew, but it will probably also work for other corpus sources and languages as well.

Important to note that while there are sophisticated and efficient approaches to the stemming task, this repository implements a naive approach with no strict time or memory considerations (more about that in the explanation section).

Based on https://github.com/liorshk/wordembedding-hebrew.

Lint Tests

Setup

  1. Create a python3 virtual environment.
  2. Install dependencies using make install (this will run tests too).

Usage

This section shows the basic flow this repository was designed to perform. It supports more complicated flows as well.

The output of the training process is a StemmedKeyedVectors object (in the form of a .kv file), which inherits the standard gensim.models.KeyedVectors.

  1. Under ./data folder, create a directory for your corpus (for example, wiki-he).

  2. Download Hebrew (or any other language) dataset from Wikipedia:

    1. Go to wikimedia dumps.
    2. Download hewiki-latest-pages-articles.xml.bz2, and save it under ./data/wiki-he.
  3. Create your initial text corpus:

    TODO: create a notebook for that.

  4. Train the model:

    TODO: create a notebook for that.

  5. Play with your trained model using playground.ipynb.

Generic iterative stemming

TODO: Explain the algorithm.

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

generic-iterative-stemmer-1.0.3.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

generic_iterative_stemmer-1.0.3-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file generic-iterative-stemmer-1.0.3.tar.gz.

File metadata

File hashes

Hashes for generic-iterative-stemmer-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4e5a3d77ebc5d7feeb378c057874dea49688dc66290a072b0ab120cff5bb6574
MD5 20adb77851087df52665721af8e3aee6
BLAKE2b-256 ce4c84cf7151a993552a0974c155589fce4b2a5f03f928b636618b96cf023739

See more details on using hashes here.

File details

Details for the file generic_iterative_stemmer-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for generic_iterative_stemmer-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ca828fb48be23526eac16bbde802d0cac1375d320156894893e02f13b5d64062
MD5 85691df20e16f83afd78360feecc6dcc
BLAKE2b-256 43622306378149a302e86297ef4b39a0f6a6a3a84bb69c63e46987db39ea02c6

See more details on using hashes here.

Supported by

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