w1 = cc("king, queen, man, woman")
plot_similarity(demodata, w1)
plot_similarity(demodata, w1,
value.color="grey",
value.percent=TRUE)
plot_similarity(demodata, w1,
value.color="grey",
order="hclust",
hclust.n=2)
plot_similarity(
demodata,
words1=cc("man, woman, king, queen"),
words2=cc("he, she, boy, girl, father, mother"),
value.color="grey20"
)
w2 = cc("China, Chinese,
Japan, Japanese,
Korea, Korean,
man, woman, boy, girl,
good, bad, positive, negative")
plot_similarity(demodata, w2,
order="hclust",
hclust.n=3)
plot_similarity(demodata, w2,
order="hclust",
hclust.n=7,
file="plot.png")
unlink("plot.png") # delete file for code check
Run the code above in your browser using DataLab