vecmap
by
artetxem

Description: A framework to learn cross-lingual word embedding mappings

View on GitHub ↗

Summary Information

Updated 11 minutes ago
Added to GitGenius on May 24th, 2024
Created on September 23rd, 2016
Open Issues & Pull Requests: 15 (+0)
Number of forks: 136
Total Stargazers: 655 (+0)
Total Subscribers: 25 (+0)

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,992 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

VecMap is an open source Python framework for learning cross-lingual word embedding mappings, enabling the alignment of word embeddings from different languages into a shared vector space. The project implements methods described across four peer-reviewed papers published between 2016 and 2018, spanning venues including ACL, AAAI, and EMNLP. The framework addresses a fundamental challenge in multilingual natural language processing: how to map independently trained monolingual word embeddings so they can be used together for cross-lingual tasks.

The software provides four primary operational modes tailored to different data availability scenarios. The supervised mode is recommended when a large training dictionary exists and completes in approximately two minutes on either CPU or GPU. The semi-supervised mode targets situations with only a small seed dictionary. The identical mode operates without a seed dictionary by leveraging words that are spelled identically across languages. The unsupervised mode requires no seed dictionary and avoids reliance on identical words, though it demands significantly more computation, typically five hours on CPU or ten minutes on GPU hardware like a Titan Xp. Users can select the mode matching their available resources, with the general principle being to prefer higher supervision levels when possible.

The framework requires Python 3, NumPy, and SciPy as core dependencies, with optional CuPy support for CUDA acceleration on NVIDIA GPUs. Input embeddings must be in word2vec text format, and any training dictionaries should be provided as text files with one source-target word pair per line. The software outputs mapped embeddings in the same format, allowing seamless integration with downstream applications.

VecMap includes comprehensive evaluation tools for assessing the quality of mapped embeddings across three dimensions. Bilingual lexicon extraction evaluation supports both standard nearest neighbor retrieval and CSLS (Cross-domain Similarity Local Scaling) retrieval, with CSLS providing superior results at the cost of increased computational time. Cross-lingual word similarity evaluation measures how well the mapped embeddings preserve semantic relationships across languages. Monolingual word analogy evaluation, optimized for speed relative to word2vec's implementation, assesses the linguistic properties of the embeddings.

The repository provides interfaces to reproduce results from all four published papers, allowing researchers to verify findings or apply specific methodological variants. A downloadable dataset extends prior work from Dinu et al. (2014) and was used in the original papers. The software documentation addresses common performance concerns, noting that proper BLAS/LAPACK linking for NumPy is critical for CPU performance and that various hyperparameters including batch size, vocabulary cutoff, and convergence thresholds can be adjusted to trade speed for quality.

VecMap serves as a foundational component of Monoses, an unsupervised statistical machine translation system, demonstrating its utility in broader NLP pipelines. The project is licensed under the GNU General Public License version 3 or later. According to GitGenius activity classification, the repository has been categorized across domains including vector data processing, spatial analysis, coordinate transformation, and feature matching, reflecting the mathematical foundations of embedding alignment. The repository maintains connections to major open source projects including Microsoft's VSCode and TypeScript implementations as well as the Rust language project through overlapping contributor networks.

vecmap
by
artetxemartetxem/vecmap

Repository Details

Fetching additional details & charts...