WordE4MDE
Installation 🛠
With conda (recommended)
This repo is written in Python and Java. Thus, I recommend to use conda. To initialize the conda environment, just execute:
sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
conda env create --file=conda_venv.yml
conda activate word2vec-mde
python -m nltk.downloader all
After that, you need to download ModelSet dataset as all the experiments were run over this dataset.
python -m modelset.downloader
Without conda
You need to install:
- Python 3.8.X
- Openjdk 1.8
- Maven 3.8.6
Generate a virtual environment and then install the requirements.
sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -m nltk.downloader all
After that, you need to download ModelSet dataset.
python -m modelset.downloader
Download trained embeddings 🚀
To download the WordE4MDE embeddings just run the following:
./scripts/download_embeddings.sh
Exploring embeddings 📋
Let us consider the following list of words:
['state', 'atl', 'dsl', 'grammar',
'petri', 'statechart', 'ecore', 'epsilon',
'qvt', 'transformation']
The commands below compute, for each word model, the top 10 similar words for each word of the previous list:
python main.py --test_similarity --model glove-mde
python main.py --test_similarity --model skip_gram-mde
python main.py --test_similarity --model glove-wiki-gigaword-300
python main.py --test_similarity --model word2vec-google-news-300
Using the embeddings for meta-model classification, clustering and recommendation 📋
Meta-model classification task:
python main.py --evaluation_metamodel_classification --remove_duplicates
Meta-model clustering task:
python main.py --evaluation_metamodel_clustering --remove_duplicates
Meta-model concepts task (the parser is applied to the ModelSet dataset, and then the recommendation systems are trained and evaluated):
cd java/parser
mvn compile
mvn exec:java
cd ../..
python main.py --evaluation_metamodel_concepts --remove_duplicates --device cpu --context_type EEnum
python main.py --evaluation_metamodel_concepts --remove_duplicates --device cpu --context_type EPackage
python main.py --evaluation_metamodel_concepts --remove_duplicates --device cpu --context_type EClass
Example of recommendations:
python main.py --example_recommendation --model glove-mde --context_type {EClass, EPackage, EEnum} --remove_duplicates
python main.py --example_recommendation --model skip_gram-mde --context_type {EClass, EPackage, EEnum} --remove_duplicates
python main.py --example_recommendation --model glove-wiki-gigaword-300 --context_type {EClass, EPackage, EEnum} --remove_duplicates
python main.py --example_recommendation --model word2vec-google-news-300 --context_type {EClass, EPackage, EEnum} --remove_duplicates
Playground
If you want to test the word embeddings without installation, you can use our Playground.
Metadata
Release files for worde4mde 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| worde4mde-1.1.tar.gz | 4.7 kB | Without provenance | Details for worde4mde-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| worde4mde-1.1-py3-none-any.whl | Python 3 | none | any | Details for worde4mde-1.1-py3-none-any.whl |
Total release size: 9.3 kB
Release files / worde4mde-1.1.tar.gz
| Download URL | worde4mde-1.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e36f5d020b8242293b28c2ea22a82e09a11f1e1919f040714607caee73d9192e
|
|
BLAKE2b-256 checksum How to use checksums |
7884979a05d8694e8faca299c23b20da9145f8726ac97b218e51fc871c13e3b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.15
|
Release files / worde4mde-1.1-py3-none-any.whl
| Download URL | worde4mde-1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b14a4bac423bc92dc4fb78da9277219768b332f60f0cacffda34321638f55ced
|
|
BLAKE2b-256 checksum How to use checksums |
dee7938ab99db3fb408186ab83a88626fdf2f523d9b006f7b0b6ac20176e7b32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.15
|
Security for worde4mde 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.