 |
|
 |
I have installed IronPython and I already referenced the dll but I can see that some of it is not resolved correctly. You can see the below error message. i.e. IronPython.Runtime.Calls the calls are not resolved uner IronPython.Runtime.
Error 3 The type or namespace name
your reply is really appreciated Thanks.
A.Sabry
|
|
|
|
 |
|
 |
What version of IronPython did you download? This article only works the specific ones listed.
- Sent from DroidX
|
|
|
|
 |
|
 |
Thank you for your reply.
The problem is now solved by using
http://ironpython.codeplex.com/releases/view/11275[^]
However, I have another problem that showed up right now. As I am getting the following error message.
Error 2 'Tuple' is an ambiguous reference between 'System.Tuple' and 'IronPython.Runtime.Tuple' C:\Documents and Settings\ahmed\Desktop\Thesis\implementation\ProofOfConcept\ConceptNet2\cnu2_src\CNU\CNUtils2Demo\CNUtils2Demo\Form1.cs 345 13 CNUtils2Demo
Which Tuple did you use? the System.Tuple or IronPython.Runtime.Tuple?
Your reply is highly appreciated.
Thanks,
A.Sabry
|
|
|
|
 |
|
 |
Reading more in the code documentation I realize that this is IronPython.Runtime object so I managed to solve this problem. However another new problem showed up. its an error about this line
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
I noticed that this is an Icon display thing so I just commented that line. program continues and I get the following error which I am stuck with it :S
IronPython.Runtime.Exceptions.PythonImporErrorException:No module named CNUDB
Do you have any suggestions about this error?! Thanks
|
|
|
|
 |
|
 |
It sounds like you did not perform step 5 in "How to run the Demo" section. which needs to be done in any project.
"Manually edit the local paths in CNUDB.py (Line 10) and CNUMontylingua.py (Line 8) [files may be found in the Solution Explorer] to point to your conceptnet2.1 and conceptnet2.1\montylingua directories."
|
|
|
|
 |
|
 |
im not able find Python 2.4 and ironmath to....
tell me solution
TnX
|
|
|
|
 |
|
|
 |
|
 |
hi i'm trying to use this in an office development in c# (for microsoft word) but everytime that i try to guess mood, it's crashing the whole program. Any idea why this is happening?
|
|
|
|
 |
|
 |
Are you using IronPython-1.1RC1? I don't believe I have had time to develop it past that version.
[Also this article works with an older version of ConceptNet]
|
|
|
|
 |
|
 |
Hi, thanks for your reply. no i'm using the one you suggested. Also was wondering a number of issues..
1. if for example you enter a paragraph and guess mood, how long does it take to give you the feedback?
2. what are the RPC directed to? will it work without internet connection?
3. can multiple threads use it simultaneously? (say for e.g. can i call guess mood from multiple threads?)
thank you so very very much!!
|
|
|
|
 |
|
 |
I have posted a video so you may examine the process and how long takes on my laptop.
http://www.youtube.com/watch?v=F6UnuWGkCuk[^]
dorielle wrote: 1. if for example you enter a paragraph and guess mood, how long does it take to give you the feedback?
You can see in the video it took about 2 seconds or so.
dorielle wrote: 2. what are the RPC directed to? will it work without internet connection?
If I remember correctly, in stead of conceptnet being loaded via python it gets loaded in IronPython. It works without internet.
dorielle wrote: 3. can multiple threads use it simultaneously? (say for e.g. can i call guess mood from multiple threads?)
You may be interested in just using Conceptnet nativaly as it can be used as a webservice. I think I even have the webservice running in IronPython once too. The demo has no builtin threading.
|
|
|
|
 |
|
 |
Thank you very much once again for your reply.
1. it takes 10 - 15 seconds for me to give a feedback any ideas on how i can improve this?
2. so again if i have multiple threads processing guess mood, while another thread is accessing the internet, that should relatively be ok right? :/
3. the webservice is faster i guess right? hmm can you direct me to it?
Thank you very much for your assistance!
|
|
|
|
 |
|
 |
dorielle wrote: it takes 10 - 15 seconds for me to give a feedback any ideas on how i can improve this?
Not off the top of my head. The IronPython email lists says there was good performance gains in the newer releases but there is some tweaking of CNU2 that would need to be done.
dorielle wrote: so again if i have multiple threads processing guess mood, while another thread is accessing the internet, that should relatively be ok right? :/
I can't say for certain without trying it myself but it sounds possible.
dorielle wrote: the webservice is faster i guess right? hmm can you direct me to it?
It is built in to ConceptNet 2.1
"If you wish to access ConceptNet from other programming languages such as Java, C++, or the .NET Platform, simply launch ConceptNet's XML-RPC Server (self-documenting) and then interface with ConceptNet via a simple XML-RPC client, which is available for all major programming languages."
http://web.media.mit.edu/~hugo/conceptnet/
and check out http://www.xml-rpc.net/[^]
|
|
|
|
 |
|
 |
thanks again for your reply.. and i apologize for the multiple questions, but now i'm even more confused :/ i checked out that website and it directed me to another which said that XML-RPC calls run over the internet [http://www.xmlrpc.com[^]
so if we're using the ironpython way to access conceptnet from the computer rather than the web.. it's not a webservice, right? :/
again i'm sorry for the multiple questions but u're d only ray of light i have to solve this ..
thanks again
|
|
|
|
 |
|
 |
"XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism"
http://en.wikipedia.org/wiki/Xmlrpc[^]
It is generally used over the internet but it is exactly what it is, a remote procedure call protocol. Think of it as server-client, you can have server-client relationhips on the same PC between apps, it doesn't matter.
|
|
|
|
 |
|
 |
aaa ok.. thanks a lot
|
|
|
|
 |
|
 |
Hi,
I am trying to understand how the demo works to then be able to use a similar environment for academic purposes, but I can't get the demo to work.
The error I'm getting is related to the location of conceptnet 2.1 (though I did rename the paths as explained in the steps) am I missing something?
Also, the stack print is specifying that the source of error is at ConceptNetUtils.CNDB.Initialize()
Just to be clear, when you said, rebuild both projects, all I had to do was right click and choose the ReBuild option right?
Thanks a lot
dor
|
|
|
|
 |
|
 |
ok never mind about this.. i restarted everything from scratch and it worked now hehe
|
|
|
|
 |
|
 |
i got the following error message :
"System.ArgumentEception:Illegal charachters in path
at IronPython.modues.PythonNT.Changedirectory(String path)..."
this error is occured in ConecptNetUtils.cs line 259
i followed the instruction step by step and the demo didn't work
and then tried to downgrade form Python 2.5 to 2.4.4 and modify the Paths.cs
i also tried to move both the conceptNet and ironPython to a path that doesn't have spaces ,and i still have the same error message ..
|
|
|
|
 |
|
 |
What version of IronPython are you using?
I last tested with 1.1
Also did you do number step number 5?
I have not tested, and I would have to redesign it to get it to work with 2Beta
|
|
|
|
 |
|
 |
the IronPython version 1.1 ,
but thanx it finally worked !!!
the problem was that the WordNet must be in a path that also doesn't contain "_" nor number
but i think its necessary to modify the "Pathes.cs" to the new path
thanx joeSex
|
|
|
|
 |
|
 |
fadi_mac85 wrote: but thanx it finally worked !!!
the problem was that the WordNet must be in a path that also doesn't contain "_" nor number
Great. Glad to hear.
Not sure if you are interested but since you have WordNet installed you can checkout
http://pswrdgen.googlecode.com/[^]
which also uses WordNet.
|
|
|
|
 |
|
 |
I followed your instructions on setting up your project, and I get an exception on line 6 in CNUMontylingua.py stating "ImportError: No module named MontyTokenizer".
I do have the path to the file in CNUMontylingua.py on line 9:
os.environ['PATH'] = os.environ.get('PATH','')+';C:\Users\WT\Python Projects\External\AI\Language\conceptnet2.1\montylingua;'
If I check that directory, I see these files:
MontyTokenizer.py
MontyTokenizer.pyc
What am I missing?
|
|
|
|
 |
|
 |
Well, one thing I had to do was do two project replaces. That has not fixed the problem, but it's a start.
Replace: "Python24" with "Python25"
Replace: "C:\Python25" with "C:\Program Files\Python25"
|
|
|
|
 |
|
 |
I also had to change the hard-coded paths in Paths.cs lines 44 & 50.
I now get different errors.
"File C:\Program Files\:ython25\Lib\warnings.py, line 264, in Initialize
NameError: name 'ImportWarning' not defined"
If I just click Okay, the form will open, but if I type something in and hit test, I get:
"name 'c' not defined"
at IronPython.Runtime.ModuleScope.GetGlobal(SymbolId symbol)
|
|
|
|
 |