Re: Using Dictionary

2015-04-14 Thread Pippo
On Tuesday, 14 April 2015 09:54:46 UTC-4, Michiel Overtoom wrote: > On Apr 14, 2015, at 15:34, Pippo wrote: > > > How can I use dictionary to save the following information? > > What a curious question. The purpose of a dictionary is not to save > information, but t

creating a graph out of text

2015-04-14 Thread Pippo
Hi, I am not sure why my code doesn't show the graph. It clearly creates the right nodes and edges but it doesn't show them. Any idea? mport re from Tkinter import * import tkFileDialog import testpattern import networkx as nx import matplotlib.pyplot as plt patternresult =[] nodes = {}

Using Dictionary

2015-04-14 Thread Pippo
How can I use dictionary to save the following information? #C[Health] #P[Information] #ST[genetic information] #C[oral | (recorded in (any form | medium))] #C[Is created or received by] #A[health care provider | health plan | public health authority | employer | life insurer | school | universit

showing a graph

2015-04-13 Thread Pippo
Hi, I want to show the graph for this code: import re from Tkinter import * import tkFileDialog import testpattern import networkx as nx import matplotlib.pyplot as plt patternresult =[] nodes = {} edges = {} pattern = ['(#P\[\w*\])', '(#C\[\w*[\s\(\w\,\s\|\)]+\])', '(#ST\[\w*[\s\(\

Re: installing matplotlib

2015-04-13 Thread Pippo
On Monday, 13 April 2015 15:58:58 UTC-4, Ned Deily wrote: > In article <176d49d3-6ff8-4d35-b8ec-647f13250...@googlegroups.com>, > Pippo wrote: > > I am trying to install matplotlib and I keep getting error: > [...] > > File > > > > "/Library/

installing matplotlib

2015-04-13 Thread Pippo
Hi guys, I am trying to install matplotlib and I keep getting error: Traceback (most recent call last): File "setup.py", line 155, in result = package.check() File "/Users/sepidehghanavati/Desktop/Programs/python/matplotlib-1.4.3/setupext.py", line 961, in check min_version='2.3',

Re: Regular Expression

2015-04-12 Thread Pippo
I fixed all! Thanks. This is the result: #C[Health] #P[Information] #ST[genetic information] #C[oral | (recorded in (any form | medium))] #C[Is created or received by] #A[health care provider | health plan | public health authority | employer | life insurer | school | university | or health car

Re: Regular Expression

2015-04-12 Thread Pippo
Sweet! Thanks all of you! I matched everything except these ones... trying to find the best way > whether #C[oral | (recorded in (any form | medium))], that #C[the past, present, or future physical | mental health | condition of an individual] | > #C[the past, present, or future payment fo

Anyone used snap.py for drawing a graph?

2015-04-12 Thread Pippo
Hi, Any guide on this? http://snap.stanford.edu/snappy/#download -- https://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression

2015-04-12 Thread Pippo
> Put the print inside the "if"; you don't really care when result is None, and > anyway you can't access .group when it is None - it is not an 're.match" > object, because there was no match. Thanks Cameron, this worked. > > Once you're happy you should consider what happens when there is m

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 21:21:48 UTC-4, Cameron Simpson wrote: > On 12Apr2015 17:55, Pippo wrote: > >On Sunday, 12 April 2015 20:46:19 UTC-4, Cameron Simpson wrote: > >> It looks like it should, unless you have mangled your regular expression. > [...] > >> Al

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 21:07:09 UTC-4, MRAB wrote: > On 2015-04-13 01:55, Pippo wrote: > > On Sunday, 12 April 2015 20:46:19 UTC-4, Cameron Simpson wrote: > >> >> >> > > constraint = re.compile(r'(#C\[\w*\]')) > >> >> &

Re: calling an api in python code

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 20:50:51 UTC-4, Steven D'Aprano wrote: > On Mon, 13 Apr 2015 10:31 am, Pippo wrote: > > > I am new in this matter.. I need some help to understand how do I call an > > api in python code? > > Your question is too general. It is like: >

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 20:46:19 UTC-4, Cameron Simpson wrote: > >> >> > > constraint = re.compile(r'(#C\[\w*\]')) > >> >> > > result = constraint.search(content[j],re.MULTILINE) > >> >> > > text.append(result) > >> >> > > print(text) > [...] > >> >> result is empty! Although

calling an api in python code

2015-04-12 Thread Pippo
I am new in this matter.. I need some help to understand how do I call an api in python code? -- https://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 20:06:08 UTC-4, MRAB wrote: > On 2015-04-13 00:47, Pippo wrote: > > On Sunday, 12 April 2015 19:44:05 UTC-4, Pippo wrote: > >> On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote: > >> > On 2015-04-12 23:49, Pippo wrote: >

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 19:47:09 UTC-4, Pippo wrote: > On Sunday, 12 April 2015 19:44:05 UTC-4, Pippo wrote: > > On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote: > > > On 2015-04-12 23:49, Pippo wrote: > > > > I have a text as follows: > > >

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 19:44:05 UTC-4, Pippo wrote: > On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote: > > On 2015-04-12 23:49, Pippo wrote: > > > I have a text as follows: > > > > > > "#D{#C[Health] #P[Information] - > > > means

Re: Regular Expression

2015-04-12 Thread Pippo
On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote: > On 2015-04-12 23:49, Pippo wrote: > > I have a text as follows: > > > > "#D{#C[Health] #P[Information] - > > means any information, including #ST[genetic information], > > whether #C[oral | (recorded in

Regular Expression

2015-04-12 Thread Pippo
I have a text as follows: "#D{#C[Health] #P[Information] - means any information, including #ST[genetic information], whether #C[oral | (recorded in (any form | medium))], that (1)#C[Is created or received by] a #A[health care provider | health plan | public health authority | employer | life

has anyone used collusion API for creating graphs?

2015-04-11 Thread Pippo
I want to create graphs with using collusion API from annotated text has anyone used the api? do you have any better suggestion too? -- https://mail.python.org/mailman/listinfo/python-list