Divisi on windows

54 views
Skip to first unread message

akshay bhat

unread,
May 27, 2009, 4:00:07 AM5/27/09
to conceptn...@googlegroups.com
after removing the timer function (Thanks to joanna) and the htol and ltoh functions used for reading and writing files ( inherited from netinet/in.h)
I was able to install the divisi on windows.
here is the svdlib folder with changed files.

Following are results obtained using procedure given on 

pprint(concept_similarity(svd, 'teach').top_items(10))
[(u'learn', 55.923558381831668),
 (u'read', 27.106824022402613),
 (u'entertain', 24.909842395289772),
 (u'fun', 23.111719065188147),
 (u'studi', 22.318986520677612),
 (u'sex', 18.999290174353689),
 (u'book read', 18.88967866588116),
 (u'think', 18.804224384630206),
 (u'relax', 12.69690358217273),
 (u'play', 12.600731513124815)]
 
To install divisi on windows download the divisi from 
 and replace the svdlib folder with the one attached with this post
Please report any bugs
--
Akshay Uday Bhat.
c.e.f.y.
department of chemical engineering
university institute of chemical technology

Profile:  http://www.google.com/profiles/akshayubhat.
mumbai India

“One has the ability and privilege to do one’s respective duty, but has no control over the
results. The fruits of work should not be the motive, for they shall follow one’s actions”
Bhagvad Gita, (2.47)
svdlib.zip

Farnush

unread,
Jun 2, 2009, 7:49:26 AM6/2/09
to conceptnet-users
Hey Akshay I was wondering if you explain exactly how you setup the
divisi on your windows machine.

What version of python ?
What C compiler are you using ?
What modules did u install in cygwin ?
Did you use easy_install or ipython.
Which version of numpy did you install ?

I am having trouble installing it on my windows machine.
I am using cygwin but while trying to get it installed using
easy_install i get multiple errors regarding my gcc compiler not able
to understand some variables and undefined functions.
sorry to ask so many questions but I have been trying to install it
for the last one whole day and your input would be great.

On May 27, 9:00 am, akshay bhat <akshayub...@gmail.com> wrote:
> after removing the timer function (Thanks to joanna) and the htol and ltoh
> functions used for reading and writing files ( inherited from netinet/in.h)I
> was able to install the divisi on windows.
> here is the svdlib folder with changed files.
>
> Following are results obtained using procedure given onhttp://divisi.media.mit.edu/doc/intro.html
>
> pprint(concept_similarity(svd, 'teach').top_items(10))
> [(u'learn', 55.923558381831668),
>  (u'read', 27.106824022402613),
>  (u'entertain', 24.909842395289772),
>  (u'fun', 23.111719065188147),
>  (u'studi', 22.318986520677612),
>  (u'sex', 18.999290174353689),
>  (u'book read', 18.88967866588116),
>  (u'think', 18.804224384630206),
>  (u'relax', 12.69690358217273),
>  (u'play', 12.600731513124815)]
>
> To install divisi on windows download the divisi fromhttp://divisi.media.mit.edu/
>  and replace the svdlib folder with the one attached with this post
> Please report any bugs
> --
> Akshay Uday Bhat.
> c.e.f.y.
> department of chemical engineering
> university institute of chemical technology
>
> Profile:  http://www.google.com/profiles/akshayubhat.
> mumbai India
>
> “One has the ability and privilege to do one’s respective duty, but has no
> control over the
> results. The fruits of work should not be the motive, for they shall follow
> one’s actions”
> Bhagvad Gita, (2.47)
>
>  svdlib.zip
> 94KViewDownload

akshay bhat

unread,
Jun 2, 2009, 1:20:10 PM6/2/09
to conceptn...@googlegroups.com
On Tue, Jun 2, 2009 at 5:19 PM, Farnush <far...@gmail.com> wrote:

Hey Akshay I was wondering if you explain exactly how you setup the
divisi on your windows machine.

What version of python ?
2.4 

What C compiler are you using ?
GCC on pure windows (XP).
i have mingw compiler installed i guess, but i am not using cygwin  

What modules did u install in cygwin ?
NA 

Did you use easy_install or ipython.
i executed setup.py install command from command prompt.  
Which version of numpy did you install ?
I think it will automatically install latest numpy while installing divisi.
Few months ago i had tried using cygwin, however numpy does not works on cygwin.

Here is the windows installer.
To install extract and execute exe in folder dist
.
The version used is same as that available on the divisi website and not the latest bazzar branch.

 P.S.:
just for the information:
I created the installer using command setup.py bdist_wininst.
see run.bat

akshay bhat

unread,
Jun 2, 2009, 1:20:31 PM6/2/09
to conceptn...@googlegroups.com
sorry i use python 2.5 and not 2.4

Farnush

unread,
Jun 2, 2009, 1:41:24 PM6/2/09
to conceptnet-users
great thanks. I got to work with cygwin right now. I had problems with
the fortran compiler that numpy needed. Btw what are you using it
for.

I am doing my masters project on common sense computing and wanted to
work with concept net and able to access results remotely using a
webservice.

Thanks a lot for the help mate.


On Jun 2, 6:20 pm, akshay bhat <akshayub...@gmail.com> wrote:
> sorry i use python 2.5 and not 2.4
>
>
>
> On Tue, Jun 2, 2009 at 10:50 PM, akshay bhat <akshayub...@gmail.com> wrote:

Kenneth Arnold

unread,
Jun 2, 2009, 3:43:38 PM6/2/09
to conceptn...@googlegroups.com
How did you resolve your Fortran issues? (Divisi only depends on
numpy's Fortran components for SVDs of dense tensors, I think.)

Great to hear another masters project about common sense! Do keep us
(i.e, this list, or conce...@media.mit.edu if you don't want to
advertise) informed about your project.

btw, if you're just experimenting, you can play with our basic
REST-ish client. See the new API docs page
(http://groups.google.com/group/conceptnet-users/web/api-documentation?hl=en&msg=ns)
for a link to it. The functionality is limited to what has occurred to
us to expose; if you want something new, it's pretty easy to add. We
also fully support the sqlite dumps, which are really easy to get set
up. I recommend using the latest ConceptNet and divisi branches on
Launchpad if you can get bzr to work, because a lot of stuff is
fixed/improved since the last release.

-Ken

Farnush

unread,
Jun 3, 2009, 12:05:07 PM6/3/09
to conceptnet-users
Hey Kenneth and Akshay,
I have installed conceptnet and all its dependencies on Windows
(cygwin), Windows (native) and Ubuntu and been using the REST client
all day and found it a bit slow. Is it only because of the server or
is it because you are using sql-lite to store it?
Heres how I did it:
Software versions I installed

Windows(native install)

Divisi 0.5 ( Library for reasoning by analgy and association over
semantic networks )
-- install python 2.5.4 http://www.python.org/download/ and add
python to the path in environment variables
-- install easy_install ( setup tools - makes your life much
easier ) setuptools-0.6c9.win32-py2.5.exe (md5)
http://pypi.python.org/pypi/setuptools
-- install min32gw (Automated MinGW Installer MinGW 5.1.4) for a
proper GNU Compiler and add it to the path in environment variables
http://sourceforge.net/project/showfiles.php?group_id=2435
-- install numpy
command C:\easy_install numpy ( make sure you have a proper
fortran compiler that numpy requires )
-- install ipython ( optional )
-- download divisi 0.5 from http://divisi.media.mit.edu/dist/ and
change the svd folder with the one supplied by akshay in the first
post
and extract it and navigate to the folder containing setup.py and
type in
setup.py build -c mingw32 install
ConceptNet
-- install pystemmer 1.015
download pystemmer and extract it like and navigate to the folder
containing setup.py and type in
setup.py build -c mingw32 install
http://pypi.python.org/pypi/PyStemmer/1.0.1
--install conceptnet by typing in
easy_install conceptnet

Test test.py file to test if installation was all correct
Make sure you download sqlite.db of the database and the db_config
file .. make sure they are in the same folder
python test.py

if you get asserations, then you have successfully installed it .
............



Windows(Using cygwin)
1. install Cygwin with these options
-- autoconf
-- gcc compiler
-- gnu fortran compiler
-- libtool
-- make
-- python dev
-- python numpy 1.2
After installation great the group and user passwd as mentioned by
cygwin file

2. install easy_install ( setup tools - makes your life much
easier ) setuptools-0.6c9-py2.4.egg(md5)
sh setuptools-0.6c9-py2.4.egg
http://pypi.python.org/pypi/setuptools

3. install numpy
command C:\easy_install numpy ( make sure you have a proper
fortran compiler that numpy requires )
4. install ipython ( optional )
5. download divisi 0.5 from http://divisi.media.mit.edu/dist/
easy_install divisi

ConceptNet

--install conceptnet by typing in
easy_install conceptnet

and there you go now

Test test.py file to test if installation was all correct
Make sure you download sqlite.db of the database and the db_config
file .. make sure they are in the same folder
python test.py

if you get asserations, then you have successfully installed it .

test.py
----------------------------------------------------------------

from csc.conceptnet4.models import Concept
print '-----dog assertions -----'
dog = Concept.get('dog', 'en')
for fwd in dog.get_assertions_forward():
print fwd

---------------------------------------------------------------


On Jun 2, 8:43 pm, Kenneth Arnold <kenneth.arn...@gmail.com> wrote:
> How did you resolve your Fortran issues? (Divisi only depends on
> numpy's Fortran components for SVDs of dense tensors, I think.)
>
> Great to hear another masters project about common sense! Do keep us
> (i.e, this list, or concept...@media.mit.edu if you don't want to
> advertise) informed about your project.
>
> btw, if you're just experimenting, you can play with our basic
> REST-ish client. See the new API docs page
> (http://groups.google.com/group/conceptnet-users/web/api-documentation...)
> for a link to it. The functionality is limited to what has occurred to
> us to expose; if you want something new, it's pretty easy to add. We
> also fully support the sqlite dumps, which are really easy to get set
> up. I recommend using the latest ConceptNet and divisi branches on
> Launchpad if you can get bzr to work, because a lot of stuff is
> fixed/improved since the last release.
>
> -Ken
>

Kenneth Arnold

unread,
Jun 3, 2009, 12:18:31 PM6/3/09
to conceptn...@googlegroups.com
Very nice!

We've had some server issues this morning and are using it as an
excuse to go ahead and make some more drastic reconfigurations. So the
REST client, which talks to our servers, will probably be slow and may
in fact not work at all for a few moments this afternoon. Using your
sqlite database is unaffected. Sqlite isn't the fastest but its speed
is certainly respectable for a single user in our experience. (Our
main server is a hefty Postgres database.)

-Ken
Reply all
Reply to author
Forward
0 new messages