diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 40 |
1 files changed, 40 insertions, 0 deletions
| @@ -118,3 +118,43 @@ Bear in mind that this will require around 50 GB free space. The mapped embeddin | |||
| 118 | ```bash | 118 | ```bash |
| 119 | ./demo.sh | 119 | ./demo.sh |
| 120 | ``` | 120 | ``` |
| 121 | |||
| 122 | ## Usage | ||
| 123 | |||
| 124 | ### WMD.py - Word Mover's Distance and Sinkhorn Distance | ||
| 125 | |||
| 126 | Aligns definitions using WMD or SNK metrics and matching or retrieval paradigms. | ||
| 127 | |||
| 128 | ``` | ||
| 129 | usage: WMD.py [-h] [-b] [-n INSTANCES] | ||
| 130 | source_lang target_lang source_vector target_vector source_defs | ||
| 131 | target_defs {all,wmd,snk} {all,retrieval,matching} | ||
| 132 | |||
| 133 | align dictionaries using wmd and wasserstein distance | ||
| 134 | |||
| 135 | positional arguments: | ||
| 136 | source_lang source language short name | ||
| 137 | target_lang target language short name | ||
| 138 | source_vector path of the source vector | ||
| 139 | target_vector path of the target vector | ||
| 140 | source_defs path of the source definitions | ||
| 141 | target_defs path of the target definitions | ||
| 142 | {all,wmd,snk} which methods to run | ||
| 143 | {all,retrieval,matching} | ||
| 144 | which paradigms to align with | ||
| 145 | |||
| 146 | optional arguments: | ||
| 147 | -h, --help show this help message and exit | ||
| 148 | -b, --batch running in batch (store results in csv) or running a | ||
| 149 | single instance (output the results) | ||
| 150 | -n INSTANCES, --instances INSTANCES | ||
| 151 | number of instances in each language to retrieve | ||
| 152 | ``` | ||
| 153 | |||
| 154 | Example; | ||
| 155 | |||
| 156 | ```bash | ||
| 157 | python WMD.py en bg bilingual_embeddings/en_to_bg.vec bilingual_embeddings/bg_to_en.vec wordnets/ready/en_to_bg.def wordnets/ready/bg_to_en.def all all | ||
| 158 | ``` | ||
| 159 | |||
| 160 | Will run on English and Bulgarian definitions, using WMD and SNK for matching and retrieval, for a total of 4 times. | ||
