Skip to main content

Embeddings for software modeling

Project description

WordE4MDE

WordE4MDE is a Python library that provides word embeddings for the MDE domain.

Installation 🛠

Using pip:

pip install worde4mde

Usage

First of all, you need to load the embeddings (currently supported: 'sgram-mde' and 'glove-mde').

from worde4mde import load_embeddings
sgram_mde = load_embeddings('sgram-mde')

The load_embeddings function returns a KeyedVectors object from the gensim library. If you want to retrieve the most similar words to a given word, you can use the most_similar function:

word = 'ecore'
sgram_mde.most_similar(positive=[word])
>>> [('emf', 0.6336350440979004), ('metamodels', 0.5963817834854126), 
     ('ecorebased', 0.5922590494155884), ... 

Furthermore, if you want to get the embedding of a given word, just write the following:

sgram_mde[word]
>>> [ 0.14674647  0.42704162  0.17717203  0.05179158  0.38020504 -0.00091264 ...

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

worde4mde-1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

worde4mde-1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file worde4mde-1.0.tar.gz.

File metadata

  • Download URL: worde4mde-1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for worde4mde-1.0.tar.gz
Algorithm Hash digest
SHA256 737f9b3ba4ed34b7ff0fef9355c288b162ab907145e974777d9b7dbcb8925e0b
MD5 9d589ff8b969e7046aa8521d93cc3cfa
BLAKE2b-256 2d83e5b39812d845994d2b1b3d19406a01a4510b1b3f204829186654bfafa4d7

See more details on using hashes here.

File details

Details for the file worde4mde-1.0-py3-none-any.whl.

File metadata

  • Download URL: worde4mde-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for worde4mde-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82031b55c2c1fa3275896aad263b7f553398ace7438c6aa9df2d32fc8ebcfe29
MD5 d483f5a1e1e6dcde34a3408e79b8720e
BLAKE2b-256 276df2b41c3b2decf3ee3f2e7c1740ada2c5bef1de24e40258a66bd405691655

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