Finding Upper-case characters in regexps, unicode friendly.

2006-05-24 Thread possibilitybox
I'm trying to make a unicode friendly regexp to grab sentences reasonably reliably for as many unicode languages as possible, focusing on european languages first, hence it'd be useful to be able to refer to any uppercase unicode character instead of just the typical [A-Z], which doesn't include, f

Finding Upper-case characters in regexps, unicode friendly.

2006-05-24 Thread possibilitybox
I'm trying to make a unicode friendly regexp to grab sentences reasonably reliably for as many unicode languages as possible, focusing on european languages first, hence it'd be useful to be able to refer to any uppercase unicode character instead of just the typical [A-Z], which doesn't include, f

Re: large dictionary creation takes a LOT of time.

2005-04-29 Thread possibilitybox
oh, right, i did only one eighth to check and see if it was scaling near linearly, as i couldn't even run profiling without python dying. i have 400mb ram and 2ghz processor, on freebsd, so it shouldn't be performance. i'll try your suggestions and see how it works. -- http://mail.python.org/ma

large dictionary creation takes a LOT of time.

2005-04-28 Thread possibilitybox
this code here: def wordcount(lines): for i in range(len(lines)/8): words = lines[i].split(" ") if not locals().has_key("frequency"): frequency = {} for word in words: if frequency.has_key(word): frequency[word] += 1

Re: recursive method not reaching base case

2005-03-23 Thread possibilitybox
so obvious! thank you for helping me there. i knew it was simple, i just couldn't catch it. -- http://mail.python.org/mailman/listinfo/python-list

recursive method not reaching base case

2005-03-23 Thread possibilitybox
i was working on implementing the original supermemo algorithm (see http://www.supermemo.com/english/ol/sm2.htm for a description of it) in a class, and i'd just finished up the first draft. it works for repetitions one and two, but on repetition three (you must manually increment item.reps.) or h