What are the common practices to weight tags relations? I am working on a webapp (fullstack JS) where the user create documents and attach tags to them. They also select a list of tags they are interested in and attach them to their profile.
I am not a math guy, but I did some NLP as hobbyist and learnt about latent semantic indexation: as I understand it, you create a table where you store each couple of words you parsed, and then add weight to each of these couple of words when both are found next to each other.
I was thinking of doing the same thing with tags: when 2 tags appear on the same document or profile, I increase the weight of their couple. That would allow me to get a ranking of the "closest" tags of a given one.
Then I remembered that I came across web graphs, where websites were represented in a 2D space (x and y coordinates) and placed depending on their links using an algorithm called force vector.
While I do know how I would implement my first idea, I am not sure about the second one. How do I spread the tag coordinates when created? Do they all have an x:0, y:0 at the start? 
Since I assume this is a common case of data sorting, I wondered what would be the common/best practices recommended by people of the field.
Is there documents, articles, libraries (npm?) or wikipedia pages you could point me out to help me understand what can or should ideally be done? Is my first option a good one by default?
Also, please let me know in comments if I should add or remove a tag to this question or edit its title: I'm not even sure of how to categorize it.
 A: Based on your description my best guess is that you looking for a recommender system. You can model that by treating documents as "users" and tags as "items". Then you may have e.g. such a table where a certain document "likes" certain tags.
document id | tags                  | 
d1          | music, bach           |
d2          | programming, r        |
d3          | programming, python   |

This can be converted to an implicit preference matrix
document id | music | bach | programming | r | python | 
d1          | 1     | 1    | 0           | 0 | 0      |
d2          | 0     | 0    | 1           | 1 | 0      |
d3          | 0     | 0    | 1           | 0 | 1      |

or to a graph (like your approach), where ...


*

*every node is a tag and the weight of the node is the number of times this tag has occurred

*a connection between two nodes / tags exist, if these tags co-occurred at least once in a document. So the weight is the number of times of co-occurence


Now you can use the Jaccard index as similarity metric.
similarity | music | bach | programming | r   | python | 
music      | 1     | 1    | 0           | 0   | 0      |      
bach       | 1     | 1    | 0           | 0   | 0      |
programming| 0     | 0    | 1           | 0.5 | 0.5    |
r          | 0     | 0    | 0.5         | 1   | 0      |
python     | 0     | 0    | 0.5         | 0   | 1      |   

This is a very simple example of course.
For a selected tag, the recommended tags are the most similar by these scores.
Starting here, you can dive deep into item-based collaborative filtering (good for starters) and in (tag) recommender systems in general, depending on how you want to extend the system. For example, if you treat users as users and the tags in their profile as "items", you can apply all the standard methods to recommend new tags (for implicit preferences, i.e. 0 and 1 instead of ratings). Since user generated tags form a so called folksonomy and that in combination with recommender systems is a well known research area, you will find additional methods there.
If you are looking for an less mathy intro to the area of recommender systems (and machine learning in general), I can recommend Programming Collective Intelligence by Toby Segaran (but: it does not cover folksonomies and there might be newer / better books for beginners)
