New in Wolfram
Mathematica
8: Graph & Network Modeling
◄
previous

next
►
Application Areas
Build Semantic Networks
Building a twostep synonym graph for computation with word semantics in
Mathematica
8.
In[1]:=
X
edges = Flatten[ Rest[NestList[ Union[Flatten[ Thread[# > WordData[#, "Synonyms", "List"]] & /@ Last /@ #]] &, {"" > "network"}, 2]]];
In[2]:=
X
style = {VertexLabels > "Name", ImagePadding > 25, ImageSize > 500, GraphStyle > "ThickEdge", EdgeStyle > Directive[Opacity[0.3], Thickness[0.015], Hue[0.12, 1, .7]]};
In[3]:=
X
Graph[edges, style]
Out[3]=