Word graph
Word graph is a local graph, which has a selected word in center and top-N words around, most commonly used in articles with selected word. Each node is provided with at least one link leading to appropriate article tab with article-wide graph and ability to request access to this article.
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d48256c4c7a08b69707_AD_4nXcS0h3qLhajummzv5saKHNBTibD5Es2ejO9Hoz9_HslfZf-i1KBzyfYlKSdv0JpP4wKu8ej7SYPhOTWUPYV_ccUWKCCMJifyiJ1qcvnqoioiUOXt_e0ZsaewHN-edv0h3cfAwM5Q-GcJe7rSDv1YEM7m0Q.png)
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d485fe168102306599c_AD_4nXcMThAz5sJwLh8ti7VUwkSIqIueMiXa0Oe9BBvqYu3OZkRH3oL6fwc4EqEd68m6EirQWA6WqjUvDvqVvGvS8fzrapRonRdJzsqrGVFmpzYa6HDLyojn94itKIRPMOs4mraHix_cH4oU6qeEHoIxEXzq0BtC.png)
To compute word graph, we search for most connected words for a given word. Here is the code implementation:
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d485fad6cb7699f5910_AD_4nXcCel-yNgi5XGBwauQ8zz9ctu_JETuO_AsHTNeAv4zQAXrDCsab9tozgvqmBaNY-bKH2OYJjxsPH3hHG1IZGL3noeRf7KZlBAgUbdOe-SK1rcjybGxN9qyTV_B5ilrlaYwCSOC4pVequnTGHF-g3dsVqpJI.png)
Edges conflicts
In cases, when links in edges conflict with each other, like “[Alcohol] enhances [organism]” and “[Alcohol] is harmful for [organism]”, according to 2 different articles, we can mark it with different colors in order to make graph more representative and involve users into research process.
Here are 2 good approaches:
VADER (NLP method)
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d480fc945bf27b5284f_AD_4nXdhbedHv0PUl86-P6e28YkMzDAR2NDKshZZSaaoanbHbU9i5jS2n5d1C8_xUP0MPuQtuDLbT2zCIWdWo2bguYR9mbdG4wC3IdCiPBWK4JS5D24sdhDqECWFcH0NnghPPoyikpL4u98_a4RW2Hhrx0vYaaH1.png)
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d4881b563b2d256709b_AD_4nXfiNU440usmLvqmnnSzEJKwiJhEzqjzx_0YKra17lJWY2ojWEyqTQkrnPnHb5LftrLOJMMVIFCbj7vdrmC3qd70baeFcnIIsK0Fjw9QnC-2o3PqPLMEshxgnUXEQI9rpNPOCSr8vss-ZrUlwlTzIBCMEo5d.png)
Pros: instant speed
Cons: not accurate
HuggingFace Transformers
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d48ca8e1263842bb544_AD_4nXdL5N_D6ENKPDvr7CbJPWOxdkdPDr_WPEe8uNukzVgCt9hUtLrLy-A0ghdDrqcg3iQ2WhbhdWnb-B9emR-rJ-vCvFrW-BnyJEutSkSsU6tyXLxVJVjRYIABFFh_QQLnPRU6IMq3mDan2qUgEMw9YgAZFg.png)
![](https://cdn.prod.website-files.com/655a09c01f4650d9c5cdd409/667d7d485fe168102306599f_AD_4nXfmRrm7fAJIQIOeJO5xLiMgbWQtei219zvuaEj3IKPQV6eAVRUJ9UWwtCEfIn6Br_4uh1RaouLdqmvdAG6qrkO3znHUIn56nzDfaU7PZ_uTllW-bGHiyXtxJZDQbWa-snUekmi-W2rMvrje4QUSDfRTmBU.png)
Pros: accurate
Cons: not fast (5+ seconds), uses 200MB Transformers model