akutuzov / webvectors

Web-ify your word2vec: framework to serve distributional semantic models online
http://vectors.nlpl.eu/explore/embeddings/
GNU General Public License v3.0
197 stars 48 forks source link

Add config and data path to utils #56

Closed KarahanS closed 1 year ago

KarahanS commented 1 year ago

To adapt the necessary files' paths to our working directory, it would be helpful to establish constant variables that denote the paths for config and data.

akutuzov commented 1 year ago

Thanks, specifying the name of the config file in one place makes perfect sense!

But if you want to in addition define your own static data web directory, it will require reading this variable in many other locations (for example, it is used in all the html templates). Otherwise, changing it in the utils.py will break URLs. Are you sure you want to got this way?

Also, can you rename utils.py to, say, config_path.py so that it is immediately clear what this file serves for?

KarahanS commented 1 year ago

If I didn't get it wrong, you mean that creating a new data folder might make our work a lot harder since it is referenced by the same relative path more than once in the html files. So, removing the DATA constant from the file and just using /data/ as it is, is a better idea to avoid further hussle. Then I simply remove that constant. For the second point, you are right, let me change it as config_path.py.

akutuzov commented 1 year ago

Thanks a lot!