0
A
回答
0
使用你可以購買他們的圈子中的一個Javascript組件:http://carrotsearch.com/circles-overview
1
的mbostock/d3 gallery有Carrot2輸出良好的視覺效果。
This carrot2-rb Carrot2的ruby客戶端返回一個帶有簇數組的對象。分數和短語屬性可以在簡單的圓環圖中使用。
像flare.json這樣的樹狀結構可以實現更多動態可視化,例如可擴展樹形圖。
這是根據Carrot2結果的zoomable wheel。
這是我寫的使用文檔元素創建flare.json的咖啡代碼。
clusters = [{"id":0,"size":3,"phrases":["Coupon"],"score":0.06441151442396735,"documents":["0","1","2"],"attributes":{"score":0.06441151442396735}},{"id":1,"size":2,"phrases":["Exclusive"],"score":0.7044284368639101,"documents":["0","1"],"attributes":{"score":0.7044284368639101}},{"id":2,"size":1,"phrases":["Other Topics"],"score":0.0,"documents":["3"],"attributes":{"other-topics":true,"score":0.0}}]
flare = get_flare clusters
get_children = (index, index2, clusters, documents) ->unless index == (clusters.length - 1) # If not last cluster
orphans = {'name': ''}
intr = _.intersection(documents, clusters[index2].documents);
if intr.length > 0 # continue drilling
if index2 < (clusters.length - 1) # Up until last element.
# Get next layer of orphans
orphan_docs = _.difference(intr, clusters[index2 + 1].documents)
if orphan_docs.length > 0
orphans = {'name': orphan_docs, 'size': orphan_docs.length}
if _.intersection(intr, clusters[index2 + 1].documents).length > 0
return [orphans, {'name': clusters[index2+1].phrases[0], 'children': get_children(index, (index2 + 1), clusters, intr)}]
else
return [orphans]
else
# At second to last cluster, so terminate here
return [{'name': inter}]
else # No intersection, so return bundle of current documents.
return [{'name': documents}]
return [{'name': _.intersection(clusters[index].documents, clusters[index2].documents)}]
get_flare = (clusters) ->
# Make root object
flare =
name: "root"
children: []
children = flare.children
_.each(clusters[0..(clusters.length - 2)], (cluster, index) -> # All clusters but the last. (It has already been compared to previous ones)
#All documents for all remaining clusters in array
remaining_documents = _.flatten(_.map clusters[(index + 1)..clusters.length], (c) ->
c.documents
)
root_child = {'name': cluster.phrases[0], 'children': []}
# Get first layer of orphans
orphan_docs = _.difference(cluster.documents, remaining_documents)
if orphan_docs.length > 0
root_child.children.push {'name': orphan_docs, size: orphan_docs.length}
for index2 in [(index + 1)..(clusters.length - 1)] by 1
if _.intersection(cluster.documents, clusters[index2].documents).length > 0
root_child.children.push {'name': clusters[index2].phrases[0], 'children': get_children(index, (index2), clusters, cluster.documents)}
children.push root_child
)
flare
相關問題
- 1. Solr ClusteringComponent Carrot2:ClassNotFoundException
- 2. Solr/Carrot2 API示例
- 3. 的Solr/Carrot2集成
- 4. carrot2 api不支持日語
- 5. 顯示carrot2集羣內容
- 6. carrot2和Solr本地索引
- 7. Carrot2 dcs php示例類修改
- 8. 如何增加Carrot2的Java堆大小?
- 9. Carrot2 3.9.4升級到Lucene的4.7+
- 10. 在哪裏可以找到Carrot2 C#API?
- 11. 沒有找到結果插件carrot2 + elasticsearch
- 12. 在Carrot2中比較聚類結果
- 13. Solr3.2 Carrot2除了「其他主題」聚類
- 14. 第一次使用Carrot2問題
- 15. 使用Apache Solr和Carrot2進行羣集
- 16. Carrot2集羣上的多個參數
- 17. 圓角圖像
- 18. 橢圓繪圖
- 19. CSS3圓環圖
- 20. 圓形圖像?
- 21. OpenGL圓形繪圖變橢圓
- 22. Android的圓形邊框圓形圖像
- 23. 圓形圖像視圖
- 24. Android的圓環圖
- 25. Javascript圓角圖像
- 26. GMS圓形圖標
- 27. LibGDX ShapeRenderer圓形圖
- 28. Gnuplot同心圓圖
- 29. 圖像的圓角
- 30. Openlayer地圖圓角