Hi guys,
For those working in information retrieval, for example for doing td-idf
ranking, you can find adapted packages: "Hapax" and "CodeFu" in the
BioSmalltalk repository http://ss3.gemstone.com/ss/BioSmalltalk.html . I
have translated some VW specific code to Pharo 1.4 (under Windows
requires the ProcessWrapper package) and adapted some Hapax methods to
work with corpus in different languages.
This is an example script for a corpus in Spanish:
| corpus tdm documents |
corpus := HXSpanishCorpus new.
documents := 'el río Danubio pasa por Viena, su color es azul
el caudal de un río asciende en Invierno
el río Rhin y el río Danubio tienen mucho caudal
si un río es navegable, es porque tiene mucho caudal'.
documents lines doWithIndex: [: doc : index |
corpus
addDocument: index asString
with: (Terms new
addString: doc
using: CamelcaseScanner;
yourself)].
corpus removeStopwords.
corpus stemAll.
tdm := TermDocumentMatrix on: corpus.
Feel free to integrate to any repository. If you want to add a language
just see methods with selectors including "spanish".
Cheers,
Hernán
Hello,
I'm Tommaso Dal Sasso, PhD student in Lugano.
I was talking with Stef at ESUG two weeks ago, and since I am working with bug reports and bug tracking systems, he suggested me to look at the bug report model in Moose.
Can anybody tell me where to find information about that?
Since I'm planning a visit in Lille, I was also suggested to ask here to find the appropriate date (I hope this mailing list is the right place).
Which period would be more suitable? I think that the best would be near a Pharo Sprint.
Thank you!
Tommaso
See <https://ci.inria.fr/moose/job/moose-latest-dev-4.8/1200/>
------------------------------------------
Started by upstream project "graph-et" build number 41
originally caused by:
[URLTrigger] A change within the response URL invocation (log)
Building remotely on moose-ubuntu1204-dualproc-i386 in workspace <https://ci.inria.fr/moose/job/moose-latest-dev-4.8/ws/>
Deleting project workspace... done
[moose-latest-dev-4.8] $ /bin/sh -xe /tmp/hudson8177218792157239676.sh
+ wget --quiet -O - http://get.pharo.org/20+vmLatest
+ bash
Downloading the latest 20 Image:
http://files.pharo.org/image/20/latest.zip
Pharo.image
Downloading the latest pharoVM:
http://files.pharo.org/vm/pharo/linux/latest.zip
pharo-vm/pharo
Downloading PharoV10.sources:
http://files.pharo.org/sources//PharoV10.sources.zip
Downloading PharoV20.sources:
http://files.pharo.org/sources//PharoV20.sources.zip
Creating starter scripts pharo and pharo-ui
+ ./pharo Pharo.image save moose-latest-dev-4.8
+ REPO=http://www.smalltalkhub.com/mc/Moose/Moose/main
+ ./pharo moose-latest-dev-4.8.image config http://www.smalltalkhub.com/mc/Moose/Moose/main ConfigurationOfMoose --install=development
[31m[33m
===============================================================================
Notice: Installing ConfigurationOfMoose development
===============================================================================
[0m[0m[31m[33m
*** Warning: Warning: This package depends on the following classes:
StackDebugAction
RunToHereDebugAction
CreateMessageDebugAction
You must resolve these dependencies before you will be able to load these definitions:
ACDStackDebugAction
gtStackActionsFor:
appliesToContext:
defaultIcon
gtActionType
defaultIcon
gtACDReceiverActionTypeFor:
gtActionType
gtStackActionsFor:
[0m[0m+ ./pharo moose-latest-dev-4.8.image mooseimagesetup --signature=https://ci.inria.fr/moose/job/moose-latest-dev-4.8/1200/
+ ./pharo moose-latest-dev-4.8.image moosetest --junit-xml-output
[31m[33m
===============================================================================
Notice: Running tests in 140 Packages
===============================================================================
[0m[0m[31mError: index out of range
[0mTabSelectorMorph(Object)>>error:
TabSelectorMorph(Morph)>>privateAddAllMorphs:atIndex:
TabSelectorMorph(Morph)>>addAllMorphs:
TabSelectorMorph>>updateTabs
TabSelectorMorph>>extent:
TabSelectorMorph(Morph)>>bounds:
TabSelectorMorph(Morph)>>layoutInBounds:
TableLayout>>layoutLeftToRight:in:
TableLayout>>layout:in:
PanelMorph(Morph)>>doLayoutIn:
PanelMorph(Morph)>>fullBounds in Block: [self doLayoutIn: self layoutBounds]
BlockClosure>>on:do:
PanelMorph(Morph)>>fullBounds
LazyTabGroupMorph(Morph)>>submorphBounds in Block: [:m | | subBox | m visible...
Array(SequenceableCollection)>>do:
LazyTabGroupMorph(Morph)>>submorphBounds
LazyTabGroupMorph(Morph)>>privateFullBounds
LazyTabGroupMorph(Morph)>>doLayoutIn:
LazyTabGroupMorph(Morph)>>fullBounds in Block: [self doLayoutIn: self layoutBounds]
BlockClosure>>on:do:
LazyTabGroupMorph(Morph)>>fullBounds
LazyTabGroupMorph(Morph)>>layoutProportionallyIn:
ProportionalLayout>>layout:in: in Block: [:m | m layoutProportionallyIn: newBounds]
Array(SequenceableCollection)>>do:
PanelMorph(Morph)>>submorphsDo:
ProportionalLayout>>layout:in:
PanelMorph(Morph)>>doLayoutIn:
PanelMorph(Morph)>>fullBounds in Block: [self doLayoutIn: self layoutBounds]
BlockClosure>>on:do:
PanelMorph(Morph)>>fullBounds
[0mBuild step 'Execute shell' marked build as failure
Archiving artifacts
Recording test results
ERROR: Failed to archive test reports
hudson.util.IOException2: remote file operation failed: <https://ci.inria.fr/moose/job/moose-latest-dev-4.8/ws/> at hudson.remoting.Channel@4f7a95c6:moose-ubuntu1204-dualproc-i386
at hudson.FilePath.act(FilePath.java:905)
at hudson.FilePath.act(FilePath.java:882)
at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:87)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:121)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:133)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1628)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: hudson.util.IOException2: Failed to read <https://ci.inria.fr/moose/job/moose-latest-dev-4.8/ws/Glamour-Tests-Morphic…>
at hudson.tasks.junit.TestResult.parse(TestResult.java:291)
at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:230)
at hudson.tasks.junit.TestResult.parse(TestResult.java:165)
at hudson.tasks.junit.TestResult.parse(TestResult.java:148)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:124)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:117)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:90)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2417)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.dom4j.DocumentException: Error on line 107 of document file://<https://ci.inria.fr/moose/job/moose-latest-dev-4.8/ws/Glamour-Tests-Morphic…> : XML document structures must start and end within the same entity. Nested exception: XML document structures must start and end within the same entity.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:130)
at hudson.tasks.junit.TestResult.parse(TestResult.java:274)
... 16 more
Caused by: org.xml.sax.SAXParseException; systemId: file://<https://ci.inria.fr/moose/job/moose-latest-dev-4.8/ws/Glamour-Tests-Morphic…;> lineNumber: 107; columnNumber: 1; XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:391)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1404)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:882)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:582)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1370)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1740)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1393)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2769)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
... 19 more
Hi,
I am playing around with Roassal (in particular, a tree map) and I have a question: Is there a way to dynamically adding nodes? I mean, once the view is generated to update the #nodes by adding a new node (and associations as well, i.e., edges) and have the visualization re-
At the moment I managed to have something *almost* working, but the behavior of the ROTreeMapLayout is not clear to me.
Using the ROMondrianViewBuilder I can specify the size of the Tree map, but then I am not able to dynamically add nodes. Well, at least I did not manage to do that. So I moved to pure Roassal, as suggested by Alejandro.
Here's how my actual code looks like: http://ws.stfx.eu/CFM522Z9X3ES
I am a beginner with Roassal, so I spend some time to figure out how to draw the tree map in this way. I did not really quite understand why I have to add the ROBox new size: 200 to the ROElement, but I'll figure it out.
The thing is when I try to add the new node. Following, again, Alejandro's advice I am writing something like:
"I add a new node, re-layout the view, and signalUpdate"
rawView add: ((ROElement on: 10) + (ROBox new size: 200)).
(ROTreeMapLayout withWeightBlock: [ :e | e model ]) applyOn: rawView elements.
rawView signalUpdate .
The result is quite strange, the view is indeed updated but I cannot understand why all sizes are messed up.
I think that once I apply the layout, the "elements" array is actually changed (i.e., sizes, parents, resize strategy). Am I correct? is it the correct behavior?
My questions, in short are: How can I fix the overall size of the tree map? Am I doing everything correct till now?
Thanks again for your help,
Roby
Hi
I was following an exercise written by alex and the following code does not work
| superclassEdges |
luModel := (MooseModel allInstances last).
luClasses := luModel allModelClasses.
view shape rectangle size: [ :cls | cls queryAllOutgoingInvocations size ].
view nodes: luClasses.
superclassEdges := view edgesFrom: #superclass.
view treeLayout userDefinedEdges: superclassEdges.
view shape line color: Color red.
view edges: luClasses from: #yourself toAll:
[ :cls | cls queryAllOutgoingInvocations atClassScope ]
edgesFrom: raises an error several candidates.
and I do not understand why.
Stef
something ugly like
org (namespapce) :: apache (namespace)….
when inspecting class and namespace.
So I do not get really the logic to have namespace written in between.
Stef