Much better!Now, this code is part of Roassal. On the other hand, we have the Moose-Algos-InformationRetrieval package that contains most utilities you need for this:- stopwords, and- stemmer (which you do not have right now)I think that it should be worth considering an architectural change in which Roassal gets to depend and use Moose-Algos more intensively. What do you think?Doru_______________________________________________On Sat, Jul 12, 2014 at 9:54 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Here our post on:========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 dictionary: (RTSourceCodeDictionary new).
| b |
b := RTNameCloud 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!<Screen Shot 2014-07-12 at 9.52.14 AM.png>Cheers,AlexandreHi,<Screen Shot 2014-07-11 at 2.10.43 PM.png>
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.58 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.21.08 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:
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--"Every thing has its own flow"
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev