What do you mean by "performing the same operation"? How can you perform 
the same operation on completely different objects? Do you mean that you 
don't have the exact same *ngrams** in the first and second case?

On Sunday, March 24, 2013 1:45:37 PM UTC+1, Jim foo.bar wrote:
>
>  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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to