Hi,
Nice. However, in order to be more useful I think we should address at least these two points: - a name cloud is typically useful as a grouping of entities. Thus, we should not just add strings, but we should add objects and ways to obtain a textual representation from them. Then, the model behind each label should be provided by all objects that contain that label. - the tags should be aligned as text, not on top. I know it is less comfortable to do this in Roassal, but I think otherwise it looks less nice :). Or maybe we use another kind of layout, such as a rectangle packing one?
Cheers, Doru
On Fri, Jul 11, 2014 at 2:27 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
I have added a name cloud builder in Roassal. Maybe some of you will find it useful It is very primitive and does do much, but it does the primitive things :-)
Here is an example:
RTNameCloud new addString: 'open
| v shape | v := RTView new. shape := RTLabel new height: [ :assoc | assoc value ]; text: #key. v addAll: (shape elementsOn: table associations). RTFlowLayout on: v elements. v open'; open =-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-=
It produces:
A slightly more complicated example:
| b | b := RTNameCloud new. b addStrings: (RTNameCloud methods collect: #getSource). b open =-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-=
produces:
We did this name cloud builder because we had a need to process text extracted from StackExchange. We added a dictionary containing words that are not interesting. For example: =-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-= | b | b := RTNameCloud new. b minHeight: 20. b maxHeight: 30. b addString: 'I am not that tall but I speak many languages. But I have tall legs and big feet'. b open =-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-=
It produces:
Words such as ‘I’, ‘not’, ‘that’, ‘but’ are not shown.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev