At the moment, InfraNodus API is provided in test mode to Premium users who have an active account (not in trial), if you'd like to use it in production, please, contact us to set up your account.
You can currently access the underlying graph structure with all the stats and concept relations, including the structural gaps, as well as the original statements with tags in JSON format.
The structure of the obtained JSON object will have the following properties :
"entriesAndGraphOfContext": {
"statements": [
[
{
"id": 1,
"content": "Some content",
"contextId": 1,
"categories": [],
"createdAt": "2024-04-19T10:47:33.528Z",
"sordId": 1,
"statementHashtags": [
"content",
],
"statementCommunities": [
"1", // what topical cluster each concept belongs to
],
"topStatementCommunity": "1" // most common (median) value from "statementCommunities"
"topStatementOfCommynity": "1" // taken from graph.graphologyGraph.topClusters.community["1"].topStatementId - which means that this statement appears most frequently in the list of the statements that belong to a community
},
]
"graph": {
graphologyGraph {
attributes: {
"nodes_to_statements_map": { // maps nodeName to statementId where it appears
"infranodus": [
107145146
],
}
"modularity": 0, // community structure modularity score
"top_nodes": [
"infranodus",
"tool"
],
"top_clusters": [
{
"community": "0",
"nodes": [
{
"nodeName": "infranodus",
"degree": 1,
"bc": 0,
"x": -7.081424236297607,
"y": 4.571528401768881e-16
}
],
"number": 2, // nodes inside the community cluster
"numberRatio": 1,
"bcRatio": 0.2, // cumulative betweenness centrality score for the cluster
"averagePosition": { // cluster position
"x": 0,
"y": 2.354271166867184e-17
}
"statementIds": [ // statementIds inside this community cluster
107145146,
107145146
],
"topStatementId": 107145146 // most relevant statement for this community cluster
}
],
"gaps": [] // gaps between clusters with additional information
}, // end of attributes
options: {
"allowSelfLoops": true,
"multi": false
"type": "undirected"
}
"nodes": [
{
"label": "infranodus",
"id": "ab9245a5-5e98-59e2-ad79-c82bd0ea2287",
"weighedDegree": 3,
"degree": 1,
"bc": 0, // betweenness centrality
"community": 0, // the topic the node belongs to
"x": -7.081424236297607, // position on a 2D plane
"y": 4.571528401768881e-16
}
],
"edges": [
{
"source": "ab9245a5-5e98-59e2-ad79-c82bd0ea2287",
"target": "b5a3c19e-66bf-59a9-b4d3-37b1c2cdc351",
"id": "15e49fb4-02d1-5dba-88ff-e8d8e5da0407",
"weight": 3,
"context_matrix": { // which graphs contain this statement
"sample_graph": { // the name of the graph
"107145146": 3
}
]
} // end of graphologyGraph
"statementHashtags": { // concepts found in each statement — careful, may reveal your content
"107145146": [
"#infranodus",
"#tool"
]
}
} // end of graph
} // end of entriesAndGraph
A few notes on how parameters in the topical clusters (`top_clusters`) are calculated:
- `top_clusters[0].numberRatio` — The number of nodes in a cluster to the total number of nodes. Shows the relative weight of a topic in terms of linguistic variety — e.g. if a rich vocabulary consisting of multiple words is used in the topic OR if the topic contains many words, this parameter will be higher.
- `top_clusters[0].bcRatio` — Cumulative betweenness centrality (influence) measures the relative influence of the topic to the total cumulative influence of all the concepts that appear in the graph. The higher the measure, the more influential terms this topical cluster contains.
- `top_clusters[0].statementIds` — Each topical cluster contains a set of concepts. Each of these concepts may appear in several statements. This parameter will show all the statements that contain at least one concept from the topical cluster. All the statements listed here will touch on this topical cluster at least in some way.
- `top_clusters[0].topStatementId` — one of these statements from the `statementIds` will appear most frequently in the list (highest frequency of occurrence). This means that one statement has a particularly high concentration of concepts that belong to a particular topic. This statement will be designated as the top statement for this particular topic. In other words, if we select this cluster on the graph, this particular statement will cover more of its nodes and edges than any other statement.
How the parameters in `statements` are calculated:
- `statementCommunities` — Each word in a statement belongs to a certain topical cluster. This parameter lists all the clusters for all the concepts that appear in the community.
- `topStatementCommunity` — What is the most common topical cluster for most words that appear in this statement (e.g. if we look at this statement in the graph, what is the topical cluster it will cover the most of its nodes and edges)
- `topStatementOfCommunity` — when we take a cluster and see what's the most common statement ID that occurs in the list of `statementIds` (saved in the `topStatementId` parameter) — we will then assign the community id of that cluster to that statement. This is how this parameter is formed. (e.g. if we select this topical cluster on the graph, this particular statement will cover most of its nodes and edges)
Comments
0 comments
Please sign in to leave a comment.