Transform any text into a semantic network with Nocodefunctions App (in just 4 steps)
Dr. Veronica Espinoza, 2023 / ✔Twitter @Verukita1 ✔LinkedIn Dra. Verónica Espinoza
Semantic networks, map relationships between concepts and allow us to extract meaning from text based on the co-occurrence of concepts [1].
A semantic network is made up of words that are linked to other words. These links are created when words frequently appear side by side in a collection of documents. Semantic network maps can reveal the ways in which certain ideas are more central or the ways in which some ideas are grouped together with others [1].
¿What is Nocodefunction App?
Nocodefunctions is a free, no-registration web app for click-and-point data analysis. The long-term objective with nocodefunctions is to provide a free, user friendly, robust web app helping a variety of audiences to use common (but sophisticated) data analysis functions, offered in their best-in-class versions [2, 3].
Nocodefunctions was developed by Clément Levallois, a professor based in Paris, with a passion for extracting information from social media and networks. He has published studies in academic journals.
Learn more about all the features of this tool in this story I wrote:
Nocodefunctions App: Transform text into networks.
The function identifies pairs of terms in each line of the text. These pairs are called co-occurrences. Aggregating all pairs of terms and selecting the most frequent ones, a network of terms is constructed where any two terms are connected if they often appear together in the text [4].
Model description.
The principles followed by the tool are described in this academic publication studying how to find communities and topics on Twitter [5]. The technology follows these steps:
- Cleaning of the text: flatten to ASCII, removal of urls, removal of punctuation signs.
- Lemmatization.
- Decomposition of the text in n-grams up to four-grams, removal of less relevant n-grams. This step is identical to the one followed by the function for sentiment analysis [6].
- Count of co-occurrences: which pairs of n-grams tend to appear frequently in the same lines of the text.
- The list of cooccurring n-grams is used to create a network: it is made of the most frequent n-grams. Two n-grams are connected if they are frequently cooccurring.
- The strength of the connections in the network is corrected using a procedure called Pointwise Mutual Information (PMI) [7].
Find all the functions offered by the Nocodefunctions App in this story I wrote on Medium [8].
What will we learn in this tutorial?
In this tutorial, we will learn how to transform a text into a semantic network using the Nocodefunctions App in just 4 easy steps.
For this exercise, I will transform the open access book: Methods and applications in social networks analysis [9] into a semantic network.
I share the link to this wonderful book in case you want to do the same exercise (I also recommend this book so you can have a look at its interesting content!) [link]
The following illustration shows the general steps what will we do to transform a text into a semantic network with Nocodefunctions App.
🏁Let´s start!
STEP 1. Open Free tool to turn your texts into semantic graphs.
Open the function Free tool to turn your texts into semantic graphs [link].
You will see 3 different ways to upload your files.
- Plain text (text or PDF file).
- Structured text in columns or tables (csv or Excel files).
- Search and import tweets.
In this tutorial we will use the option 1: Plain text (text or PDF file). Click on this option.
STEP 2. Upload your data.
Click open your file, choose your file and upload it (for this example, I will upload the PDF book mentioned above). When your file has been uploaded successfully, the name of your file will appear in red color, as shown. Now, click Read the data in the file (s). After the blue bar is at 100%, click compute.
STEP 3. Adjust parameters.
Now, the following options will appear with which you will be able to make some adjustments.
First, choose the language of your text.
If you click on “if you need more parameters”, you will find several options with which you can refine your analysis. For example, you can adjust the following parameters:
· Minimum word length
· Length of ngrams
· Stop words from the academic discourse
· Use your own stop words
*If you make any adjustment with these parameters click “confirm your option”, otherwise you can leave the default parameters.
Click compute.
STEP 4. Visualize in Gephi, Gephi-Lite or VOSviewer.
The following screen will appear and you will be able to visualize your network in a) Gephi, b) Gephi-Lite or c) VOSviewer, as shown [10–12].
Below is an example of the visualizations generated with each of the three mentioned tools.
a) Gephi visualization
Data source: Methods and applications in social networks analysis. Force Atlas2 Layout. Nodes partition by modularity class. Nodes ranking by degree.
Learn here more about Gephi in this story I wrote!
b) Geph-Lite visualization
Data source: Methods and applications in social networks analysis. Force Atlas2 Layout. Nodes partition by modularity class. Nodes ranking by count terms
Learn here more about Gephi-Lite in this story I wrote!
c) VOSviewer visualization
Data source: Methods and applications in social networks analysis. Ling/log modularity. Node sizes by count terms.
💡Suggestions
With Nocodefuctions App you can also generate semantic networks from other types of text, for example: scientific articles, academic theses, book chapters, transcripts of qualitative interviews, tweets, comments from social networks and much more. You just need to have the text in one of the formats we reviewed in Step 1.
💥Recommended reading: Turn a list of sources and their targets into a network with Nocodefunctions App (and visualize it in Gephi)
👍Thanks for reading
😉I hope this tool is useful for your research!
💙This is my Twitter
REFERENCES
- Shneiderman B, Hansen D, andMarc Smith IH. Analyzing Social Media Networks with NodeXL. 2020.
- Explore your data at a click [Internet]. Nocode functions. [cited Nov 9, 2022]. Available in: https://nocodefunctions.com/
- blog N functions-. Nocode functions is one year old! [Internet]. [cited 2023 Jan 6]. Available from: https://nocodefunctions.com/blog/nocodefunctions-is-one-year-old/
- Tool to generate semantic networks, free and online. Turn texts into graphs. [Internet]. Nocode functions. [cited 2023 Jan 11]. Available from: https://nocodefunctions.com/cowo/semantic_networks_tool.html
- Benabdelkrim M, Levallois C, Savinien J, Robardet C. Opening Fields: A Methodological Contribution to the Identification of Heterogeneous Actors in Unbounded Relational Orders. M@n@gement. 2020 Mar 31;4–18.
- Free sentiment analysis tool for social media in English, French and Spanish [Internet]. Nocode functions. [cited 2023 Jan 11]. Available from: https://nocodefunctions.com/
- blog N functions-. Pointwise mutual information and tf idf, when to use them [Internet]. [cited 2023 Jan 11]. Available from: https://nocodefunctions.com/blog/pmi-tf-idf/
- Espinoza V. Nocode functions tool: explore your data at a click! [Internet]. Medium. 2023 [cited 2023 Jan 5]. Available from: https://medium.com/@vespinozag/nocode-functions-tool-explore-your-data-at-a-click-200389e99b61
- Giordano G, Restaino ML, Salvini A. Methods and applications in social networks analysis: Evidence from Collaborative, Governance, Historical and Mobility Networks. FrancoAngeli; 2021.
- Bastian M., Heymann S., Jacomy M. (2009). Gephi: an open source software for exploring and manipulating networks. International AAAI Conference on Weblogs and Social Media.
- Lab PD. Make a deal with Gephisto [Internet]. Public Data Lab. 2022 [cited 2022 Nov 29]. Available from: https://publicdatalab.org/
- VOSviewer — Visualizing scientific landscapes [Internet]. VOSviewer. [cited 2023 Jan 11]. Available from: https://www.vosviewer.com//