Browse thread
[Caml-list] stack overflow
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yang Shouxun <yangsx@f...> |
| Subject: | Parallel CPS? (was Re: [Caml-list] stack overflow) |
On Wednesday 09 April 2003 19:34, Markus Mottl wrote: > Funny, I am currently also applying my tool to NLP (natural language > processing): because of the isomorphism between context-free grammars and > algebraic datatyes, it is possible to learn propositions about derivation > trees (or even more general: learn non-recursive functions). The problem > there is rather the size of CFG extracted from a large, annotated > corpus for German (many, many thousands of productions), which really > looks messy. I was a linguistics students before switching to NLP. I can understand the situation. I guess you need simplify a little bit, just like pruning the decision tree. Your grammar need not 100% coverage of the corpus. > > I've learned this style in Scheme. Yet I feel paralyzed when trying to > > write in it to build trees. The type declaration may make my point > > clearer. --8<-- > > type dtree = Dnode of dnode | Dtree of (dnode * int * dtree list) > > --8<-- > > The problems are that unless the next call returns, the tree is not > > complete yet and it may have several calls on itself. > > But that's what the closure is for: it abstracts away the subtree that > still needs to be computed. What if the continuation is not sequential, but parallel? If the tree is uniformly binary branching, I guess it would be easier. > Given that you already run into problems for comparatively small sizes, > I suppose that you are using the byte-code interpreter? Its builtin > stack space is 256KB, i.e. 64K-words. Would you consider tens of thousands small size? > That would be great! - Thanks! Then I'll send a copy to you in private. Thanks for other listers as well. The major problem is what if the continuation is not singular (sequential) but parallel? Best! shouxun ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners