Skip to content

This is a project proposal to implement Yan et al.'s (2020) mBERT-Unaligned for cross-lingual RDs with Japanese, German and Italian untranslatable terms

Notifications You must be signed in to change notification settings

Koharu24/mBERT_crosslingual_rd

 
 

Repository files navigation

Project's overview

The following repository provides the full code in Python to a mBERT-based reverse dictionary (RD) for German, Italian and Japanese words.

Dataset folders

Besides the full script, two folders containing the datasets used for the implementation are here given: "MyMono" and "MyUWD". For a detailed description, please consult the corresponding READme files within each folder.

Reproducing the result

Clone this repo and navigate into its home directory. Also make sure Bun is installed.

Run the scraper

From within the ./scraper directory run:

python filter_words.py
bun scraper.ts

Prepare the data

From within the home director of the repo

python convert_data_to_paper_data.py

Train the model

Set the hyperparameters in the file ./train_model/mix/train_pair_bert.py. Then run:

python -m train_model.mix.train_pair_bert

Notes

Code found in ./train_model is an adaptation of BertForRD. Indeed, this project consists of a replication of Yan and colleagues' (2020) experiment on a crosslingual, unaligned RD. The paper of reference can be found at the following link https://aclanthology.org/2020.findings-emnlp.388/. As for the full original code, this is available on github at https://github.com/yhcc/BertForRD.git

About

This is a project proposal to implement Yan et al.'s (2020) mBERT-Unaligned for cross-lingual RDs with Japanese, German and Italian untranslatable terms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.3%
  • JavaScript 32.0%
  • HTML 14.8%
  • TypeScript 1.4%
  • CSS 0.5%