Skip to content

Latest commit

 

History

History
277 lines (212 loc) · 8.12 KB

File metadata and controls

277 lines (212 loc) · 8.12 KB

Appendix

Appendix A

Tables 4 and 5 can be generated from the output of src/Table1to3_save_ultraviolet_and_light_pvalues.py.

Appendix B

To generate Fig. 10, run:

$ python src/Appendix_B_Fig10_make_glove_normalization.py
(a) Before Normalization (b) After Normalization

Appendix C

To generate Fig. 11, run:

$ python src/Appendix_C_Fig11_make_cossim_histogram.py
fig11.png

Fig. 12 is generated by src/Fig3_make_normalized_values_histograms.py.

(a) Components (b) Component-wise products (c) Component-wise products (magnified)

Table 6 can be generated from the output of src/Table1to3_save_ultraviolet_and_light_pvalues.py.

Appendix D

Fig. 13 is generated by src/Fig6_calc_valid_sentences_for_ultraviolet_and_light_bargraphs.py.

fig13.png

To generate Fig. 14, run:

$ src/Appendix_D_Fig14_make_ultraviolet_and_light_bargraphs_for_contextualized.py
fig14.png

Table 9a is generated by src/Fig6_make_ultraviolet_and_light_bargraphs_for_contextualized.py and Table 9b is generated by src/Appendix_D_Fig14_make_ultraviolet_and_light_bargraphs_for_contextualized.py.

Tables 10 and 11 can be generated from the output of src/Table1to3_save_ultraviolet_and_light_pvalues.py.

To generate Fig. 15, run:

$ python src/Appendix_D_Fig15_make_contextualized_normalization.py
(a) Before Normalization
(b) After Normalization

To generate Fig. 16, run:

$ python src/Appendix_D_Fig16_make_component_comparison_for_ica_and_pca.py
(a) Sorted along embeddings
(b) Sorted along axes

Appendix F

Table 12 can be generated from src/Fig9a_eval_wordsim.py and src/Fig9b_eval_analogy.py.

Precomputed results are also available in output/evaluation.

To generate Figs. 17 and 18, run:

$ python src/Appendix_F_Figs17_18_make_correration_with_cossim.py
(a) p = 1 (b) p = 10 (c) p = 100
fig18.png

Appendix G

To generate Fig. 19, run:

$ python src/Appendix_G_Fig19_make_plot_for_food_animals_plants.py
fig18.png

Appendix H

To generate Table 13, run:

$ python src/Appendix_H_Table13_make_top10_words.py

To generate Fig. 20, run:

$ python src/Appendix_H_Fig20_make_woman_girl_man_bargraphs.py
fig20.png

To generate Fig. 21, run:

$ python src/Appendix_H_Fig21_make_plots_for_comparing_embeddings.py 
(a) woman and girl (b) woman and man

To generate Fig. 22, run:

$ python src/Appendix_H_Fig22_make_plot_for_comparing_similarity.py
fig22.png

Appendix I

Appendix I.1

From the original repository shimo-lab/Universal-Geometry-with-ICA, download the ICA-transformed BERT embeddings and place them in data/embeddings/Universal-Geometry-with-ICA/bert-pca-ica-100000.pkl.

To generate Fig. 23, run:

$ python src/Appendix_I1_Fig23_make_shore_bargraphs.py 
fig22.png

Tables 14 are also generated.

Appendix I.2

Following the instructions in the original repository shimo-lab/Universal-Geometry-with-ICA, download the ICA-transformed and PCA-transformed fastText embeddings for multiple languages, as well as the fonts, and place them as follows:

data
└── embeddings
    └── Universal-Geometry-with-ICA
        ├── en-es-ru-ar-hi-zh-ja
        │   ├── axis_matching_ica.pkl
        │   └── axis_matching_pca.pkl
        └── fonts
            ├── NotoSansCJKjp-Regular.otf
            └── NotoSansDevanagari-VariableFont_wdth,wght.ttf

To generate Figs. 24 and 25, run:

$ python src/Appendix_I2_Fig24_25_make_boat_bargraphs.py
(a) English (b) Spanish

Table 16 is also generated.