Hi everyone,
I'm experiencing some odd behaviour that I cannot justify so I thought
someone smarter can help here...
I'm reading in a file with 39,7226 lines, each one containing a
token-tag pair (e.g. The/DET). This gives me 39,7226 fully-realized
TokenTagPair objects (records-> TokenTagPair{:token "The", :tag "DET"}).
Let's call them 'tt-pairs'. Now, I've got a function that takes n-grams
from a seq lazily. If I first extract all the tags and pass them to
ngrams then all is fine:
(def tags (mapv :tag tt-pairs)) ;;all the 39,7226 tags
(def ntags (doall (ngrams* tags 2))) ;;returns quickly
=> (last ntags)
("N" "P")
* HOWEVER,*
(def ntt-pairs (doall (ngrams* tt-pairs 2))) ;hangs forever!
one of my cpus is busy but nothing happens!!! How is this justified?
_both collections are of the same size and I'm performing the same
operation on them_...
the only difference is that 'tags' contains String objects whereas
'tt-pairs' contains TokenTagPair objects... weird stuff, yes?
any ideas anyone?
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.