Here our post on:
https://upload.facebook.com/ObjectProfile/photos/a.341189379300999.82969.340543479365589/664029063683694/?type=1
========

Our long-time friend Tudor Gîrba (a.k.a "Doru") has reviewed our name cloud and made some suggestions. Here are the improvement for today:
  - a rectangle pack layout is instead used. You can naturally set your favorite layouts if you wish so
  - objects may be optionally kept behind each word. Kind useful when navigating
  - a dictionary may be specified to remove noise (two dictionaries are available: source code and english). If you want to see a dictionary for your own language, let us know!

Consider the example that shows all the code of Roassal:
-=-=--=-=-=--=-=-=--=
| b |
b := RTNameCloud new. 
b dictionary: (RTSourceCodeDictionary new).
RTObject withAllSubclasses do: [ :c | 
b addObjects: c methods description: #getSource ].
b open
-=-=--=-=-=--=-=-=--=
By setting the dictionary, words such as "self", "ifTrue:", "ifFalse:" will not appear.

Thanks Doru for your review! It was useful!


Cheers,
Alexandre


On Jul 11, 2014, at 10:22 PM, Tudor Girba <tudor@tudorgirba.com> wrote:

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:

<Screen Shot 2014-07-11 at 2.10.43 PM.png>

A slightly more complicated example:
=-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-=
| b |
b := RTNameCloud new.
b addStrings: (RTNameCloud methods collect: #getSource).
b open
=-=-=-=-==-=-=-=-==-=-=-=-==-=-=-=-=


produces:

<Screen Shot 2014-07-11 at 2.10.58 PM.png>

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:
<Screen Shot 2014-07-11 at 2.21.08 PM.png>

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




-- 
www.tudorgirba.com

"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.