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 [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 <[hidden email]> wrote:
"Every thing has its own flow"
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Here our post on: ======== - 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 <[hidden email]> wrote: Hi, -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 <[hidden email]> wrote:
"Every thing has its own flow"
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yes, it makes sense.
Probably some packages/builder should be move from Roassal into Moose. We can discuss about this at esug. Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Jul 14, 2014, at 12:38 AM, Tudor Girba <[hidden email]> wrote:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Excellent. Doru On Mon, Jul 14, 2014 at 6:56 PM, Alexandre Bergel <[hidden email]> wrote:
"Every thing has its own flow"
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |