public class Graph extends Object implements Serializable
Constructor and Description |
---|
Graph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(String source,
String target,
double wSource,
double wTarget,
int creator)
Adds a new edge to the main knowledge graph
|
void |
createSenticNetWordNetRelations()
Creates the relations between SenticNet and WordNet.
|
ArrayList<Long> |
getFeatureIds(String label) |
HashMap<Long,String> |
getIds() |
HashMap<String,Long> |
getLabels() |
HashMap<Long,ArrayList<DomainEdge>> |
getNodes() |
int |
getNumberOfEdges() |
int |
getNumberOfNodes() |
HashMap<String,ArrayList<Long>> |
getWnWordSynsets() |
void |
printGraphStatistics()
Prints some statistics about the graph
|
void |
setLabels(HashMap<String,Long> labels) |
void |
setNodes(HashMap<Long,ArrayList<DomainEdge>> nodes) |
void |
setWnWordSynsets(HashMap<String,ArrayList<Long>> wnWordSynsets) |
public HashMap<Long,ArrayList<DomainEdge>> getNodes()
public void setNodes(HashMap<Long,ArrayList<DomainEdge>> nodes)
public void addEdge(String source, String target, double wSource, double wTarget, int creator)
source
- the label of the source concepttarget
- the label of the target conceptwSource
- the weight of the edge target->sourcewTarget
- the weight of the edge source->targetpublic void createSenticNetWordNetRelations()
public int getNumberOfNodes()
public int getNumberOfEdges()
public void printGraphStatistics()
Copyright © 2016–2020 FBK. All rights reserved.